mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-28 22:24:28 +00:00
Simplify expressions involving boolean constants with clang-tidy
Patch by Richard (legalize at xmission dot com). Differential Revision: http://reviews.llvm.org/D8154 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231617 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user