Commit Graph

149087 Commits

Author SHA1 Message Date
Zachary Turner
4afda8f7b6 [llvm-pdbdump] Add the option to sort functions and data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302998 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-14 01:13:40 +00:00
Simon Pilgrim
72a3a14d8b [SelectionDAG] Added support for EXTRACT_SUBVECTOR/CONCAT_VECTORS demandedelts in ComputeNumSignBits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302997 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 22:10:58 +00:00
Peter Collingbourne
7b655bd47a Add missing files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302996 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 22:10:13 +00:00
Peter Collingbourne
a844915ce0 Move lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI.
This reorganisation prevents us from cluttering up the top-level lib directory
with more driver libraries such as llvm-dlltool (see D29892).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302995 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 22:06:46 +00:00
Simon Pilgrim
e7198dbba5 [X86][SSE] Test showing missing EXTRACT_SUBVECTOR/CONCAT_VECTORS demandedelts support in ComputeNumSignBits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302994 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 21:50:18 +00:00
Simon Pilgrim
bacfc66c2e [SelectionDAG] Add VECTOR_SHUFFLE support to ComputeNumSignBits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302993 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 19:57:10 +00:00
Simon Pilgrim
ba64adafb1 [X86][SSE] Test showing inability of ComputeNumSignBits to resolve shuffles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302992 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 17:41:07 +00:00
Craig Topper
a7f9de4432 [ValueTracking] Remove const_casts on several calls to computeKnownBits and ComputeSignBit. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302991 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 17:22:16 +00:00
Justin Bogner
ef50c73737 MSan: Mark MemorySanitizer tests that use x86 intrinsics as REQUIRES: x86
Tests that use target intrinsics are inherently target specific. Mark
them as such.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302990 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 16:24:38 +00:00
Simon Pilgrim
3c8af5480a [x86, SSE] AVX1 PR28129 (256-bit all-ones rematerialization)
Further perf tests on Jaguar indicate that:

vxorps  %ymm0, %ymm0, %ymm0
vcmpps  $15, %ymm0, %ymm0, %ymm0

is consistently faster (by about 9%) than:

vpcmpeqd  %xmm0, %xmm0, %xmm0
vinsertf128  $1, %xmm0, %ymm0, %ymm0

Testing equivalent code on a SandyBridge (E5-2640) puts it slightly (~3%) faster as well.

Committed on behalf of @dtemirbulatov

Differential Revision: https://reviews.llvm.org/D32416

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302989 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 13:42:35 +00:00
Simon Pilgrim
07ac640d6c [LoopOptimizer][Fix]PR32859, PR24738
The Loop vectorizer pass introduced undef value while it is fixing output of LCSSA form.
Here it is:

before: %e.0.ph = phi i32 [ 0, %for.inc.2.i ]
after: %e.0.ph = phi i32 [ 0, %for.inc.2.i ], [ undef, %middle.block ]

and after this change we have:

%e.0.ph = phi i32 [ 0, %for.inc.2.i ]
%e.0.ph = phi i32 [ 0, %for.inc.2.i ], [ 0, %middle.block ]

Committed on behalf of @dtemirbulatov

Differential Revision: https://reviews.llvm.org/D33055

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302988 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 13:25:57 +00:00
Vivek Pandya
e3abce209b This reverts r302984
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302985 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 10:59:05 +00:00
Vivek Pandya
1ec28e35ff Simplify MIR Output used for Codegen Testing
- MIRYamlMapping: Default value provided for fields which have optional
mappings. Implemented == operators for required classes. When a field's value is
same as default value specified YAML IO class will not print it.

- MIRPrinter: Above mentioned behaviour is not on by default. If -simplify-mir
option not specified, then make yaml::Output to print fields with default values
too.

Differential Revision: https://reviews.llvm.org/D32304


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302984 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 08:55:43 +00:00
Craig Topper
f3c348a537 [APInt] Use Lo_32/Hi_32/Make_64 in a few more places in the divide code. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302983 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 07:14:17 +00:00
Craig Topper
f671e9e87b [InstCombine] Prevent InstCombine from triggering an extra iteration if something changed in the initial Worklist creation
Summary:
If the Worklist build causes an IR change this change flag currently factors into the flag for running another iteration of the iteration loop. But only changes during processing should trigger another loop.

This patch captures the worklist creation change flag into the outside the loop flag currently used for DbgDeclares and only sends that flag up to the caller. Rerunning the loop only depends on IC.run() now.

This uses the debug output of InstCombine to determine if one or two iterations run. I couldn't think of a better way to detect it since the second spurious iteration shoudn't make any visible changes. Just wasted computation.

I can do a pre-commit of the test case with the CHECK-NOT as a CHECK if this is an ok way to check this.

This is a subset of D31678 as I'm still not sure how to verify the analysis behavior for that.

Reviewers: davide, majnemer, spatel, chandlerc

Reviewed By: davide

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32453

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302982 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 06:56:04 +00:00
Justin Bogner
b3213cf9db ConstProp: Split x86 SSE intrinsic tests out of calls.ll
This allows us to mark this as `REQUIRES: x86`, since it uses x86
target specific intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302980 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 05:52:17 +00:00
Justin Bogner
74e8801b8b InstCombine: Move tests that use target intrinsics into subdirectories
Tests with target intrinsics are inherently target specific, so it
doesn't actually make sense to run them if we've excluded their
target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302979 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 05:39:46 +00:00
NAKAMURA Takumi
1c52526318 Disable llvm/test/Transforms/NewGVN/pr32934.ll while Davide is investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302977 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 03:05:38 +00:00
Davide Italiano
278c05b970 [NewGVN] XFAIL a flaky test until I find out what's going on.
I bet the change is correct but this test seems to expose some underlying
problem that manifest only on some buildbots, and I'm not able to reproduce
locally. Unfortunately I can't debug right now but I don't want to annoy
people with spurious failures, so I'll XFAIL until I can take a look (over
the weekend).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302976 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 02:45:47 +00:00
Craig Topper
9ba5c40155 [APInt] Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302974 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 00:35:30 +00:00
Dylan McKay
af4bf77761 [AVR] When lowering Select8/Select16, put newly generated MBBs in the same spot
Contributed by Dr. Gergő Érdi.

Fixes a bug.

Raised from (https://github.com/avr-rust/rust/issues/49).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302973 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 00:22:34 +00:00
Justin Bogner
8358665160 AA: Use generic intrinsics for tests instead of target specific ones
Update a few tests to use llvm.masked.load/store instead of arm neon
vector loads and stores, and move the tests that are actually specific
to those arm intrinsics to their own files. This lets us mark the
tests that use target specific intrinsics as requiring those targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302972 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 00:12:52 +00:00
Justin Bogner
d9cc17e635 [CodeView] Silence some -Wsign-compare warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302971 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 00:11:39 +00:00
Dylan McKay
7aa2fcf2ce [AVR] Remove an unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302970 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13 00:00:26 +00:00
Xinliang David Li
650f9d4bf5 [PartialInlining] Profile based cost analysis
Implemented frequency based cost/saving analysis
and related options.

The pass is now in a state ready to be turne on
in the pipeline (in follow up).

Differential Revision: http://reviews.llvm.org/D32783


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302967 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 23:41:43 +00:00
Aditya Nandakumar
f171aff2b8 [GISel]: Add a getConstantFPVRegVal utility
This might be useful across various GISel Passes

https://reviews.llvm.org/D33051

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302964 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 22:54:52 +00:00
Aditya Nandakumar
db0798140d [GISel]: Fix undefined behavior while accessing DefaultAction map
We end up dereferencing the end iterator here when the Aspect doesn't exist in the DefaultAction map.
Change the API to return Optional<LLT> and return None when not found.
Also update the callers to handle the None case

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302963 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 22:43:58 +00:00
Eugene Zelenko
2a48022484 [IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302961 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 22:25:07 +00:00
Andrew Kaylor
a0e10ad06a [TLI] Add mapping for various '__<func>_finite' forms of the math routines to SVML routines
Patch by Chris Chrulski

Differential Revision: https://reviews.llvm.org/D31789

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302957 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 22:11:26 +00:00
Andrew Kaylor
099763519f [ConstantFolding] Add folding for various math '__<func>_finite' routines generated from -ffast-math
Patch by Chris Chrulski

Differential Revision: https://reviews.llvm.org/D31788

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302956 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 22:11:20 +00:00
Andrew Kaylor
8731f0c094 [TLI] Add declarations for various math header file routines from math-finite.h that create '__<func>_finite as functions
Patch by Chris Chrulski

Differential Revision: https://reviews.llvm.org/D31787

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302955 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 22:11:12 +00:00
Craig Topper
5a71fb601c [APInt] Add early outs for a division by 1 to udiv/urem/udivrem
We already counted the number of bits in the RHS so its pretty cheap to just check if the RHS is 1.

Differential Revision: https://reviews.llvm.org/D33154

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302953 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 21:45:50 +00:00
Craig Topper
d2329ac508 [APInt] In udivrem, remember the bit width in a local variable so we don't reread it from the LHS which might be aliased with Quotient or Remainder.
This helped the compiler generate better code for the single word case. It was able to remember that the bit width was still a single word when it created the Remainder APInt and not create code for it possibly being multiword.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302952 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 21:45:44 +00:00
Adrian Prantl
42fd905d60 LTO: Don't verify modules twice in verifyMergedModuleOnce
Differential Revision: https://reviews.llvm.org/D33140

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302951 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 21:38:32 +00:00
Sanjay Patel
9f8cf56799 [Doc] Document "Splat" in the lexicon
Patch by Wei-Ren Chen (陳韋任)!

Differential Revision: https://reviews.llvm.org/D32964


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302950 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 21:30:31 +00:00
Sanjay Patel
62352f820d [x86] add vector tests for demanded bits; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302949 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 20:53:48 +00:00
Changpeng Fang
ed4c8077b0 AMDGPU/SI: Don't promote to vector if the load/store is volatile.
Summary:
  We should not change volatile loads/stores in promoting alloca to vector.

Reviewers:
  arsenm

Differential Revision:
  http://reviews.llvm.org/D33107

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302943 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 20:31:12 +00:00
Simon Pilgrim
4633bbb4c7 [NVPTX] Don't flag StoreRetVal memory chain operands as ReadMem (PR32146)
This fixes 47 of the 75 NVPTX '-verify-machineinstrs with EXPENSIVE_CHECKS' errors in PR32146.

Differential Revision: https://reviews.llvm.org/D33147

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302942 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 19:56:43 +00:00
Teresa Johnson
91c3ccb649 Remove ignore-empty-index-file option
Summary:
As discussed in the D32195 review thread and on IRC, remove this option
and replace with parameter, which will be set to true when invoked
from clang in the context of a ThinLTO distributed backend.

Reviewers: pcc

Subscribers: mehdi_amini, llvm-commits

Differential Revision: https://reviews.llvm.org/D33133

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302939 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 19:32:11 +00:00
Dehao Chen
0faf9ed31e Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.

Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb

Reviewed By: MatzeB, andreadb

Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits

Differential Revision: https://reviews.llvm.org/D32563

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302938 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 19:29:27 +00:00
Tim Shen
ac2d13ffb3 [PPC] Move the combine "a << (b % (sizeof(a) * 8)) -> (PPCshl a, b)" to the backend. NFC.
Summary:
Eli pointed out that it's unsafe to combine the shifts to ISD::SHL etc.,
because those are not defined for b > sizeof(a) * 8, even after some of
the combiners run.

However, PPCISD::SHL defines that behavior (as the instructions themselves).
Move the combination to the backend.

The tests in shift_mask.ll still pass.

Reviewers: echristo, hfinkel, efriedma, iteratee

Subscribers: nemanjai, llvm-commits

Differential Revision: https://reviews.llvm.org/D33076

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302937 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 19:25:37 +00:00
Zachary Turner
337b2d88de [CodeView] Add a random access type visitor.
This adds a visitor that is capable of accessing type
records randomly and caching intermediate results that it
learns about during partial linear scans.  This yields
amortized O(1) access to a type stream even though type
streams cannot normally be indexed.

Differential Revision: https://reviews.llvm.org/D33009

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302936 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 19:18:12 +00:00
Geoff Berry
decf0031c9 [AArch64][Falkor] Refine modeling of multiply accumulate forwarding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302933 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 18:57:10 +00:00
Craig Topper
b09b50cbe4 [APInt] Add an assert to check for divide by zero in udivrem. NFC
udiv and urem already had the same assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302931 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 18:19:01 +00:00
Craig Topper
e2c79618d4 [APInt] Remove unnecessary checks of rhsWords==1 with lhsWords==1 from udiv and udivrem. NFC
At this point in the code rhsWords is guaranteed to be non-zero and less than or equal to lhsWords. So if lhsWords is 1, rhsWords must also be 1. urem alread had the check removed so this makes all 3 consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302930 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 18:18:57 +00:00
Tom Stellard
593d52aaad AMDGPU: Add lit.local.cfg to disable global-isel tests when global-isel is disabled
This should fix bots broken by r302919.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302928 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 17:59:30 +00:00
Simon Pilgrim
e52c285693 Strip trailing whitespace. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302927 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 17:42:36 +00:00
Craig Topper
d49344495d [KnownBits] Add bit counting methods to KnownBits struct and use them where possible
This patch adds min/max population count, leading/trailing zero/one bit counting methods.

The min methods return answers based on bits that are known without considering unknown bits. The max methods give answers taking into account the largest count that unknown bits could give.

Differential Revision: https://reviews.llvm.org/D32931

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302925 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 17:20:30 +00:00
Reid Kleckner
43ed711041 [codeview] Fix assertion failure introduced in r295354 refactoring
CodeViewDebug sets Asm to nullptr to disable debug info generation.  You
can get a .ll file like no-cus.ll from 'clang -gcodeview -g0', which
happens in the ubsan test suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302923 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 17:02:40 +00:00
Galina Kistanova
5bca41ca50 Make sure we have actually written what is expected by the test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302922 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 17:00:13 +00:00