From a83f78786e1e389c8e10f055d9489b7c890a4cce Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Tue, 8 Apr 2014 21:21:13 +0000 Subject: [PATCH] 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 --- lib/Analysis/ScalarEvolution.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } -- 2.34.1