43042 Commits

Author SHA1 Message Date
Craig Topper
f12d64f2d3 [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
2017-02-21 08:06:05 +00:00
Craig Topper
74f63b561d [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
2017-02-21 08:06:02 +00:00
Craig Topper
c39fbcaf44 [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
2017-02-21 08:05:59 +00:00
Evgeny Stupachenko
141320fd99 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
2017-02-21 07:34:40 +00:00
Craig Topper
f80e7ef629 [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
2017-02-21 07:32:18 +00:00
Craig Topper
068549b757 [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
2017-02-21 07:32:14 +00:00
Craig Topper
4228b1201f [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
2017-02-21 07:32:11 +00:00
Craig Topper
3ba7715b43 [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
2017-02-21 07:32:03 +00:00
Craig Topper
02e45aadbe [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
2017-02-21 06:39:13 +00:00
Craig Topper
4d13821a7e [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
2017-02-21 04:26:10 +00:00
Craig Topper
7f8d3281a8 [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
2017-02-21 04:26:07 +00:00
Taewook Oh
f8bacbb9bd [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
2017-02-21 00:12:38 +00:00
Craig Topper
b7493bfcda [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
2017-02-20 23:38:51 +00:00
Craig Topper
575ba996f6 [X86] FileCheckize one of the rotate tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295681 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-20 23:38:48 +00:00
Davide Italiano
3abe103b2e [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
2017-02-20 22:51:42 +00:00
Craig Topper
c4d575e7fe [X86] FileCheckize one of the rotate tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295676 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-20 19:44:10 +00:00
Craig Topper
cce48e320d [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
2017-02-20 17:44:09 +00:00
Simon Pilgrim
8ea8e13dbf [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
2017-02-20 15:57:14 +00:00
Daniel Sanders
46f84bdef4 [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
2017-02-20 15:30:43 +00:00
Simon Pilgrim
51a07570a2 [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
2017-02-20 15:20:37 +00:00
Simon Pilgrim
e7bc874831 [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
2017-02-20 15:16:43 +00:00
Igor Breger
05a06cba9e [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
2017-02-20 14:16:29 +00:00
Alexey Bataev
b0f1c39d24 [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
2017-02-20 12:41:16 +00:00
Simon Pilgrim
03eb1209fc [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
2017-02-20 12:16:38 +00:00
Sanne Wouda
0c9892060a [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
2017-02-20 12:05:07 +00:00
Simon Pilgrim
460a0032b6 [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
2017-02-20 11:55:58 +00:00
Simon Dardis
5b71a58dbb [mips] Add test for mul macro variants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295648 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-20 10:53:03 +00:00
Craig Topper
43e46dfa9b [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
2017-02-20 07:00:40 +00:00
Craig Topper
e67b3cf556 [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
2017-02-20 07:00:37 +00:00
Craig Topper
415a83febd [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
2017-02-20 07:00:34 +00:00
Craig Topper
5e39baff22 [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
2017-02-20 07:00:31 +00:00
Craig Topper
5686a0d2ba [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
2017-02-20 02:47:42 +00:00
Craig Topper
ffea086747 [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
2017-02-20 00:37:23 +00:00
Craig Topper
db343e334d [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
2017-02-20 00:37:20 +00:00
Daniel Jasper
7c861d9e37 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
2017-02-19 23:26:00 +00:00
Craig Topper
97295ca181 [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
2017-02-19 21:32:15 +00:00
Simon Pilgrim
f8d4b524dd [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
2017-02-19 19:40:31 +00:00
Craig Topper
07a0236401 [AVX-512] Add patterns to recognize masked vpternlog when the passthrough operand is not operand 0.
This uses a SDNodeXForm to swizzle the appropriate immediate bits to allow this to be matched.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295612 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-19 19:36:58 +00:00
Craig Topper
1a9a1132e0 [AVX-512] Add test cases that show failure to select masked VPTERNLOG when a select is used to force the passthru operand to be not operand 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295611 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-19 19:36:54 +00:00
Simon Pilgrim
0c9c0d47aa [X86][SSE] Enable initial support for domain crossing at high shuffle combine depths.
As discussed on D27692, this permits another domain to be used to combine a shuffle at high depths.

We currently set the required depth at 4 or more combined shuffles, this is probably too high for most targets but is a good starting point and already helps avoid a number of costly variable shuffles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295608 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-19 17:19:38 +00:00
Craig Topper
9ca276657a [AVX-512] Add broadcast VPTERNLOG instructions to special case commuting switch.
The instructions are marked commutable, but without special handling we don't get the immediate correct.

While here also remove the masked memory forms that aren't commutable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295602 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-19 08:03:26 +00:00
Craig Topper
1f1330b623 [AVX-512] Add patterns to show missed opportunities for folding vpternlog with broadcast loads. Also demonstrates a bug in the commuting of broadcast vpternlog instructions when we are able to select them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295601 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-19 08:03:23 +00:00
Daniel Berlin
1ca7d1765a Re-add debugcounter.ll with Requires: Asserts so that it only triggers when asserts are on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295598 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-19 06:45:02 +00:00
Daniel Berlin
87d7001dbd Which, in turn, causes build bots to fail that have it unexpectedly passing. So remove debugcounter.ll for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295597 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-19 04:56:07 +00:00
Daniel Berlin
996ea533d7 XFAIL this test until we figure out what to do here, since it will fail if NDEBUG defined
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295596 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-19 04:55:02 +00:00
Daniel Berlin
2287817fa9 Add a DebugCounter for PredicateInfo renaming, and an associated test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295594 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-19 04:29:01 +00:00
NAKAMURA Takumi
7cca07f9d6 llvm/test/CodeGen/AMDGPU/r600.alu-limits.ll should require +Asserts. This would run into infinite loop anyways with -Asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295591 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-19 02:31:06 +00:00
Daniel Berlin
072a5a0f52 NewGVN: Start making use of predicateinfo pass.
Summary: This begins using the predicateinfo pass in NewGVN.

Reviewers: davide

Subscribers: llvm-commits, Prazek

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295583 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-18 23:06:50 +00:00
Daniel Berlin
33e17b4040 PredicateInfo: Clean up predicate info a little, using insertion
helpers, and fixing support for the renaming the comparison.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295581 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-18 23:06:38 +00:00
Sanjay Patel
2b341046dd [InstCombine] add nsw/nuw X, signbit --> or X, signbit
Changing to 'or' (rather than 'xor' when no wrapping flags are set)
allows icmp simplifies to happen as expected.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295574 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-18 22:20:09 +00:00