[ARM] Loop Strength Reduction crashes when targeting ARM or Thumb.
authorAlexandros Lamprineas <alexandros.lamprineas@arm.com>
Wed, 9 Nov 2016 08:53:07 +0000 (08:53 +0000)
committerAlexandros Lamprineas <alexandros.lamprineas@arm.com>
Wed, 9 Nov 2016 08:53:07 +0000 (08:53 +0000)
commit0ee3ec2fe474d4746173518c96b4f8c894e21bf4
tree9cbcb1b84ebd27a841fa64899a1cd23be50c1a57
parent8530137de5577bb0d77adeb853261a005ee10207
[ARM] Loop Strength Reduction crashes when targeting ARM or Thumb.

Scalar Evolution asserts when not all the operands of an Add Recurrence
Expression are loop invariants. Loop Strength Reduction should only
create affine Add Recurrences, so that both the start and the step of
the expression are loop invariants.

Differential Revision: https://reviews.llvm.org/D26185

llvm-svn: 286347
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
llvm/test/Transforms/LoopStrengthReduce/ARM/addrec-is-loop-invariant.ll [new file with mode: 0644]