[llvm-branch-commits] [llvm] ValueTracking: Improve handling of exp intrinsic for overflow (PR #173430)
Yingwei Zheng via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Dec 24 04:52:18 PST 2025
================
@@ -5362,6 +5362,22 @@ void computeKnownFPClass(const Value *V, const APInt &DemandedElts,
Known.signBitMustBeZero();
}
+ if (KnownSrc.cannotBeOrderedLessThanZero()) {
+ // If the source is positive, and cannot be ~0, this cannot underflow.
+ Known.knownNot(fcPosZero);
+
+ // Cannot introduce new denormal values.
+ if (KnownSrc.isKnownNever(fcPosSubnormal))
+ Known.knownNot(fcPosSubnormal);
----------------
dtcxzyw wrote:
`x >= 0` implies `exp(x) >= 1`. It should never introduce denormal values.
https://github.com/llvm/llvm-project/pull/173430
More information about the llvm-branch-commits
mailing list