diff options
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/BasicAliasAnalysis.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Analysis/ConstantRange.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index ebe4cec60e4..d49898a401c 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -586,7 +586,7 @@ BasicAliasAnalysis::CheckGEPInstructions( Constant *Compare = ConstantExpr::getICmp(ICmpInst::ICMP_SGT, G1OC, G2OC); if (ConstantInt *CV = dyn_cast<ConstantInt>(Compare)) { - if (CV->getBoolValue()) // If they are comparable and G2 > G1 + if (CV->getZExtValue()) // If they are comparable and G2 > G1 std::swap(GEP1Ops, GEP2Ops); // Make GEP1 < GEP2 break; } diff --git a/llvm/lib/Analysis/ConstantRange.cpp b/llvm/lib/Analysis/ConstantRange.cpp index 6c2dce03aa5..7a344201dd3 100644 --- a/llvm/lib/Analysis/ConstantRange.cpp +++ b/llvm/lib/Analysis/ConstantRange.cpp @@ -64,7 +64,7 @@ static ConstantInt *getMinValue(const Type *Ty, bool isSigned = false) { } static ConstantInt *Next(ConstantInt *CI) { if (CI->getType() == Type::Int1Ty) - return ConstantInt::get(!CI->getBoolValue()); + return ConstantInt::get(Type::Int1Ty, !CI->getZExtValue()); Constant *Result = ConstantExpr::getAdd(CI, ConstantInt::get(CI->getType(), 1)); @@ -75,14 +75,14 @@ static bool LT(ConstantInt *A, ConstantInt *B, bool isSigned) { Constant *C = ConstantExpr::getICmp( (isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT), A, B); assert(isa<ConstantInt>(C) && "Constant folding of integrals not impl??"); - return cast<ConstantInt>(C)->getBoolValue(); + return cast<ConstantInt>(C)->getZExtValue(); } static bool LTE(ConstantInt *A, ConstantInt *B, bool isSigned) { Constant *C = ConstantExpr::getICmp( (isSigned ? ICmpInst::ICMP_SLE : ICmpInst::ICMP_ULE), A, B); assert(isa<ConstantInt>(C) && "Constant folding of integrals not impl??"); - return cast<ConstantInt>(C)->getBoolValue(); + return cast<ConstantInt>(C)->getZExtValue(); } static bool GT(ConstantInt *A, ConstantInt *B, bool isSigned) { diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index ad16acc9b40..27c9e622ca8 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -1722,7 +1722,7 @@ ComputeLoadConstantCompareIterationCount(LoadInst *LI, Constant *RHS, // Evaluate the condition for this iteration. Result = ConstantExpr::getICmp(predicate, Result, RHS); if (!isa<ConstantInt>(Result)) break; // Couldn't decide for sure - if (cast<ConstantInt>(Result)->getBoolValue() == false) { + if (cast<ConstantInt>(Result)->getZExtValue() == false) { #if 0 cerr << "\n***\n*** Computed loop count " << *ItCst << "\n*** From global " << *GV << "*** BB: " << *L->getHeader() @@ -1932,7 +1932,7 @@ ComputeIterationCountExhaustively(const Loop *L, Value *Cond, bool ExitWhen) { // Couldn't symbolically evaluate. if (!CondVal || CondVal->getType() != Type::Int1Ty) return UnknownValue; - if (CondVal->getBoolValue() == ExitWhen) { + if (CondVal->getZExtValue() == ExitWhen) { ConstantEvolutionLoopExitValue[PN] = PHIVal; ++NumBruteForceTripCountsComputed; return SCEVConstant::get(ConstantInt::get(Type::Int32Ty, IterationNum)); @@ -2204,7 +2204,7 @@ SCEVHandle ScalarEvolutionsImpl::HowFarToZero(SCEV *V, const Loop *L) { if (ConstantInt *CB = dyn_cast<ConstantInt>(ConstantExpr::getICmp(ICmpInst::ICMP_ULT, R1->getValue(), R2->getValue()))) { - if (CB->getBoolValue() == false) + if (CB->getZExtValue() == false) 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 @@ -2429,7 +2429,7 @@ SCEVHandle SCEVAddRecExpr::getNumIterationsInRange(ConstantRange Range, if (ConstantInt *CB = dyn_cast<ConstantInt>(ConstantExpr::getICmp(ICmpInst::ICMP_ULT, R1->getValue(), R2->getValue()))) { - if (CB->getBoolValue() == false) + if (CB->getZExtValue() == false) std::swap(R1, R2); // R1 is the minimum root now. // Make sure the root is not off by one. The returned iteration should |

