[IRCE] Fix how IRCE checks for no-sign-overflow.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 24 Mar 2015 19:29:22 +0000 (19:29 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 24 Mar 2015 19:29:22 +0000 (19:29 +0000)
commitfe1187ead7bedf7b56e687998da759355fba685e
tree0de6302e2cbd84fe811ba5b6b110090bb153127a
parent33a864aae22acdca97244e8cca29b1b9a26ab881
[IRCE] Fix how IRCE checks for no-sign-overflow.

IRCE requires the induction variables it handles to not sign-overflow.
The current scheme of checking if sext({X,+,S}) == {sext(X),+,sext(S)}
fails when SCEV simplifies sext(X) too.  After this change we //also//
check no-signed-wrap by looking at the flags set on the SCEVAddRecExpr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233102 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp