Fix LSR: don't normalize quadratic recurrences.
authorAndrew Trick <atrick@apple.com>
Fri, 25 Oct 2013 21:35:52 +0000 (21:35 +0000)
committerAndrew Trick <atrick@apple.com>
Fri, 25 Oct 2013 21:35:52 +0000 (21:35 +0000)
commit8aa8cea3e964796187f8682e502a8446b3ce02e1
tree35f1ab7b52c361b2082d72337ccc30234ebc760b
parent0f978ea45945bf3b8f2ce20f46d78dc840894623
Fix LSR: don't normalize quadratic recurrences.

Partial fix for PR17459: wrong code at -O3 on x86_64-linux-gnu
(affecting trunk and 3.3)

ScalarEvolutionNormalization was attempting to normalize by adding and
subtracting strides. Chained recurrences don't work that way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193437 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolutionNormalization.cpp
test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll