projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d8da5a
)
[ValueTracking] Replace an always false condition with an assert. NFC
author
Craig Topper
<craig.topper@sifive.com>
Thu, 9 Feb 2023 23:19:18 +0000
(15:19 -0800)
committer
Craig Topper
<craig.topper@sifive.com>
Thu, 9 Feb 2023 23:19:28 +0000
(15:19 -0800)
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
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/ValueTracking.cpp
b/llvm/lib/Analysis/ValueTracking.cpp
index
c86a70c
..
05b802c
100644
(file)
--- 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<Constant>(V))
- return false;
+ assert(!isa<Constant>(V) && "Called for constant?");
if (!CtxI || !DT)
return false;