diff options
author | Dan Gohman <gohman@apple.com> | 2010-02-12 11:08:26 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-02-12 11:08:26 +0000 |
commit | f21a2f15aa967f16c2b8c71da3009c583890a059 (patch) | |
tree | 05c33261b608b370d48ea409a59831bee1151b10 /lib/Transforms/Scalar/LoopStrengthReduce.cpp | |
parent | 572645cf84060c0fc25cb91d38cb9079918b3a88 (diff) |
Reverse the order for collecting the parts of an addrec. The order
doesn't matter, except that ScalarEvolution tends to need less time
to fold the results this way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 73d3f9db89..ccb00f14bc 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -1902,10 +1902,10 @@ static void CollectSubexprs(const SCEV *S, const SCEVConstant *C, } else if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) { // Split a non-zero base out of an addrec. if (!AR->getStart()->isZero()) { - CollectSubexprs(AR->getStart(), C, Ops, SE); CollectSubexprs(SE.getAddRecExpr(SE.getIntegerSCEV(0, AR->getType()), AR->getStepRecurrence(SE), AR->getLoop()), C, Ops, SE); + CollectSubexprs(AR->getStart(), C, Ops, SE); return; } } else if (const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(S)) { |