llvm-project/llvm/test/Transforms/PhaseOrdering/X86
Sanjay Patel e71b81cab0 [InstCombine] canonicalize trunc + insert as bitcast + shuffle, part 1 (2nd try)
The first attempt was reverted because a clang test changed
unexpectedly - the file is already marked with a FIXME, so
I just updated it this time to pass.

Original commit message:
This is the main patch for converting a truncated scalar that is
inserted into a vector to bitcast+shuffle. We could go either way
on patterns like this, but this direction will allow collapsing a
pair of these sequences on the motivating example from issue

The patch is split into 3 parts to make it easier to see the
progression of tests diffs. We allow inserting/shuffling into a
different size vector for flexibility, so there are several test
variations. The length-changing is handled by shortening/padding
the shuffle mask with undef elements.

In part 1, handle the basic pattern:
inselt undef, (trunc T), IndexC --> shuffle (bitcast T), IdentityMask

Proof for the endian-dependency behaving as expected:
https://alive2.llvm.org/ce/z/BsA7yC

The TODO items for handling shifts and insert into an arbitrary base
vector value are implemented as follow-ups.

Differential Revision: https://reviews.llvm.org/D138872
2022-11-30 14:52:20 -05:00
..
SROA-after-final-loop-unrolling-2.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
SROA-after-final-loop-unrolling.ll [Pipelines] Introduce SROA after (final, run-time) loop unrolling 2022-11-17 21:31:30 +03:00
SROA-after-loop-unrolling.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
addsub-inseltpoison.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
addsub.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
ctlz-loop.ll [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
earlycse-after-simplifycfg-two-entry-phi-node-folding.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
excessive-unrolling.ll [InstCombine] remove multi-use add demanded constant fold 2022-09-18 14:23:43 -04:00
hoist-load-of-baseptr.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
horiz-math-inseltpoison.ll
horiz-math.ll
lit.local.cfg
loadcombine.ll [AggressiveInstCombine] Load merge the reverse load pattern of consecutive loads. 2022-10-19 11:22:58 +01:00
loop-idiom-vs-indvars.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
masked-memory-ops.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
merge-functions.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
nancvt.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
peel-before-lv-to-enable-vectorization.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
pixel-splat.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
pr38280.ll [ValueTracking] computeKnownBits - attempt to use a branch condition feeding a phi to improve known bits range (PR38280) 2022-08-16 16:54:44 +01:00
pr48844-br-to-switch-vectorization.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
pr50555.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
pr52078.ll [AggressiveInstCombine] Remove legacy PM pass 2022-11-15 14:35:15 -08:00
pr52253.ll [AggressiveInstCombine] Remove legacy PM pass 2022-11-15 14:35:15 -08:00
pr52289.ll
scalarization-inseltpoison.ll
scalarization.ll
shuffle-inseltpoison.ll
shuffle.ll
simplifycfg-late.ll
speculation-vs-tbaa.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
spurious-peeling.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
store-constant-merge.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
unsigned-multiply-overflow-check.ll [CostModel][X86] getTypeBasedIntrinsicInstrCost - convert to CostKindTblEntry 2022-09-04 17:59:08 +01:00
vdiv-nounroll.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
vdiv.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
vec-load-combine.ll [InstCombine] canonicalize trunc + insert as bitcast + shuffle, part 1 (2nd try) 2022-11-30 14:52:20 -05:00
vec-shift.ll [PhaseOrdering] add test for issue #50778; NFC 2022-09-23 12:12:13 -04:00
vector-math.ll
vector-reduction-known-first-value.ll [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
vector-reductions-expanded.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00
vector-reductions-logical.ll Revert "reland e5581df60a [SimplifyCFG] accumulate bonus insts cost" 2022-10-25 12:15:39 -04:00
vector-reductions.ll PhaseOrdering: Convert tests to opaque pointers 2022-11-27 21:26:41 -05:00