llvm-project/llvm/test/Transforms/LoopVectorize/X86
Sjoerd Meijer 9529597cf4 Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding."
This was reverted because of a miscompilation. At closer inspection, the
problem was actually visible in a changed llvm regression test too. This
one-line follow up fix/recommit will splat the IV, which is what we are trying
to avoid if unnecessary in general, if tail-folding is requested even if all
users are scalar instructions after vectorisation. Because with tail-folding,
the splat IV will be used by the predicate of the masked loads/stores
instructions. The previous version omitted this, which caused the
miscompilation. The original commit message was:

If tail-folding of the scalar remainder loop is applied, the primary induction
variable is splat to a vector and used by the masked load/store vector
instructions, thus the IV does not remain scalar. Because we now mark
that the IV does not remain scalar for these cases, we don't emit the vector IV
if it is not used. Thus, the vectoriser produces less dead code.

Thanks to Ayal Zaks for the direction how to fix this.
2020-05-13 13:50:09 +01:00
..
already-vectorized.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
avx1.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
avx512.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
consecutive-ptr-cg-bug.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
consecutive-ptr-uniforms.ll [LV] Scalar with predication must not be uniform 2019-12-03 19:50:24 +02:00
constant-fold.ll Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
constant-vector-operand.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
conversion-cost.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
cost-model-assert.ll [LoopVectorize] add test that asserted after cost model change (PR43582); NFC 2019-10-07 14:48:27 +00:00
cost-model.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
float-induction-x86.ll [InstComine] Forego of one-use check in `(X - (X & Y)) --> (X & ~Y)` if Y is a constant 2020-03-06 21:39:07 +03:00
fneg-cost.ll [LoopVectorize] Add FNeg instruction support 2019-05-30 18:19:35 +00:00
force-ifcvt.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fp32_to_uint32-cost-model.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fp64_to_uint32-cost-model.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00: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 Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
gather-cost.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
gather-vs-interleave.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
gather_scatter.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
gcc-examples.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
illegal-parallel-loop-uniform-write.ll Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
imprecise-through-phis.ll Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
int128_no_gather.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
interleave_short_tc.ll [LV] Move interleave_short_tc.ll into the X86 directory to hopefully make fix non-X86 bots. 2019-11-01 10:41:18 -07:00
interleaved-accesses-large-gap.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
interleaved-accesses-waw-dependency.ll [LV] Fix test failure in a Release build. 2019-08-02 08:33:41 +00:00
interleaving.ll [CostModel][X86] Improve extract/insert element costs (PR43605) 2020-02-27 15:54:13 +00:00
invariant-load-gather.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
invariant-store-vectorization.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
lit.local.cfg [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
load-deref-pred.ll Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
masked_load_store.ll Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
max-mstore.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
metadata-enable.ll Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
min-trip-count-switch.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
mul_slm_16bit.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
no-vector.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
no_fpmath.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
no_fpmath_with_hotness.ll [LV] Interleaving should not exceed estimated loop trip count. 2019-10-28 10:58:22 -07:00
nontemporal.ll [LV] Suppress vectorization in some nontemporal cases 2019-06-17 17:20:08 +00:00
optsize.ll Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
outer_loop_test1_no_explicit_vect_width.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
parallel-loops-after-reg2mem.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
parallel-loops.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
powof2div.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr23997.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr34438.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr35432.ll Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
pr36524.ll Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
pr39160.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr42674.ll [X86] Replace -mcpu with -mattr on some tests. 2019-09-06 21:48:44 +00:00
propagate-metadata.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
ptr-indvar-crash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
rauw-bug.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
reduction-crash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
reduction-fastmath.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
reduction-small-size.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
redundant-vf2-cost.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
reg-usage-debug.ll recommit: [LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize 2019-10-12 02:53:04 +00:00
reg-usage.ll recommit: [LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize 2019-10-12 02:53:04 +00:00
register-assumption.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
scatter_crash.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
slm-no-vectorize.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
small-size.ll Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
strided_load_cost.ll Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
struct-store.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
svml-calls-finite.ll [LoopVectorize] Move testing for SVML vectorization of exp2f_finite/exp2_finite from svml-calls.ll to svml-calls-finite.ll where the finite versions of log, pow, and exp already were. 2020-04-08 18:13:55 -07:00
svml-calls.ll [LoopVectorize] Move testing for SVML vectorization of exp2f_finite/exp2_finite from svml-calls.ll to svml-calls-finite.ll where the finite versions of log, pow, and exp already were. 2020-04-08 18:13:55 -07:00
tail_folding_and_assume_safety.ll llc: Change behavior of -mcpu with existing attribute 2020-01-07 10:10:25 -05:00
tail_loop_folding.ll [LV] Strip wrap flags from vectorized reductions 2019-12-20 14:48:53 +02:00
tripcount.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
uint64_to_fp64-cost-model.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
uniform-phi.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
uniform_load.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
uniformshift.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
unroll-pm.ll [PassManagerBuilder] Add option for interleaved loops, for loop vectorize. 2019-04-30 21:29:20 +00:00
unroll-small-loops.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
unroll_selection.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
veclib-calls.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vect.omp.force.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vect.omp.force.small-tc.ll Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
vector-scalar-select-cost.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vector_max_bandwidth.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vector_ptr_load_store.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vectorization-remarks-loopid-dbg.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vectorization-remarks-missed.ll [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion 2019-06-19 10:50:47 +00:00
vectorization-remarks-profitable.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
vectorization-remarks.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vectorize-only-for-real.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
x86-interleaved-accesses-masked-group.ll Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
x86-pr39099.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
x86-predication.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
x86_fp80-interleaved-access.ll [LV] Deny irregular types in interleavedAccessCanBeWidened 2019-06-17 12:02:24 +00:00
x86_fp80-vector-store.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00