mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 16:24:23 +00:00
use isZero()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208614 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -6987,7 +6987,7 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Numerator == D.Zero) {
|
if (Numerator->isZero()) {
|
||||||
*Quotient = D.Zero;
|
*Quotient = D.Zero;
|
||||||
*Remainder = D.Zero;
|
*Remainder = D.Zero;
|
||||||
return;
|
return;
|
||||||
@ -7003,7 +7003,7 @@ public:
|
|||||||
|
|
||||||
// Bail out when the Numerator is not divisible by one of the terms of
|
// Bail out when the Numerator is not divisible by one of the terms of
|
||||||
// the Denominator.
|
// the Denominator.
|
||||||
if (R != D.Zero) {
|
if (!R->isZero()) {
|
||||||
*Quotient = D.Zero;
|
*Quotient = D.Zero;
|
||||||
*Remainder = Numerator;
|
*Remainder = Numerator;
|
||||||
return;
|
return;
|
||||||
@ -7091,7 +7091,7 @@ public:
|
|||||||
// Check whether Denominator divides one of the product operands.
|
// Check whether Denominator divides one of the product operands.
|
||||||
const SCEV *Q, *R;
|
const SCEV *Q, *R;
|
||||||
divide(SE, Op, Denominator, &Q, &R);
|
divide(SE, Op, Denominator, &Q, &R);
|
||||||
if (R != Zero) {
|
if (!R->isZero()) {
|
||||||
Qs.push_back(Op);
|
Qs.push_back(Op);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -7169,13 +7169,12 @@ findGCD(ScalarEvolution &SE, const SCEV *A, const SCEV *B) {
|
|||||||
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);
|
||||||
if (R == Zero)
|
if (R->isZero())
|
||||||
return B;
|
return B;
|
||||||
|
|
||||||
SCEVDivision::divide(SE, B, A, &Q, &R);
|
SCEVDivision::divide(SE, B, A, &Q, &R);
|
||||||
if (R == Zero)
|
if (R->isZero())
|
||||||
return A;
|
return A;
|
||||||
|
|
||||||
return One;
|
return One;
|
||||||
|
Reference in New Issue
Block a user