git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208614
91177308-0d34-0410-b5e6-
96231b3b80d8
- if (Numerator == D.Zero) {
+ if (Numerator->isZero()) {
*Quotient = D.Zero;
*Remainder = D.Zero;
return;
*Quotient = D.Zero;
*Remainder = D.Zero;
return;
// Bail out when the Numerator is not divisible by one of the terms of
// the Denominator.
// Bail out when the Numerator is not divisible by one of the terms of
// the Denominator.
*Quotient = D.Zero;
*Remainder = Numerator;
return;
*Quotient = D.Zero;
*Remainder = Numerator;
return;
// Check whether Denominator divides one of the product operands.
const SCEV *Q, *R;
divide(SE, Op, Denominator, &Q, &R);
// Check whether Denominator divides one of the product operands.
const SCEV *Q, *R;
divide(SE, Op, Denominator, &Q, &R);
Qs.push_back(Op);
continue;
}
Qs.push_back(Op);
continue;
}
return SE.getMulExpr(Qs);
}
return SE.getMulExpr(Qs);
}
- const SCEV *Zero = SE.getConstant(A->getType(), 0);
SCEVDivision::divide(SE, A, B, &Q, &R);
SCEVDivision::divide(SE, A, B, &Q, &R);
return B;
SCEVDivision::divide(SE, B, A, &Q, &R);
return B;
SCEVDivision::divide(SE, B, A, &Q, &R);