From: Daniel Dunbar Date: Fri, 12 Feb 2010 17:27:08 +0000 (+0000) Subject: Revert "Reverse the order for collecting the parts of an addrec. The order", it X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ae086250853cb901d59943bd98aa9a0ad9a85b4d;p=oota-llvm.git Revert "Reverse the order for collecting the parts of an addrec. The order", it is breaking llvm-gcc bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95988 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index ccb00f14bc8..73d3f9db896 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(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(S)) {