Skip to content

Commit 68c9068

Browse files
committed
[ValueTracking] Replace an always false condition with an assert. NFC
The one caller of this function already checked that V isn't a Constant. Alternatively, we could remove the check from the caller if reviewers prefer. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D143677
1 parent 5d8da5a commit 68c9068

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Analysis/ValueTracking.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2302,8 +2302,7 @@ static bool isGEPKnownNonNull(const GEPOperator *GEP, unsigned Depth,
23022302
static bool isKnownNonNullFromDominatingCondition(const Value *V,
23032303
const Instruction *CtxI,
23042304
const DominatorTree *DT) {
2305-
if (isa<Constant>(V))
2306-
return false;
2305+
assert(!isa<Constant>(V) && "Called for constant?");
23072306

23082307
if (!CtxI || !DT)
23092308
return false;

0 commit comments

Comments
 (0)