From: Sebastian Pop Date: Tue, 8 Apr 2014 21:21:13 +0000 (+0000) Subject: divide by the result of the gcd X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a83f78786e1e389c8e10f055d9489b7c890a4cce;p=oota-llvm.git divide by the result of the gcd used to fail with 'Step should divide Start with no remainder.' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205802 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 6ccf8aac3b8..fdb15629f43 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -7138,7 +7138,7 @@ public: const SCEV *Res = SCEVGCD::findGCD(SE, Expr->getOperand(i), GCD, &Rem); if (Rem == Zero) { PartialGCD = SE.getMulExpr(PartialGCD, Res); - Operands.push_back(divide(SE, Expr->getOperand(i), GCD)); + Operands.push_back(divide(SE, Expr->getOperand(i), Res)); } else { Operands.push_back(Expr->getOperand(i)); }