diff options
author | Dan Gohman <gohman@apple.com> | 2009-02-17 00:10:53 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-02-17 00:10:53 +0000 |
commit | 1a5e936c53acda949afd8fa21b5a837b1d9fede9 (patch) | |
tree | 36cf7b737192a813aeaff4ba7e6d47cb77fab645 | |
parent | 9fbb52db9831772a5f16a9eef69237e30bc90625 (diff) |
Simplify; fix some 80-column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64702 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/IndVarSimplify.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 4e7d5c76a0..e774905976 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -705,8 +705,9 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { // variable. while (!IndVars.empty()) { PHINode *PN = IndVars.back().first; - Value *NewVal = Rewriter.expandCodeFor(IndVars.back().second, InsertPt); - DOUT << "INDVARS: Rewrote IV '" << *IndVars.back().second << "' " << *PN + SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(IndVars.back().second); + Value *NewVal = Rewriter.expandCodeFor(AR, InsertPt); + DOUT << "INDVARS: Rewrote IV '" << *AR << "' " << *PN << " into = " << *NewVal << "\n"; NewVal->takeName(PN); @@ -718,9 +719,9 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { UI != UE; ++UI) { if (isa<SExtInst>(UI) && NoSignedWrap) { SCEVHandle ExtendedStart = - SE->getSignExtendExpr(cast<SCEVAddRecExpr>(IndVars.back().second)->getStart(), LargestType); + SE->getSignExtendExpr(AR->getStart(), LargestType); SCEVHandle ExtendedStep = - SE->getSignExtendExpr(cast<SCEVAddRecExpr>(IndVars.back().second)->getStepRecurrence(*SE), LargestType); + SE->getSignExtendExpr(AR->getStepRecurrence(*SE), LargestType); SCEVHandle ExtendedAddRec = SE->getAddRecExpr(ExtendedStart, ExtendedStep, L); if (LargestType != UI->getType()) @@ -732,9 +733,9 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { } if (isa<ZExtInst>(UI) && NoUnsignedWrap) { SCEVHandle ExtendedStart = - SE->getZeroExtendExpr(cast<SCEVAddRecExpr>(IndVars.back().second)->getStart(), LargestType); + SE->getZeroExtendExpr(AR->getStart(), LargestType); SCEVHandle ExtendedStep = - SE->getZeroExtendExpr(cast<SCEVAddRecExpr>(IndVars.back().second)->getStepRecurrence(*SE), LargestType); + SE->getZeroExtendExpr(AR->getStepRecurrence(*SE), LargestType); SCEVHandle ExtendedAddRec = SE->getAddRecExpr(ExtendedStart, ExtendedStep, L); if (LargestType != UI->getType()) |