summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-05-20 16:23:28 +0000
committerDan Gohman <gohman@apple.com>2010-05-20 16:23:28 +0000
commit6b733fc18973d69ffab823a53656a2bc3c26494f (patch)
treef1642df9624a2d51cab4b45bea3830c52fd5eaf7 /llvm/lib
parent29790edb93acc0cc8fa56e9b12eef61ca6afb00c (diff)
downloadbcm5719-llvm-6b733fc18973d69ffab823a53656a2bc3c26494f.tar.gz
bcm5719-llvm-6b733fc18973d69ffab823a53656a2bc3c26494f.zip
Minor code simplification.
llvm-svn: 104232
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index bca5e4f595b..f648560e487 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -467,14 +467,14 @@ static const SCEV *getExactSDiv(const SCEV *LHS, const SCEV *RHS,
bool Found = false;
for (SCEVMulExpr::op_iterator I = Mul->op_begin(), E = Mul->op_end();
I != E; ++I) {
+ const SCEV *S = *I;
if (!Found)
- if (const SCEV *Q = getExactSDiv(*I, RHS, SE,
+ if (const SCEV *Q = getExactSDiv(S, RHS, SE,
IgnoreSignificantBits)) {
- Ops.push_back(Q);
+ S = Q;
Found = true;
- continue;
}
- Ops.push_back(*I);
+ Ops.push_back(S);
}
return Found ? SE.getMulExpr(Ops) : 0;
}
OpenPOWER on IntegriCloud