llvm-project/llvm/test/Transforms/LoopVectorize/ARM
Florian Hahn 23c2f2e6b2
[LV] Mark increment of main vector loop induction variable as NUW.
This patch marks the induction increment of the main induction variable
of the vector loop as NUW when not folding the tail.

If the tail is not folded, we know that End - Start >= Step (either
statically or through the minimum iteration checks). We also know that both
Start % Step == 0 and End % Step == 0. We exit the vector loop if %IV +
%Step == %End. Hence we must exit the loop before %IV + %Step unsigned
overflows and we can mark the induction increment as NUW.

This should make SCEV return more precise bounds for the created vector
loops, used by later optimizations, like late unrolling.

At the moment quite a few tests still need to be updated, but before
doing so I'd like to get initial feedback to make sure I am not missing
anything.

Note that this could probably be further improved by using information
from the original IV.

Attempt of modeling of the assumption in Alive2:
https://alive2.llvm.org/ce/z/H_DL_g

Part of a set of fixes required for PR50412.

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D103255
2021-06-07 10:47:52 +01:00
..
arm-ieee-vectorize.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
arm-unroll.ll
gather-cost.ll
gcc-examples.ll
interleaved_cost.ll
lit.local.cfg
mve-gather-scatter-tailpred.ll [LV] Mark increment of main vector loop induction variable as NUW. 2021-06-07 10:47:52 +01:00
mve-icmpcost.ll [ARM] Tone down the MVE scalarization overhead 2021-03-19 18:30:11 +00:00
mve-interleaved-cost.ll [ARM] Tone down the MVE scalarization overhead 2021-03-19 18:30:11 +00:00
mve-known-trip-count.ll [LV] Account for tripcount when calculation vectorization profitability 2021-05-06 12:36:46 +01:00
mve-maskedldst.ll
mve-predstorecost.ll [ARM] Test for predicated scalar memops. NFC 2021-03-09 21:57:18 +00:00
mve-qabs.ll [LV] Mark increment of main vector loop induction variable as NUW. 2021-06-07 10:47:52 +01:00
mve-reduction-predselect.ll [LV] Mark increment of main vector loop induction variable as NUW. 2021-06-07 10:47:52 +01:00
mve-reduction-types.ll [LV] Mark increment of main vector loop induction variable as NUW. 2021-06-07 10:47:52 +01:00
mve-reductions.ll [LV] Mark increment of main vector loop induction variable as NUW. 2021-06-07 10:47:52 +01:00
mve-saddsatcost.ll [ARM] Tone down the MVE scalarization overhead 2021-03-19 18:30:11 +00:00
mve-selectandorcost.ll [LV] Mark increment of main vector loop induction variable as NUW. 2021-06-07 10:47:52 +01:00
mve-shiftcost.ll
mve-vldn.ll
pointer_iv.ll [LV] Mark increment of main vector loop induction variable as NUW. 2021-06-07 10:47:52 +01:00
prefer-tail-loop-folding.ll
scalar-block-cost.ll [LV] Fix scalar cost for tail predicated loops 2020-12-12 14:21:40 +00:00
sphinx.ll [LV] Mark increment of main vector loop induction variable as NUW. 2021-06-07 10:47:52 +01:00
tail-fold-multiple-icmps.ll [LV] Mark increment of main vector loop induction variable as NUW. 2021-06-07 10:47:52 +01:00
tail-folding-allowed.ll
tail-folding-counting-down.ll
tail-folding-loop-hint.ll
tail-folding-not-allowed.ll [LV] Mark increment of main vector loop induction variable as NUW. 2021-06-07 10:47:52 +01:00
tail-folding-prefer-flag.ll
tail-folding-reduces-vf.ll
tail-folding-reductions-allowed.ll
tail-folding-scalar-epilogue-fallback.ll [LV] Mark increment of main vector loop induction variable as NUW. 2021-06-07 10:47:52 +01:00
vector_cast.ll
width-detect.ll