Commit Graph

27918 Commits

Author SHA1 Message Date
Petr Pavlu 7885d2ca5a [GlobalISel] Fix choice of instruction selector for AArch64 at -O0 with -global-isel=0
Commit rL347861 introduced an unintentional change in the behaviour when
compiling for AArch64 at -O0 with -global-isel=0. Previously, explicitly
disabling GlobalISel resulted in using FastISel but an updated condition
in the commit changed it to using SelectionDAG. The patch fixes this
condition and slightly better organizes the code that chooses the
instruction selector.

Fixes PR40131.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350626 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 14:19:06 +00:00
Tim Northover 8af0c56aa2 AArch64: avoid splitting vector truncating stores.
We have code to split vector splats (of zero and non-zero) for performance
reasons, but it ignores the fact that a store might be truncating.

Actually, truncating stores are formed for vNi8 and vNi16 types. Since the
truncation is from a legal type, the size of the store is always <= 64-bits and
so they don't actually benefit from being split up anyway, so this patch just
disables that transformation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350620 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 13:30:27 +00:00
Sam Parker c108e2cef7 [ARM] Add missing patterns for DSP muls
Using a PatLeaf for sext_16_node allowed matching smulbb and smlabb
instructions once the operands had been sign extended. But we also
need to use sext_inreg operands along with sext_16_node to catch a
few more cases that enable use to remove the unnecessary sxth.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350613 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 10:12:36 +00:00
Matt Arsenault 2363fe8f86 AMDGPU/GlobalISel: Introduce vcc reg bank
I'm not entirely sure this is the correct thing
to do with the global isel philosophy, but I think
this is necessary to handle how differently SGPRs
are used normally vs. from a condition.

For example, it makes sense to allow a copy
from a VGPR to an SGPR, but it makes no sense
to allow a copy from VGPRs to SGPRs used as
select mask.

This avoids regbankselecting strange code with
a truncate feeding directly into a condition field.
Now a copy is forced from sgpr(s1) to vcc, which is
more sensible to handle.

Some of these issues could probably avoided with making enough
operations resulting in i1 illegal. I think we can't avoid
this register bank for legality.

For example, an i1 and where one source is from a truncate, and
one source is a compare needs some kind of copy inserted to
make sure both are in condition registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350611 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 06:30:53 +00:00
Thomas Lively 37a984b8bc [WebAssembly] Massive instruction renaming
Summary:
An automated renaming of all the instructions listed at
https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329
as well as some similarly-named identifiers.

Reviewers: aheejin, dschuff, aardappel

Subscribers: sbc100, jgravelle-google, eraman, sunfish, jfb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350609 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 06:25:55 +00:00
Matt Arsenault a62ff5dd41 AMDGPU/GlobalISel: Legalize concat_vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350598 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 01:30:02 +00:00
Matt Arsenault 1720133d5c RegBankSelect: Fix copy insertion point for terminators
If a copy was needed to handle the condition of brcond, it was being
inserted before the defining instruction. Add tests for iterator edge
cases.

I find the existing code here suspect for the case where it's looking
for terminators that modify the register. It's going to insert a copy
in the middle of the terminators, which isn't allowed (it might be
necessary to have a COPY_terminator if anybody actually needs this).

Also legalize brcond for AMDGPU.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350595 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 01:22:47 +00:00
Matt Arsenault 2bb35671cc AMDGPU/GlobalISel: Disallow VGPR->SCC copies
This fixes using scalar adds when only the carry in is a VGPR
using greedy regbankselect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350593 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 01:13:20 +00:00
Matt Arsenault 2128ba0c85 AMDGPU/GlobalISel: RegBankSelect for carry-in
I'm not sure we should be allowing the truncate
to s1 for the inputs. It may be necessary to
create a new VCC reg bank.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350592 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 01:09:09 +00:00
Matt Arsenault 9054ffcfc8 AMDGPU/GlobalISel: RegBankSelect for add/sub with carry out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350589 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 01:03:58 +00:00
Matt Arsenault 68e5e50395 AMDGPU/GlobalISel: InstrMapping for G_UNMERGE_VALUES
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350588 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 00:46:19 +00:00
Wei Mi a2285277c7 [RegisterCoalescer] dst register's live interval needs to be updated when
merging a src register in ToBeUpdated set.

This is to fix PR40061 related with https://reviews.llvm.org/rL339035.

In https://reviews.llvm.org/rL339035, live interval of source pseudo register
in rematerialized copy may be saved in ToBeUpdated set and its update may be
postponed.

In PR40061, %t2 = %t1 is rematerialized and %t1 is added into toBeUpdated set
to postpone its live interval update. After the rematerialization, the live
interval of %t1 is larger than necessary. Then %t1 is merged into %t3 and %t1
gets removed. After the merge, %t3 contains live interval larger than necessary.
Because %t3 is not in toBeUpdated set, its live interval is not updated after
register coalescing and it will break some assumption in regalloc.

The patch requires the live interval of destination register in a merge to be
updated if the source register is in ToBeUpdated.

Differential revision: https://reviews.llvm.org/D55867



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350586 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 00:26:11 +00:00
Craig Topper 10ecfd6944 Recommit r350554 "[X86] Remove AVX512VBMI2 concat and shift intrinsics. Replace with target independent funnel shift intrinsics."
The MSVC limit we hit on AutoUpgrade.cpp has been worked around for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350567 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 21:00:32 +00:00
Craig Topper e862164938 Revert r350554 "[X86] Remove AVX512VBMI2 concat and shift intrinsics. Replace with target independent funnel shift intrinsics."
The AutoUpgrade.cpp if/else cascade hit an MSVC limit again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350562 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 19:39:05 +00:00
Craig Topper 2d88ada4d7 [TargetLowering][AMDGPU] Remove the SimplifyDemandedBits function that takes a User and OpIdx. Stop using it in AMDGPU target for simplifyI24.
As we saw in D56057 when we tried to use this function on X86, it's unsafe. It allows the operand node to have multiple users, but doesn't prevent recursing past the first node when it does have multiple users. This can cause other simplifications earlier in the graph without regard to what bits are needed by the other users of the first node. Ideally all we should do to the first node if it has multiple uses is bypass it when its not needed by the user we started from. Doing any other transformation that SimplifyDemandedBits can do like turning ZEXT/SEXT into AEXT would result in an increase in instructions.

Fortunately, we already have a function that can do just that, GetDemandedBits. It will only make transformations that involve bypassing a node.

This patch changes AMDGPU's simplifyI24, to use a combination of GetDemandedBits to handle the multiple use simplifications. And then uses the regular SimplifyDemandedBits on each operand to handle simplifications allowed when the operand only has a single use. Unfortunately, GetDemandedBits simplifies constants more aggressively than SimplifyDemandedBits. This caused the -7 constant in the changed test to be simplified to remove the upper bits. I had to modify computeKnownBits to account for this by ignoring the upper 8 bits of the input.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350560 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 19:30:43 +00:00
Craig Topper 9d78d08a5c [X86] Remove AVX512VBMI2 concat and shift intrinsics. Replace with target independent funnel shift intrinsics.
Differential Revision: https://reviews.llvm.org/D56377

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350554 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 19:10:12 +00:00
Diogo N. Sampaio 08d38f01b3 [ARM] ComputeKnownBits to handle extract vectors
This patch adds the sign/zero extension done by
vgetlane to ARM computeKnownBitsForTargetNode.

Differential revision: https://reviews.llvm.org/D56098


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350553 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 19:01:47 +00:00
Simon Pilgrim 321f5ddb60 [X86] Add OR(AND(X,C),AND(Y,~C)) bit select tests
Based off work for D55935

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350548 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 18:07:56 +00:00
Sanjay Patel ef1bd283c2 [x86] add more tests for LowerToHorizontalOp(); NFC
These tests show missed optimizations and a miscompile
similar to PR40243 - https://bugs.llvm.org/show_bug.cgi?id=40243


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350533 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 16:10:14 +00:00
Rhys Perry 016461668f AMDGPU: test for uniformity of branch instruction, not its condition
Summary:
If a divergent branch instruction is marked as divergent by propagation
rule 2 in DivergencePropagator::exploreSyncDependency() and its condition
is uniform, that branch would incorrectly be assumed to be uniform.

Reviewers: arsenm, tstellar

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350532 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 15:52:28 +00:00
Matt Arsenault 57fed470f0 AMDGPU: Remove VS/SV mappings from select
These would violate the constant bus restriction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350517 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 13:21:36 +00:00
Simon Pilgrim 493c470215 Regenerate test.
Prep work towards enabling SimplifyDemandedBits vector support for TRUNCATE as discussed on D56118.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350514 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 12:21:13 +00:00
Simon Pilgrim 8adb73fcab Regenerate test.
Prep work towards enabling SimplifyDemandedBits vector support for TRUNCATE as discussed on D56118.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350513 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 12:20:35 +00:00
Craig Topper 4966d750d4 [X86] Update VBMI2 vshld/vshrd tests to use an immediate that doesn't require a modulo.
Planning to replace these with funnel shift intrinsics which would mask out the extra bits. This will help minimize test diffs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350504 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 05:58:53 +00:00
Craig Topper a3acf0b848 [X86] Add support for matching vector funnel shift to AVX512VBMI2 instructions.
Summary: AVX512VBMI2 supports a funnel shift by immediate and a funnel shift by a variable vector.

Reviewers: spatel, RKSimon

Reviewed By: RKSimon

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350498 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-06 18:10:18 +00:00
Craig Topper 16d8f6a1c9 [X86] Use two pmovmskbs in combineBitcastvxi1 for (i64 (bitcast (v64i1 (truncate (v64i8)))) on KNL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350481 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-05 22:42:58 +00:00
Craig Topper 1b1457fd62 [X86] Allow combinevxi1Bitcast to use pmovmskb on avx512 targets if the input is a truncate from v16i8/v32i8.
This is especially helpful on targets without avx512bw since we don't have a good way to convert from v16i8/v32i8 to v16i1/v32i1 for the truncate anyway. If we're just going to convert it to a GPR we might as well use pmovmskb to accomplish both.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350480 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-05 21:40:07 +00:00
Stanislav Mekhanoshin f04e8d9380 Added single use check to ShrinkDemandedConstant
Fixes cvt_f32_ubyte combine. performCvtF32UByteNCombine() could shrink
source node to demanded bits only even if there are other uses.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350475 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-05 19:20:00 +00:00
Craig Topper 4f4f190061 [X86] Regenerate test to merge 32-bit and 64-bit check lines. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350474 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-05 19:19:37 +00:00
Craig Topper 0716b2a298 [X86] Allow LowerTRUNCATE to use PACKUS/PACKSS for v16i16->v16i8 truncate when -mprefer-vector-width-256 is in effect and BWI is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350473 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-05 18:48:11 +00:00
Vyacheslav Zakharin e3c5a5113b Update the pr_datasz of .note.gnu.property section.
Patch by Xiang Zhang.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350436 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-04 21:25:01 +00:00
Craig Topper d096eb7cf0 [X86] Add INSERT_SUBVECTOR to ComputeNumSignBits
This adds support for calculating sign bits of insert_subvector. I based it on the computeKnownBits.

My motivating case is propagating sign bits information across basic blocks on AVX targets where concatenating using insert_subvector is common.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350432 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-04 20:50:59 +00:00
Sanjay Patel 9f623cb147 [x86] add tests for potential horizontal vector ops; NFC
These are modified versions of the FP tests from rL349923.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350430 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-04 20:14:53 +00:00
Sanjay Patel 3ce08bac2a [x86] lower extracted fadd/fsub to horizontal vector math; 2nd try
The 1st try for this was at rL350369, but it caused IR-level diffs because
our cost models differentiate custom vs. legal/promote lowering. So that was
reverted at rL350373. The cost models were fixed independently at rL350403,
so this is effectively the same patch as last time.

Original commit message:
This would show up if we fix horizontal reductions to narrow as they go along,
but it's an improvement for size and/or Jaguar (fast-hops) independent of that.

We need to do this late to not interfere with other pattern matching of larger
horizontal sequences.

We can extend this to integer ops in a follow-up patch.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350421 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-04 17:48:13 +00:00
Simon Pilgrim 98472a7053 [X86] Add VPSLLI/VPSRLI ((X >>u C1) << C2) SimplifyDemandedBits combine
Repeat of the generic SimplifyDemandedBits shift combine

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350399 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-04 15:43:43 +00:00
Simon Pilgrim fa35690842 [X86] Split immediate shifts tests. NFCI.
A future patch will combine logical shifts more aggressively.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350396 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-04 14:56:10 +00:00
Craig Topper d4316bc01b [X86] Add post-isel peephole to fold KAND+KORTEST into KTEST if only the zero flag is used.
Doing this late so we will prefer to fold the AND into a masked comparison first. That can be better for the live range of the mask register.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350374 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-04 00:10:58 +00:00
Sanjay Patel 6263c2b754 revert r350369: [x86] lower extracted fadd/fsub to horizontal vector math
There are non-codegen tests that need to be updated with this code change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350373 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-04 00:02:02 +00:00
Sanjay Patel 3622c84e6f [x86] lower extracted fadd/fsub to horizontal vector math
This would show up if we fix horizontal reductions to narrow as they go along, 
but it's an improvement for size and/or Jaguar (fast-hops) independent of that.

We need to do this late to not interfere with other pattern matching of larger 
horizontal sequences.

We can extend this to integer ops in a follow-up patch.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350369 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 23:16:19 +00:00
Heejin Ahn 0db40de6ca [WebAssembly] Optimize Irreducible Control Flow
Summary:
Irreducible control flow is not that rare, e.g. it happens in malloc and
3 other places in the libc portions linked in to a hello world program.
This patch improves how we handle that code: it emits a br_table to
dispatch to only the minimal necessary number of blocks. This reduces
the size of malloc by 33%, and makes it comparable in size to asm2wasm's
malloc output.

Added some tests, and verified this passes the emscripten-wasm tests run
on the waterfall (binaryen2, wasmobj2, other).

Reviewers: aheejin, sunfish

Subscribers: mgrang, jgravelle-google, sbc100, dschuff, llvm-commits

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

Patch by Alon Zakai (kripken)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350367 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 23:10:11 +00:00
Sanjay Patel b5f1a87f74 [x86] add 512-bit vector tests for horizontal ops; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350364 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 22:55:18 +00:00
Sanjay Patel b2dffa2256 [x86] add AVX512 runs for horizontal ops; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350362 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 22:42:32 +00:00
Craig Topper 822a4f8574 [X86] Add test case for D56283.
This tests a case where we need to be able to compute sign bits for two insert_subvectors that is a liveout of a basic block. The result is then used as a boolean vector in another basic block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350359 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 22:31:07 +00:00
Sanjay Patel 156e2dcece [x86] remove dead CHECK lines from test file; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350358 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 22:30:36 +00:00
Sanjay Patel 798ea3748c [x86] split tests for FP and integer horizontal math
These are similar patterns, but when you throw AVX512 onto the pile,
the number of variations explodes. For FP, we really don't care about
AVX1 vs. AVX2 for FP ops. There may be some superficial shuffle diffs,
but that's not what we're testing for here, so I removed those RUNs.

Separating by type also lets us specify 'sse3' for the FP file vs. 'ssse3'
for the integer file...because x86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350357 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 22:26:51 +00:00
Sanjay Patel b8e8b823ce [x86] add common FileCheck prefix to reduce assert duplication; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350356 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 22:11:14 +00:00
Sanjay Patel 7f75372216 [DAGCombiner][x86] scalarize binop followed by extractelement
As noted in PR39973 and D55558:
https://bugs.llvm.org/show_bug.cgi?id=39973
...this is a partial implementation of a fold that we do as an IR canonicalization in instcombine:

// extelt (binop X, Y), Index --> binop (extelt X, Index), (extelt Y, Index)

We want to have this in the DAG too because as we can see in some of the test diffs (reductions), 
the pattern may not be visible in IR.

Given that this is already an IR canonicalization, any backend that would prefer a vector op over 
a scalar op is expected to already have the reverse transform in DAG lowering (not sure if that's
a realistic expectation though). The transform is limited with a TLI hook because there's an
existing transform in CodeGenPrepare that tries to do the opposite transform.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350354 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 21:31:16 +00:00
Nirav Dave 40b2c31e67 [AVR] Update integration/blink.ll as we now generate sbi/cbi instructions.
Silence long standing test failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350353 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 21:25:39 +00:00
Alexander Timofeev bf5049eaf1 [AMDGPU] Fix scalar operand folding bug that causes SHOC performance regression.
Detailed description: SIFoldOperands::foldInstOperand iterates over the
operand uses calling the function that changes def-use iteratorson the
way. As a result loop exits immediately when def-use iterator is
changed. Hence, the operand is folded to the very first use instruction
only. This makes VGPR live along the whole basic block and increases
register pressure significantly. The performance drop observed in SHOC
DeviceMemory test is caused by this bug.

Proposed fix: collect uses to separate container for further processing
in another loop.

Testing: make check-llvm
SHOC performance test.

Reviewers: rampitec, ronlieb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350350 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 19:55:32 +00:00
Sanjay Patel a8887cf017 [x86] add tests for buildvector with extracted element; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350338 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 17:55:32 +00:00