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
const SCEV *Res = SCEVGCD::findGCD(SE, Expr->getOperand(i), GCD, &Rem);
if (Rem == Zero) {
PartialGCD = SE.getMulExpr(PartialGCD, Res);
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));
}
} else {
Operands.push_back(Expr->getOperand(i));
}