summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index e354cb89129..50205ff91c3 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -188,7 +188,7 @@ bool llvm::isKnownPositive(Value *V, const DataLayout &DL, unsigned Depth,
const DominatorTree *DT) {
if (auto *CI = dyn_cast<ConstantInt>(V))
return CI->getValue().isStrictlyPositive();
-
+
// TODO: We'd doing two recursive queries here. We should factor this such
// that only a single query is needed.
return isKnownNonNegative(V, DL, Depth, AC, CxtI, DT) &&
@@ -1702,7 +1702,7 @@ bool isKnownNonZero(Value *V, unsigned Depth, const Query &Q) {
// Check for pointer simplifications.
if (V->getType()->isPointerTy()) {
if (isKnownNonNull(V))
- return true;
+ return true;
if (GEPOperator *GEP = dyn_cast<GEPOperator>(V))
if (isGEPKnownNonNull(GEP, Depth, Q))
return true;
@@ -1753,7 +1753,7 @@ bool isKnownNonZero(Value *V, unsigned Depth, const Query &Q) {
APInt KnownZero(BitWidth, 0);
APInt KnownOne(BitWidth, 0);
computeKnownBits(X, KnownZero, KnownOne, Depth, Q);
-
+
auto ShiftVal = Shift->getLimitedValue(BitWidth - 1);
// Is there a known one in the portion not shifted out?
if (KnownOne.countLeadingZeros() < BitWidth - ShiftVal)
@@ -2445,7 +2445,7 @@ bool llvm::CannotBeOrderedLessThanZero(const Value *V,
return true;
case Instruction::FMul:
// x*x is always non-negative or a NaN.
- if (I->getOperand(0) == I->getOperand(1))
+ if (I->getOperand(0) == I->getOperand(1))
return true;
// Fall through
case Instruction::FAdd:
@@ -2491,7 +2491,7 @@ bool llvm::CannotBeOrderedLessThanZero(const Value *V,
}
break;
}
- return false;
+ return false;
}
/// If the specified value can be set by repeating the same byte in memory,
@@ -2776,7 +2776,7 @@ bool llvm::isGEPBasedOnPointerToString(const GEPOperator *GEP) {
return false;
return true;
-}
+}
/// This function computes the length of a null-terminated C string pointed to
/// by V. If successful, it returns true and returns the string in Str.
@@ -3182,7 +3182,7 @@ bool llvm::isKnownNonNull(const Value *V, const TargetLibraryInfo *TLI) {
return !GV->hasExternalWeakLinkage() &&
GV->getType()->getAddressSpace() == 0;
- // A Load tagged w/nonnull metadata is never null.
+ // A Load tagged w/nonnull metadata is never null.
if (const LoadInst *LI = dyn_cast<LoadInst>(V))
return LI->getMetadata(LLVMContext::MD_nonnull);
@@ -3213,7 +3213,7 @@ static bool isKnownNonNullFromDominatingCondition(const Value *V,
const BranchInst *BI = dyn_cast<BranchInst>(CmpU);
if (!BI)
continue;
-
+
assert(BI->isConditional() && "uses a comparison!");
BasicBlock *NonNullSuccessor = nullptr;
OpenPOWER on IntegriCloud