Extend the IndVarSimplify support for promoting induction variables:
authorDan Gohman <gohman@apple.com>
Sat, 14 Feb 2009 02:31:09 +0000 (02:31 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 14 Feb 2009 02:31:09 +0000 (02:31 +0000)
commitaa03649af255fbbb049f393a2cf7d533da86d951
tree12fed7f5450f5fb49e8b0473b22f788e28f33277
parentf108e2eaaa788272a3ced1eef1bbb84f0d03b60c
Extend the IndVarSimplify support for promoting induction variables:
 - Test for signed and unsigned wrapping conditions, instead of just
   testing for non-negative induction ranges.
 - Handle loops with GT comparisons, in addition to LT comparisons.
 - Support more cases of induction variables that don't start at 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64532 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/IndVarSimplify.cpp
test/Transforms/IndVarsSimplify/promote-iv-to-eliminate-casts.ll