diff options
| author | David Blaikie <dblaikie@gmail.com> | 2015-03-09 01:57:13 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2015-03-09 01:57:13 +0000 |
| commit | dc3f01e9cfc098bb2a55b103396eb3f0464b0c7a (patch) | |
| tree | 41e53ef86195787acb15962965c7475b8804771f /llvm/lib/Analysis/ScalarEvolution.cpp | |
| parent | 2a08dca3f719f207ead372bc0b635c757efd41c6 (diff) | |
| download | bcm5719-llvm-dc3f01e9cfc098bb2a55b103396eb3f0464b0c7a.tar.gz bcm5719-llvm-dc3f01e9cfc098bb2a55b103396eb3f0464b0c7a.zip | |
Simplify expressions involving boolean constants with clang-tidy
Patch by Richard (legalize at xmission dot com).
Differential Revision: http://reviews.llvm.org/D8154
llvm-svn: 231617
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 19e3633fcc5..49adbc37676 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -6198,7 +6198,7 @@ ScalarEvolution::HowFarToZero(const SCEV *V, const Loop *L, bool ControlsExit) { dyn_cast<ConstantInt>(ConstantExpr::getICmp(CmpInst::ICMP_ULT, R1->getValue(), R2->getValue()))) { - if (CB->getZExtValue() == false) + if (!CB->getZExtValue()) std::swap(R1, R2); // R1 is the minimum root now. // We can only use this value if the chrec ends up with an exact zero @@ -7521,7 +7521,7 @@ const SCEV *SCEVAddRecExpr::getNumIterationsInRange(ConstantRange Range, if (ConstantInt *CB = dyn_cast<ConstantInt>(ConstantExpr::getICmp(ICmpInst::ICMP_ULT, R1->getValue(), R2->getValue()))) { - if (CB->getZExtValue() == false) + if (!CB->getZExtValue()) std::swap(R1, R2); // R1 is the minimum root now. // Make sure the root is not off by one. The returned iteration should |

