summaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorSebastian Pop <spop@codeaurora.org>2014-05-12 19:01:49 +0000
committerSebastian Pop <spop@codeaurora.org>2014-05-12 19:01:49 +0000
commitd9673ebd340744ece3283f933e54af46d13abffb (patch)
tree83db0980172f790744d266b27d85d4e6daa45960 /lib/Analysis
parent9f84cecfdc7c3f129cbd55c98c02c22edd2ea143 (diff)
downloadllvm-d9673ebd340744ece3283f933e54af46d13abffb.tar.gz
llvm-d9673ebd340744ece3283f933e54af46d13abffb.tar.bz2
llvm-d9673ebd340744ece3283f933e54af46d13abffb.tar.xz
use isZero()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 5f06e8238c..590ebe4b30 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -6987,7 +6987,7 @@ public:
return;
}
- if (Numerator == D.Zero) {
+ if (Numerator->isZero()) {
*Quotient = D.Zero;
*Remainder = D.Zero;
return;
@@ -7003,7 +7003,7 @@ public:
// Bail out when the Numerator is not divisible by one of the terms of
// the Denominator.
- if (R != D.Zero) {
+ if (!R->isZero()) {
*Quotient = D.Zero;
*Remainder = Numerator;
return;
@@ -7091,7 +7091,7 @@ public:
// Check whether Denominator divides one of the product operands.
const SCEV *Q, *R;
divide(SE, Op, Denominator, &Q, &R);
- if (R != Zero) {
+ if (!R->isZero()) {
Qs.push_back(Op);
continue;
}
@@ -7169,13 +7169,12 @@ findGCD(ScalarEvolution &SE, const SCEV *A, const SCEV *B) {
return SE.getMulExpr(Qs);
}
- const SCEV *Zero = SE.getConstant(A->getType(), 0);
SCEVDivision::divide(SE, A, B, &Q, &R);
- if (R == Zero)
+ if (R->isZero())
return B;
SCEVDivision::divide(SE, B, A, &Q, &R);
- if (R == Zero)
+ if (R->isZero())
return A;
return One;