llvm-project/llvm/test/Transforms/LoopStrengthReduce/X86
Max Kazantsev d5e595b7a6 [LSR] Check SCEV on isZero() after extend. PR40514
When LSR first adds SCEVs to BaseRegs, it only does it if `isZero()` has
returned false. In the end, in invocation of `InsertFormula`, it asserts that
all values there are still not zero constants. However between these two
points, it makes some transformations, in particular extends them to wider
type.

SCEV does not give us guarantee that if `S` is not a constant zero, then
`sext(S)` is also not a constant zero. It might have missed some optimizing
transforms when it was calculating `S` and then made them when it took `sext`.
For example, it may happen if previously optimizing transforms were limited
by depth or somehow else.

This patch adds a bailout when we may end up with a zero SCEV after extension.

Differential Revision: https://reviews.llvm.org/D57565
Reviewed By: samparker

llvm-svn: 353136
2019-02-05 04:30:37 +00:00
..
2008-08-14-ShadowIV.ll
2009-11-10-LSRCrash.ll
2011-07-20-DoubleIV.ll
2011-11-29-postincphi.ll
2011-12-04-loserreg.ll
2012-01-13-phielim.ll Generalize MergeBlockIntoPredecessor. Replace uses of MergeBasicBlockIntoOnlyPred. 2018-06-20 22:01:04 +00:00
bin_power.ll [SCEV] Prohibit SCEV transformations for huge SCEVs 2019-01-31 06:19:25 +00:00
canonical-2.ll
canonical.ll
incorrect-offset-scaling.ll
ivchain-X86.ll [LoopStrengthReduce, x86] don't add cost for a cmp that will be macro-fused (PR35681) 2018-02-05 23:43:05 +00:00
ivchain-stress-X86.ll
lit.local.cfg
lsr-expand-quadratic.ll
lsr-filtering-scaledreg.ll
lsr-insns-1.ll [x86] auto-generate complete checks; NFC 2018-01-26 22:06:07 +00:00
lsr-insns-2.ll
macro-fuse-cmp.ll [LoopStrengthReduce, x86] don't add cost for a cmp that will be macro-fused (PR35681) 2018-02-05 23:43:05 +00:00
nested-loop.ll [LSR] Don't force bases of foldable formulae to the final type. 2018-02-01 06:38:34 +00:00
no_superflous_induction_vars.ll
pr17473.ll
pr28719.ll
pr40514.ll [LSR] Check SCEV on isZero() after extend. PR40514 2019-02-05 04:30:37 +00:00
sibling-loops.ll