From 68c906811bcb1edfc1a4c73e0fcadb51f7f3e8e3 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 9 Feb 2023 15:19:18 -0800 Subject: [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 --- llvm/lib/Analysis/ValueTracking.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Analysis/ValueTracking.cpp') diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index c86a70c..05b802c 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -2302,8 +2302,7 @@ static bool isGEPKnownNonNull(const GEPOperator *GEP, unsigned Depth, static bool isKnownNonNullFromDominatingCondition(const Value *V, const Instruction *CtxI, const DominatorTree *DT) { - if (isa(V)) - return false; + assert(!isa(V) && "Called for constant?"); if (!CtxI || !DT) return false; -- cgit v1.1