[llvm-branch-commits] [llvm] ValueTracking: Improve handling of exp intrinsic for overflow (PR #173430)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Dec 25 06:30: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.
----------------
arsenm wrote:

Slightly more than 0 will also produce a 0. At least 0x1p-149 will also give 0

https://github.com/llvm/llvm-project/pull/173430


More information about the llvm-branch-commits mailing list