diff options
| author | Dan Gohman <gohman@apple.com> | 2010-05-04 01:12:27 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-05-04 01:12:27 +0000 |
| commit | 638ef70a0a8f70c80433942d9c6ae13a9ecf16b9 (patch) | |
| tree | 73edca301618e8981fa3c67ef81ecbfc212a9df1 | |
| parent | 0d9641c3e39cbd2e435a40de5b58160f6adf6dd8 (diff) | |
| download | external_llvm-638ef70a0a8f70c80433942d9c6ae13a9ecf16b9.zip external_llvm-638ef70a0a8f70c80433942d9c6ae13a9ecf16b9.tar.gz external_llvm-638ef70a0a8f70c80433942d9c6ae13a9ecf16b9.tar.bz2 | |
Use the SCEVAddRecExpr::getPostIncExpr utility function instead
of doing the same thing manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102997 91177308-0d34-0410-b5e6-96231b3b80d8
| -rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 758ad07..6870268 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -5049,15 +5049,13 @@ bool ScalarEvolution::isKnownPredicate(ICmpInst::Predicate Pred, if (isLoopEntryGuardedByCond( AR->getLoop(), Pred, AR->getStart(), RHS) && isLoopBackedgeGuardedByCond( - AR->getLoop(), Pred, - getAddExpr(AR, AR->getStepRecurrence(*this)), RHS)) + AR->getLoop(), Pred, AR->getPostIncExpr(*this), RHS)) return true; if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(RHS)) if (isLoopEntryGuardedByCond( AR->getLoop(), Pred, LHS, AR->getStart()) && isLoopBackedgeGuardedByCond( - AR->getLoop(), Pred, - LHS, getAddExpr(AR, AR->getStepRecurrence(*this)))) + AR->getLoop(), Pred, LHS, AR->getPostIncExpr(*this))) return true; // Otherwise see what can be done with known constant ranges. |
