[llvm] 95f984f - ValueTracking: Don't use unnecessary null checked dyn_cast
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 05:32:12 PDT 2024
Author: Matt Arsenault
Date: 2024-04-08T08:32:04-04:00
New Revision: 95f984f37e390a6d2e8a4b0852ea4d5a83126287
URL: https://github.com/llvm/llvm-project/commit/95f984f37e390a6d2e8a4b0852ea4d5a83126287
DIFF: https://github.com/llvm/llvm-project/commit/95f984f37e390a6d2e8a4b0852ea4d5a83126287.diff
LOG: ValueTracking: Don't use unnecessary null checked dyn_cast
Added:
Modified:
llvm/lib/Analysis/ValueTracking.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 0b0e2653f8dff2..5279f03767edab 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -4501,7 +4501,7 @@ void computeKnownFPClass(const Value *V, const APInt &DemandedElts,
assert(Depth <= MaxAnalysisRecursionDepth && "Limit Search Depth");
- if (auto *CFP = dyn_cast_or_null<ConstantFP>(V)) {
+ if (auto *CFP = dyn_cast<ConstantFP>(V)) {
Known.KnownFPClasses = CFP->getValueAPF().classify();
Known.SignBit = CFP->isNegative();
return;
More information about the llvm-commits
mailing list