llvm-project/llvm/test/Transforms/LoopVectorize/X86
Juneyoung Lee 8a156d1c27 [InstCombine] Fully disable select to and/or i1 folding
This is a patch that disables the poison-unsafe select -> and/or i1 folding.

It has been blocking D72396 and also has been the source of a few miscompilations
described in llvm.org/pr49688 .
D99674 conditionally blocked this folding and successfully fixed the latter one.
The former one was still blocked, and this patch addresses it.

Note that a few test functions that has `_logical` suffix are now deoptimized.
These are created by @nikic to check the impact of disabling this optimization
by copying existing original functions and replacing and/or with select.

I can see that most of these are poison-unsafe; they can be revived by introducing
freeze instruction. I left comments at fcmp + select optimizations (or-fcmp.ll, and-fcmp.ll)
because I think they are good targets for freeze fix.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D101191
2021-05-06 09:29:52 +09:00
..
already-vectorized.ll [test][NPM] Fix already-vectorized.ll under NPM 2020-10-19 13:11:13 -07:00
avx1.ll
avx512.ll [LV] Let selectVectorizationFactor reason directly on VectorizationFactor. 2021-04-20 09:54:45 +01:00
consecutive-ptr-cg-bug.ll
consecutive-ptr-uniforms.ll [SLP,LV] Use poison constant vector for shufflevector/initial insertelement 2021-01-06 11:22:50 +09:00
constant-fold.ll [IR] Let IRBuilder's CreateVectorSplat/CreateShuffleVector use poison as placeholder 2020-12-30 04:21:04 +09:00
constant-vector-operand.ll
conversion-cost.ll
cost-model-assert.ll Reland [SCEV] Improve modelling for (null) pointer constants 2021-03-13 16:05:34 +03:00
cost-model.ll
float-induction-x86.ll [LoopVectorize] relax FMF constraint for FP induction 2021-03-18 08:11:22 -04:00
fneg-cost.ll
force-ifcvt.ll
fp32_to_uint32-cost-model.ll
fp64_to_uint32-cost-model.ll
fp80-widest-type.ll [LV] Make sure the MaxVF is a power-of-2 by rounding down. 2020-06-02 10:40:49 +01:00
fp_to_sint8-cost-model.ll [X86][CostModel] Improve costs for fp_to_uint/fp_to_sint for vXi8/vXi16/v2i32 results. 2020-04-27 10:35:15 -07:00
funclet.ll
gather-cost.ll
gather-vs-interleave.ll
gather_scatter.ll [X86][CostModel] X86TTIImpl::getShuffleCost(): subvector insertions are cheap 2021-04-19 13:24:58 +03:00
gcc-examples.ll
illegal-parallel-loop-uniform-write.ll [LV] Generate RT checks up-front and remove them if required. 2021-03-01 10:48:04 +00:00
imprecise-through-phis.ll [LoopUtils] Fix neutral value for vector.reduce.fadd 2020-10-29 21:45:13 +01:00
int128_no_gather.ll
interleave_short_tc.ll
interleaved-accesses-large-gap.ll [VectorUtils] Do not try to add indices matching tombstone/empty values. 2021-01-18 11:18:28 +00:00
interleaved-accesses-waw-dependency.ll
interleaving.ll [IR] Let IRBuilder's CreateVectorSplat/CreateShuffleVector use poison as placeholder 2020-12-30 04:21:04 +09:00
intrinsiccost.ll [LV] Let selectVectorizationFactor reason directly on VectorizationFactor. 2021-04-20 09:54:45 +01:00
invariant-load-gather.ll [NFCI] SCEVExpander: emit intrinsics for integral {u,s}{min,max} SCEV expressions 2021-03-06 21:52:46 +03:00
invariant-store-vectorization.ll [NFCI] SCEVExpander: emit intrinsics for integral {u,s}{min,max} SCEV expressions 2021-03-06 21:52:46 +03:00
libm-vector-calls-VF2-VF8.ll Initial support for vectorization using Libmvec (GLIBC vector math library) 2020-10-22 16:01:39 -04:00
libm-vector-calls-finite.ll Initial support for vectorization using Libmvec (GLIBC vector math library) 2020-10-22 16:01:39 -04:00
libm-vector-calls.ll Initial support for vectorization using Libmvec (GLIBC vector math library) 2020-10-22 16:01:39 -04:00
lit.local.cfg
load-deref-pred.ll [nofree] Restrict semantics to memory visible to caller 2021-04-16 11:38:55 -07:00
masked_load_store.ll [LoopVectorize] Fix VPRecipeBuilder::createEdgeMask to correctly generate the mask 2021-02-14 21:12:34 +09:00
max-mstore.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
metadata-enable.ll [SLP,LV] Use poison constant vector for shufflevector/initial insertelement 2021-01-06 11:22:50 +09:00
min-trip-count-switch.ll
mul_slm_16bit.ll
no-vector.ll
no_fpmath.ll [LV] Consider Loop Unroll Hints When Making Interleave Decisions 2021-04-28 17:27:52 -04:00
no_fpmath_with_hotness.ll
nontemporal.ll
optsize.ll [SLP,LV] Use poison constant vector for shufflevector/initial insertelement 2021-01-06 11:22:50 +09:00
outer_loop_test1_no_explicit_vect_width.ll [VPlan] Manage pairs of incoming (VPValue, VPBB) in VPWidenPHIRecipe. 2021-02-22 09:44:25 +00:00
parallel-loops-after-reg2mem.ll
parallel-loops.ll
powof2div.ll
pr23997.ll [NFCI] SCEVExpander: emit intrinsics for integral {u,s}{min,max} SCEV expressions 2021-03-06 21:52:46 +03:00
pr34438.ll [IR] Let IRBuilder's CreateVectorSplat/CreateShuffleVector use poison as placeholder 2020-12-30 04:21:04 +09:00
pr35432.ll [NFCI] SCEVExpander: emit intrinsics for integral {u,s}{min,max} SCEV expressions 2021-03-06 21:52:46 +03:00
pr36524.ll [LV] Collect dead induction truncates 2020-10-08 08:28:58 +01:00
pr39160.ll
pr42674.ll [SimplifyCFG] MergeBlockIntoPredecessor() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
pr48340.ll Support intrinsic overloading on unnamed types 2021-03-19 14:34:25 +01:00
propagate-metadata.ll
ptr-indvar-crash.ll
rauw-bug.ll
reduction-crash.ll [BasicAA] Rename -disable-basicaa to -disable-basic-aa to be consistent with the canonical name "basic-aa" 2020-06-26 20:55:44 -07:00
reduction-fastmath.ll [LoopVectorize] Change the identity element for FAdd 2021-04-06 12:13:43 +01:00
reduction-small-size.ll
redundant-vf2-cost.ll
reg-usage-debug.ll
reg-usage.ll [test] Fix reg-usage.ll under NPM 2020-12-20 15:41:29 -08:00
register-assumption.ll
runtime-limit.ll Recommit "[LV] Move runtime pointer size check to LVP::plan()." 2021-03-29 16:14:27 +01:00
scatter_crash.ll
slm-no-vectorize.ll
small-size.ll [LV] Account for the cost of predication of scalarized load/store 2021-03-17 10:57:50 +00:00
strided_load_cost.ll [SLP,LV] Use poison constant vector for shufflevector/initial insertelement 2021-01-06 11:22:50 +09:00
struct-store.ll
svml-calls-finite.ll SVML support for log10, sqrt 2020-09-15 17:29:44 -07:00
svml-calls.ll Revert SVML support for sqrt 2020-10-05 08:13:11 -07:00
tail_folding_and_assume_safety.ll
tail_loop_folding.ll [SLP,LV] Use poison constant vector for shufflevector/initial insertelement 2021-01-06 11:22:50 +09:00
tripcount.ll
uint64_to_fp64-cost-model.ll
uniform-phi.ll
uniform_load.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
uniform_mem_op.ll [SLP,LV] Use poison constant vector for shufflevector/initial insertelement 2021-01-06 11:22:50 +09:00
uniformshift.ll
unroll-pm.ll
unroll-small-loops.ll
unroll_selection.ll
veclib-calls.ll [test] Add -inject-tli-mapping to -loop-vectorize -vector-library tests 2020-08-25 11:55:11 -07:00
vect.omp.force.ll
vect.omp.force.small-tc.ll [SLP,LV] Use poison constant vector for shufflevector/initial insertelement 2021-01-06 11:22:50 +09:00
vector-scalar-select-cost.ll
vector_max_bandwidth.ll
vector_ptr_load_store.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
vectorization-remarks-loopid-dbg.ll
vectorization-remarks-missed.ll [NPM][test] Fix some LoopVectorize tests under NPM 2020-10-19 12:05:37 -07:00
vectorization-remarks-profitable.ll
vectorization-remarks.ll
vectorize-only-for-real.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
x86-interleaved-accesses-masked-group.ll [InstCombine] Fully disable select to and/or i1 folding 2021-05-06 09:29:52 +09:00
x86-pr39099.ll [test, LoopVectorize] Fix use of var defined in CHECK-NOT 2021-03-30 15:32:30 +01:00
x86-predication.ll [LoopVectorize] Fix bug where predicated loads/stores were dropped 2021-04-22 15:05:54 +00:00
x86_fp80-interleaved-access.ll
x86_fp80-vector-store.ll