aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Analysis
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-02-20 18:57:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-04-06 20:14:13 +0000
commit74626c16ff489c0d64cf2843dfd522e7c544f3ce (patch)
tree441818ef31aa77fd78545cceaf89fbf1e8e54fd1 /contrib/llvm-project/llvm/lib/Analysis
parentb3edf4467982447620505a28fc82e38a414c07dc (diff)
parente15a4f0a320e3c1248539511adee55a201e9ed2e (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Analysis')
-rw-r--r--contrib/llvm-project/llvm/lib/Analysis/ValueTracking.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/lib/Analysis/ValueTracking.cpp b/contrib/llvm-project/llvm/lib/Analysis/ValueTracking.cpp
index 5d6c3465a0c3..412115eb649c 100644
--- a/contrib/llvm-project/llvm/lib/Analysis/ValueTracking.cpp
+++ b/contrib/llvm-project/llvm/lib/Analysis/ValueTracking.cpp
@@ -5083,8 +5083,13 @@ void computeKnownFPClass(const Value *V, const APInt &DemandedElts,
Op->getOperand(0)->getType()->getScalarType()->getFltSemantics();
// All subnormal inputs should be in the normal range in the result type.
- if (APFloat::isRepresentableAsNormalIn(SrcTy, DstTy))
+ if (APFloat::isRepresentableAsNormalIn(SrcTy, DstTy)) {
+ if (Known.KnownFPClasses & fcPosSubnormal)
+ Known.KnownFPClasses |= fcPosNormal;
+ if (Known.KnownFPClasses & fcNegSubnormal)
+ Known.KnownFPClasses |= fcNegNormal;
Known.knownNot(fcSubnormal);
+ }
// Sign bit of a nan isn't guaranteed.
if (!Known.isKnownNeverNaN())