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 | 2cd8982002c18cf09e0f6bf97ce1c308a9397f03 (patch) | |
| tree | aff801a1c8c61d6aa2749501f88c49e3f599eb6a /llvm/lib | |
| parent | f2c6198eefe5a35c63d98944a683d82504b5042a (diff) | |
| download | bcm5719-llvm-2cd8982002c18cf09e0f6bf97ce1c308a9397f03.tar.gz bcm5719-llvm-2cd8982002c18cf09e0f6bf97ce1c308a9397f03.zip | |
Simplify; fix some 80-column violations.
llvm-svn: 64702
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index 4e7d5c76a0a..e774905976e 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/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()) |

