Evandro Menezes [Tue, 21 Feb 2017 22:16:09 +0000 (22:16 +0000)]
[AArch64] Add test case for fusion of literal generation
Add test case from https://reviews.llvm.org/D28698 that was somehow lost in
transit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295775
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Tue, 21 Feb 2017 22:16:06 +0000 (22:16 +0000)]
[AArch64] Add test case for fusion of AES crypto operations
Add test case from https://reviews.llvm.org/D28491 that was somehow lost in
transit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295774
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Tue, 21 Feb 2017 22:07:52 +0000 (22:07 +0000)]
[CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295773
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 21 Feb 2017 21:31:28 +0000 (21:31 +0000)]
Try to fix the buildbot on OSX.
Since I'm only seeing failures on OSX, and it's saying
permission denied, I'm suspecting this is due to the addition
of the MAP_RESILIENT_CODESIGN and/or MAP_RESILIENT_MEDIA flags.
Speculatively trying to remove those to get the bots working.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295770
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 21 Feb 2017 21:13:10 +0000 (21:13 +0000)]
Try to fix Android build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295769
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 21 Feb 2017 20:55:47 +0000 (20:55 +0000)]
[Support] Add a function to check if a file resides locally.
Differential Revision: https://reviews.llvm.org/D30010
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295768
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Tue, 21 Feb 2017 20:53:48 +0000 (20:53 +0000)]
Make default value for disable-licm-promotion in licm explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295767
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Feb 2017 20:40:54 +0000 (20:40 +0000)]
Don't modify archive members unless really needed.
For whatever reason ld64 requires that member headers (not the member
themselves) should be aligned. The only way to do that is to edit the
previous member so that it ends at an aligned boundary.
Since modifying data put in an archive is an undesirable property,
llvm-ar should only do it when it is absolutely necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295765
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Tue, 21 Feb 2017 20:17:34 +0000 (20:17 +0000)]
Fix PR31896.
Address of an alias of a global with offset is incorrectly lowered as an address of the global (i.e. ignoring offset).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295762
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 21 Feb 2017 19:52:57 +0000 (19:52 +0000)]
Try to fix line endings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295759
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 21 Feb 2017 19:33:53 +0000 (19:33 +0000)]
[InstCombine] canonicalize non-obivous forms of integer min/max
This is part of trying to clean up our handling of min/max patterns in IR.
By converting these to canonical form, we're more likely to recognize them
because there are various places in InstCombine that don't use
matchSelectPattern or m_SMax and friends.
The backend fixups referenced in the now deleted TODO comment were added with:
https://reviews.llvm.org/rL291392
https://reviews.llvm.org/rL289738
If there's any codegen fallout from this change, we should be able to address
it in DAGCombiner or target-specific lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295758
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 21 Feb 2017 19:31:33 +0000 (19:31 +0000)]
AMDGPU: Remove dead declarations in tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295757
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 21 Feb 2017 19:29:56 +0000 (19:29 +0000)]
Remove svn:eol-style property from 2 files.
There are still over 3400 files remaining with this property set, but there are tens of thousands more with the property not set. Until we decide what to do on a global scale, this at least unblocks me temporarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295756
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 21 Feb 2017 19:27:36 +0000 (19:27 +0000)]
AMDGPU: Remove dead declarations from MIR tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295755
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 21 Feb 2017 19:27:33 +0000 (19:27 +0000)]
AMDGPU: Remove llvm.AMDGPU.flbit intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295754
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 21 Feb 2017 19:12:08 +0000 (19:12 +0000)]
AMDGPU: Don't use stack space for SGPR->VGPR spills
Before frame offsets are calculated, try to eliminate the
frame indexes used by SGPR spills. Then we can delete them
after.
I think for now we can be sure that no other instruction
will be re-using the same frame indexes. It should be easy
to notice if this assumption ever breaks since everything
asserts if it tries to use a dead frame index later.
The unused emergency stack slot seems to still be left behind,
so an additional 4 bytes is still wasted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295753
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Tue, 21 Feb 2017 19:10:58 +0000 (19:10 +0000)]
[LoopSimplify] Simplify how we compute UniqueExit
Summary: Simplify how we compute UniqueExit. Reuse ExitBlockSet.
Reviewers: sanjoy, efriedma, hfinkel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D30182
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295751
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Tue, 21 Feb 2017 19:08:03 +0000 (19:08 +0000)]
More comments for getUniqueExitBlocks. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295750
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 21 Feb 2017 19:03:15 +0000 (19:03 +0000)]
Teach the IR verifier to reject conflicting debug info for function arguments.
Conflicting debug info for function arguments causes hard-to-debug
assertions in the DWARF backend, so the Verifier should reject it.
For performance reasons this only checks function arguments from
non-inlined debug intrinsics for now.
rdar://problem/
30520286
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295749
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Tue, 21 Feb 2017 18:53:14 +0000 (18:53 +0000)]
[CodeGenPrepare] Sink and duplicate more 'and' instructions.
Summary:
Rework the code that was sinking/duplicating (icmp and, 0) sequences
into blocks where they were being used by conditional branches to form
more tbz instructions on AArch64. The new code is more general in that
it just looks for 'and's that have all icmp 0's as users, with a target
hook used to select which subset of 'and' instructions to consider.
This change also enables 'and' sinking for X86, where it is more widely
beneficial than on AArch64.
The 'and' sinking/duplicating code is moved into the optimizeInst phase
of CodeGenPrepare, where it can take advantage of the fact the
OptimizeCmpExpression has already sunk/duplicated any icmps into the
blocks where they are used. One minor complication from this change is
that optimizeLoadExt needed to be updated to always mark 'and's it has
determined should be in the same block as their feeding load in the
InsertedInsts set to avoid an infinite loop of hoisting and sinking the
same 'and'.
This change fixes a regression on X86 in the tsan runtime caused by
moving GVNHoist to a later place in the optimization pipeline (see
PR31382).
Reviewers: t.p.northover, qcolombet, MatzeB
Subscribers: aemerson, mcrosier, sebpop, llvm-commits
Differential Revision: https://reviews.llvm.org/D28813
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295746
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Ding [Tue, 21 Feb 2017 18:48:01 +0000 (18:48 +0000)]
AMDGPU : AMDGPU : Update AMDGPU Trap Handler ABI.
Differential Revision: http://reviews.llvm.org/D29913
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295745
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Preobrazhensky [Tue, 21 Feb 2017 18:07:07 +0000 (18:07 +0000)]
Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295740
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 21 Feb 2017 17:42:28 +0000 (17:42 +0000)]
[X86] EltsFromConsecutiveLoads SDLoc argument should be const&.
There appears never to have been a time that the reference was updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295739
91177308-0d34-0410-b5e6-
96231b3b80d8
Vassil Vassilev [Tue, 21 Feb 2017 17:30:43 +0000 (17:30 +0000)]
Do not leak OpenedHandles.
Reviewed by Vedant Kumar (D30178)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295737
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 21 Feb 2017 17:04:11 +0000 (17:04 +0000)]
[X86][AVX512] Update VPBROADCASTQ test to combine from VPERMQ instead of VPERMI2Q.
VPERMI2Q doesn't have shuffle decoding from re-materializable constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295736
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 21 Feb 2017 16:45:31 +0000 (16:45 +0000)]
[X86][AVX] Rename shuffle combine tests to show combined shuffle type. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295735
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Tue, 21 Feb 2017 16:45:04 +0000 (16:45 +0000)]
[ARM] Correct SP/PC handling in t2MOVr
Add a missing test that I forgot to svn add in my previous commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295734
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 21 Feb 2017 16:41:44 +0000 (16:41 +0000)]
[X86][AVX2] Fix VPBROADCASTQ folding on 32-bit targets.
As i64 isn't a value type on 32-bit targets, we need to fold the VZEXT_LOAD into VPBROADCASTQ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295733
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Tue, 21 Feb 2017 16:41:29 +0000 (16:41 +0000)]
[ARM] Correct SP/PC handling in t2MOVr
PC isn't allowed in the source operand of t2MOVr, so change the register class
to one without PC. SP handling is slightly trickier and changes depending on if
we're in ARMv8, so do that in checkTargetMatchPredicate.
Differential Revision: https://reviews.llvm.org/D30199
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295732
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 21 Feb 2017 16:29:28 +0000 (16:29 +0000)]
[X86][AVX2] Add AVX512 test targets to AVX2 shuffle combines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295731
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 21 Feb 2017 16:05:35 +0000 (16:05 +0000)]
[X86][AVX] Add tests showing missed VPBROADCASTQ folding on 32-bit targets.
As i64 isn't a value type on 32-bit targets, we fail to fold the VZEXT_LOAD into VPBROADCASTQ.
Also shows that we're not decoding VPERMIV3 shuffles very well....
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295729
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 21 Feb 2017 15:09:00 +0000 (15:09 +0000)]
[X86][SSE] Prefer to combine shuffles to VZEXT over VZEXT_MOVL.
This matches what is already done during shuffle lowering and helps prevent the need for a zero-vector in cases where shuffles match both patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295723
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 21 Feb 2017 14:51:15 +0000 (14:51 +0000)]
[X86][SSE] Added SSE41 shuffle combining test file.
Currently just contains one case where we combine to VZEXT_MOVL instead of VZEXT which would avoid the need for a zero vector to be generated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295721
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Tue, 21 Feb 2017 14:40:28 +0000 (14:40 +0000)]
[InstCombine] Do not exercise nested max/min pattern on abs
Summary:
This is a fix for assertion failure in
`getInverseMinMaxSelectPattern` when ABS is passed in as a select pattern.
We should not be invoking the simplification rule for
ABS(MIN(~ x,y))) or ABS(MAX(~x,y)) combinations.
Added a test case which would cause an assertion failure without the patch.
Reviewers: sanjoy, majnemer
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D30051
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295719
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Tue, 21 Feb 2017 14:01:25 +0000 (14:01 +0000)]
[AVX512] Fix EXTRACT_VECTOR_ELT for v2i1/v4i1/v32i1/v64i1 with variable index.
Differential Revision: https://reviews.llvm.org/D30189
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295718
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Tue, 21 Feb 2017 13:40:55 +0000 (13:40 +0000)]
[SLP] Tests for shuffle/blending operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295717
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Tue, 21 Feb 2017 11:33:59 +0000 (11:33 +0000)]
[ARM] GlobalISel: Lower calls to void() functions
For now, we hardcode a BLX instruction, and generate an ADJCALLSTACKDOWN/UP pair
with amount 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295716
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Tue, 21 Feb 2017 09:19:41 +0000 (09:19 +0000)]
tablegen: Fix android build
use llvm::to_string instead of std:: version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295711
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 08:06:08 +0000 (08:06 +0000)]
[X86] Remove ssse3 intrinsic tests from the avx intrinsics test file.
They are all covered by the SSSE3 intrinsics test with SSSE3, AVX, and AVX512 command lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295708
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 08:06:05 +0000 (08:06 +0000)]
[X86] Remove sse4.2 intrinsic tests from the avx intrinsics test file. Fix some other consistency issues.
They are all covered by the SSE4.2 intrinsics test with SSE4.2, AVX, and AVX512 command lines.
Merge sse42.ll into the other intrinsics test. Rename sse42_64.ll to be named like other intrinsic tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295707
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 08:06:02 +0000 (08:06 +0000)]
[X86] Remove sse4.1 intrinsic tests from the avx intrinsics test file.
They are all covered by the SSE4.1 intrinsics test with SSE4.1, AVX, and AVX512 command lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295706
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 08:05:59 +0000 (08:05 +0000)]
[X86] Remove sse3 intrinsic tests from the avx intrinsics test file.
They are all covered by the SSE3 intrinsics test with SSE2, AVX, and AVX512 command lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295705
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeny Stupachenko [Tue, 21 Feb 2017 07:34:40 +0000 (07:34 +0000)]
The patch introduces new way of narrowing complex (>UINT16 variants) solutions.
The new method introduced under "-lsr-exp-narrow" option (currenlty set to true).
Summary:
The method is based on registers number mathematical expectation and should be
generally closer to optimal solution.
Please see details in comments to
"LSRInstance::NarrowSearchSpaceByDeletingCostlyFormulas()" function
(in lib/Transforms/Scalar/LoopStrengthReduce.cpp).
Reviewers: qcolombet
Differential Revision: http://reviews.llvm.org/D29862
From: Evgeny Stupachenko <evstupac@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295704
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 07:32:18 +0000 (07:32 +0000)]
[X86] Remove aes intrinsic tests from the avx intrinsics test file.
They are all covered by the AES intrinsics test with a legacy command line and an AVX command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295702
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 07:32:14 +0000 (07:32 +0000)]
[X86] Add an AVX command line and regenerate AES intrinsics test using the update_llc_test_checks.py
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295701
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 07:32:11 +0000 (07:32 +0000)]
[X86] Remove sse2 intrinsic tests from the avx intrinsics test file.
They are all covered by the SSE2 intrinsics test with SSE2, AVX, and AVX512 command lines.
Also remove an unneeded lfence intrinsic test since it was already covered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295700
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 07:32:03 +0000 (07:32 +0000)]
[X86] Remove sse1 intrinsic tests from the avx intrinsics test file.
They are all covered by the SSE intrinsics test with SSE, AVX, and AVX512 command lines.
Also remove an unneeded sfence intrinsic test since it was already covered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295699
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 06:39:13 +0000 (06:39 +0000)]
[X86] Use SHLD with both inputs from the same register to implement rotate on Sandy Bridge and later Intel CPUs
Summary:
Sandy Bridge and later CPUs have better throughput using a SHLD to implement rotate versus the normal rotate instructions. Additionally it saves one uop and avoids a partial flag update dependency.
This patch implements this change on any Sandy Bridge or later processor without BMI2 instructions. With BMI2 we will use RORX as we currently do.
Reviewers: zvi
Reviewed By: zvi
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D30181
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295697
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 06:27:13 +0000 (06:27 +0000)]
[X86] Fix formatting. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295695
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 04:26:10 +0000 (04:26 +0000)]
[AVX-512] Use sse_load_f32/f64 in place of scalar_to_vector and scalar load in some patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295693
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 04:26:07 +0000 (04:26 +0000)]
[AVX-512] Add test cases showing failure to fold zero extending scalar loads in scalar intrinsics without the peephole pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295692
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Feb 2017 04:26:04 +0000 (04:26 +0000)]
[AVX-512] Fix the ExeDomain for vcmpss/vcmpsd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295691
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 21 Feb 2017 02:42:42 +0000 (02:42 +0000)]
[ValueTracking] clang-format a section I'm about to touch; NFC
(Whitespace only change)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295690
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 21 Feb 2017 01:27:33 +0000 (01:27 +0000)]
ScheduleDAG: Cleanup; NFC
- Fix doxygen comments (do not repeat documented name, remove definition
comment if there is already one at the declaration, add \p, ...)
- Add some const modifiers
- Use range based for
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295688
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 21 Feb 2017 01:27:29 +0000 (01:27 +0000)]
SubtargetFeature: Cleanup; NFC
- Fix doxygen comments
- Remove duplicated comments
- Remove section comments (which became wrong over time)
- Use more `const` and references but less `auto`
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295687
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 21 Feb 2017 00:38:44 +0000 (00:38 +0000)]
Add a wrapper around copy_if in STLExtras; NFC
I will add one more use for this in a later change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295685
91177308-0d34-0410-b5e6-
96231b3b80d8
Taewook Oh [Tue, 21 Feb 2017 00:12:38 +0000 (00:12 +0000)]
[BranchFolding] Update debug location along with the update of branch instruction.
Summary:
Currently, BranchFolder drops DebugLoc for branch instructions in some places. For example, for the test code attached, the branch instruction of 'entry' block has a DILocation of
```
!12 = !DILocation(line: 6, column: 3, scope: !11)
```
, but this information is gone when then block is lowered because BranchFolder misses it. This patch is a fix for this issue.
Reviewers: qcolombet, aprantl, craig.topper, MatzeB
Reviewed By: aprantl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29902
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295684
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Feb 2017 23:38:51 +0000 (23:38 +0000)]
[X86] Add additonal check lines to one of the rotate tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295682
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Feb 2017 23:38:48 +0000 (23:38 +0000)]
[X86] FileCheckize one of the rotate tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295681
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 20 Feb 2017 23:37:11 +0000 (23:37 +0000)]
[IndVars] Add an assert
We've already checked that the loop is in simplify form before, but a
little paranoia never hurt anyone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295680
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 20 Feb 2017 22:51:42 +0000 (22:51 +0000)]
[IR/Verifier] List the CU we weren't able to find in `llvm.dbg.cu`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295678
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Mon, 20 Feb 2017 22:26:03 +0000 (22:26 +0000)]
MemorySSA: Add support for renaming uses in the updater.
Summary:
This lets one add aliasing stores to the updater.
(i'm next going to move the creation/etc functions to the updater)
Reviewers: george.burgess.iv
Subscribers: llvm-commits, Prazek
Differential Revision: https://reviews.llvm.org/D30154
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295677
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Feb 2017 19:44:10 +0000 (19:44 +0000)]
[X86] FileCheckize one of the rotate tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295676
91177308-0d34-0410-b5e6-
96231b3b80d8
Steven Wu [Mon, 20 Feb 2017 18:33:40 +0000 (18:33 +0000)]
Fix use-after-free found by ASAN
DenseMap::lookup returns copy of the value in the map. Returning the
address of the temporary return value will cause use-after-free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295675
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Feb 2017 17:44:09 +0000 (17:44 +0000)]
[AVX-512] Add a few more patterns for selecting masked vpternlog with broadcast loads where the passthru operand is not operand 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295673
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 20 Feb 2017 16:09:45 +0000 (16:09 +0000)]
[X86] Tidyup combineExtractVectorElt. NFCI.
Pull out repeated code for extraction index operand and source vector value type.
Use isNullConstant helper to check for zero extraction index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295670
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 20 Feb 2017 15:57:14 +0000 (15:57 +0000)]
[X86][SSE] Regenerate extracted bitcasted constant tests and add 32-bit test target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295669
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 20 Feb 2017 15:30:43 +0000 (15:30 +0000)]
[globalisel] OperandPredicateMatcher's shouldn't need to generate the MachineOperand expr. NFC
Summary:
Each OperandPredicateMatcher shouldn't need to know how to generate the expression
to reference a MachineOperand. The OperandMatcher should provide it.
In addition to separating responsibilities, this also lays some groundwork for
decoupling source patterns from destination patterns to allow invented operands
or operands provided by GlobalISel's equivalent to the ComplexPattern<> class.
Depends on D29709
Reviewers: t.p.northover, ab, rovka, qcolombet, aditya_nandakumar
Reviewed By: ab
Subscribers: dberris, kristof.beyls, llvm-commits, igorb
Differential Revision: https://reviews.llvm.org/D29710
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295668
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 20 Feb 2017 15:20:37 +0000 (15:20 +0000)]
[X86][SSE] Regenerate re-materialized store tests and add 64-bit test target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295666
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 20 Feb 2017 15:16:43 +0000 (15:16 +0000)]
[X86][SSE] Regenerate vselect widening tests and add 32-bit test target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295665
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Mon, 20 Feb 2017 14:45:58 +0000 (14:45 +0000)]
[ARM] GlobalISel: Don't select atomic loads
There used to be a check in the IRTranslator that prevented us from having to
deal with atomic loads/stores. That check has been removed in r294993 and the
AArch64 backend was updated accordingly. This commit does the same thing for the
ARM backend.
In general, in the ARM backend we introduce fences during the atomic expand
pass, so we don't have to worry about atomics, *except* for the 32-bit ARMv8
target, which handles atomics more like AArch64. Since we don't want to worry
about that yet, just bail out of instruction selection if we find any atomic
loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295662
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 20 Feb 2017 14:31:27 +0000 (14:31 +0000)]
[globalisel] Separate the SelectionDAG importer from the emitter. NFC
Summary:
In the near future the rules will be sorted between these two steps to
ensure that more important rules are not prevented by less important ones.
Reviewers: t.p.northover, ab, rovka, qcolombet, aditya_nandakumar
Reviewed By: ab
Subscribers: dberris, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D29709
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295661
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 20 Feb 2017 14:16:29 +0000 (14:16 +0000)]
[X86] Fix EXTRACT_VECTOR_ELT with variable index from v32i16 and v64i8 vector.
Its more profitable to go through memory (1 cycles throughput)
than using VMOVD + VPERMV/PSHUFB sequence ( 2/3 cycles throughput) to implement EXTRACT_VECTOR_ELT with variable index.
IACA tool was used to get performace estimation (https://software.intel.com/en-us/articles/intel-architecture-code-analyzer)
For example for var_shuffle_v16i8_v16i8_xxxxxxxxxxxxxxxx_i8 test from vector-shuffle-variable-128.ll I get 26 cycles vs 79 cycles.
Removing the VINSERT node, we don't need it any more.
Differential Revision: https://reviews.llvm.org/D29690
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295660
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Mon, 20 Feb 2017 12:41:16 +0000 (12:41 +0000)]
[SLP] Additional test for vectorization of cal/invoke args vectorization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295657
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 20 Feb 2017 12:16:38 +0000 (12:16 +0000)]
[X86][AVX512] Add support for ASHR v2i64/v4i64 support without VLX
Use v8i64 ASHR instructions if we don't have VLX.
Differential Revision: https://reviews.llvm.org/D28537
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295656
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanne Wouda [Mon, 20 Feb 2017 12:05:07 +0000 (12:05 +0000)]
[ARM] Add a div regression test for Cortex-M23
Summary:
This file was missed in the commit for Cortex-M23 and Cortex-M33
support. See https://reviews.llvm.org/D29073?id=85814 .
Reviewers: rengolin, javed.absar, samparker
Reviewed By: samparker
Subscribers: llvm-commits, aemerson
Differential Revision: https://reviews.llvm.org/D30162
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295655
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 20 Feb 2017 11:56:43 +0000 (11:56 +0000)]
Strip trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295653
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 20 Feb 2017 11:55:58 +0000 (11:55 +0000)]
[SelectionDAG] Add scalarization support for ISD::*_EXTEND_VECTOR_INREG opcodes.
Thanks to Mikael Holmén for the initial test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295652
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Mon, 20 Feb 2017 10:57:54 +0000 (10:57 +0000)]
AArch64AsmParser: tablegen the isBranchTarget helper functions
Use tablegen to autogenerate isBranchtarget helper functions. This is a cleanup
that removes almost identical functions that differ only in a few constants.
Differential Revision: https://reviews.llvm.org/D30160
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295649
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Mon, 20 Feb 2017 10:53:03 +0000 (10:53 +0000)]
[mips] Add test for mul macro variants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295648
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 20 Feb 2017 10:07:41 +0000 (10:07 +0000)]
llvm/examples/Kaleidoscope/BuildingAJIT: More fixup corresponding to r295636.
I missed updating them since I just ran check-llvm (with examples) in r295645.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295646
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 20 Feb 2017 09:56:24 +0000 (09:56 +0000)]
llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h: Fixup corresponding to r295636.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295645
91177308-0d34-0410-b5e6-
96231b3b80d8
Ayman Musa [Mon, 20 Feb 2017 08:27:54 +0000 (08:27 +0000)]
[X86][AVX] Extend hasVEX_WPrefix bit to accept WIG value (W Ignore) + update all AVX instructions with the new value.
Add WIG value to all of AVX instructions which ignore the W-bit in their encoding, instead of giving them the default value of 0.
This patch is needed for a follow up work on EVEX2VEX pass (replacing EVEX encoded instructions with their corresponding VEX version when possible).
Differential Revision: https://reviews.llvm.org/D29876
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295643
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Mon, 20 Feb 2017 08:04:11 +0000 (08:04 +0000)]
[SLP] nullptr'ize initial value in `findBuildAggregate()`, NFC.
Initial value of V is sett nullptr, as it is not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295642
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Mon, 20 Feb 2017 07:49:39 +0000 (07:49 +0000)]
[SLP] Rework `findBuildAggregate()` from ercursive form to iterative, NFC.
Reviewers: mkuper
Subscribers: llvm-commits, mzolotukhin
Differential Revision: https://reviews.llvm.org/D30103
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295641
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Feb 2017 07:00:40 +0000 (07:00 +0000)]
[AVX-512] Add more patterns to fold masked VPTERNLOG with load when the passthru isn't operand 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295640
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Feb 2017 07:00:37 +0000 (07:00 +0000)]
[AVX-512] Add tests for missed opportunities to fold masked VPTERNLOG with load when the passthru op isn't operand 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295639
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Feb 2017 07:00:34 +0000 (07:00 +0000)]
[AVX-512] Fix mistake in the immediate swizzle for some of the VPTERNLOG patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295638
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Feb 2017 07:00:31 +0000 (07:00 +0000)]
[AVX-512] Use a better immediate in the VPTERNLOG commuting tests so its easier to spot bad swizzling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295637
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 20 Feb 2017 05:45:14 +0000 (05:45 +0000)]
[Orc] Rename ObjectLinkingLayer -> RTDyldObjectLinkingLayer.
The current ObjectLinkingLayer (now RTDyldObjectLinkingLayer) links objects
in-process using MCJIT's RuntimeDyld class. In the near future I hope to add new
object linking layers (e.g. a remote linking layer that links objects in the JIT
target process, rather than the client), so I'm renaming this class to be more
descriptive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295636
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Feb 2017 02:47:42 +0000 (02:47 +0000)]
[AVX-512] Add more VPTERNLOG patterns to enable folding of broadcast loads that aren't in operand 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295634
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Feb 2017 00:37:23 +0000 (00:37 +0000)]
[X86] Use memory form of shift right by 1 when the rotl immediate is one less than the operation size.
An earlier commit already did this for the register form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295626
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Feb 2017 00:37:20 +0000 (00:37 +0000)]
[X86] Add test cases showing missed opportunities to use rotate right by 1 instructions when operation reads/writes memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295625
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sun, 19 Feb 2017 23:26:00 +0000 (23:26 +0000)]
s/REQUIRES: Asserts/REQUIRES: asserts/
Other than this, we consistently use lower case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295623
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Feb 2017 21:44:35 +0000 (21:44 +0000)]
[AVX-512] Remove AddedComplexity from masked operations. The size of the patterns already increases their priority.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295619
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 19 Feb 2017 21:40:51 +0000 (21:40 +0000)]
[X86] Use peekThroughOneUseBitcasts helper. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295618
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sun, 19 Feb 2017 21:35:41 +0000 (21:35 +0000)]
[X86] Prefer static_cast<> to C-style cast. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295617
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Feb 2017 21:32:15 +0000 (21:32 +0000)]
[AVX-512] Disable peephole optimizations on the VPTERNLOG commute test. Add new patterns to enable isel to fold the loads on it own.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295616
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sun, 19 Feb 2017 21:31:14 +0000 (21:31 +0000)]
[AArch64] Prefer static_cast<> to C-style cast. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295615
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 19 Feb 2017 19:40:31 +0000 (19:40 +0000)]
[X86][SSE] Use getTargetConstantBitsFromNode to find zeroable shuffle elements.
Replaces existing approach that could only search BUILD_VECTOR nodes.
Requires getTargetConstantBitsFromNode to discriminate cases with all/partial UNDEF bits in each element - this should also be useful when we get around to supporting getTargetShuffleMaskIndices with UNDEF elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295613
91177308-0d34-0410-b5e6-
96231b3b80d8