diff options
author | Sebastian Pop <spop@codeaurora.org> | 2014-05-12 19:01:49 +0000 |
---|---|---|
committer | Sebastian Pop <spop@codeaurora.org> | 2014-05-12 19:01:49 +0000 |
commit | 0e75c5cb644c5ad59959a2c79b2bdc5783248779 (patch) | |
tree | 17a818742778e5f235533a8769ef0ce3c4715964 /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 8bcc6400de1018920fa812cb106751acb0342b09 (diff) | |
download | bcm5719-llvm-0e75c5cb644c5ad59959a2c79b2bdc5783248779.tar.gz bcm5719-llvm-0e75c5cb644c5ad59959a2c79b2bdc5783248779.zip |
use isZero()
llvm-svn: 208614
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 5f06e8238c9..590ebe4b30f 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/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; |