[llvm] [KnownFPClass] Improve known class deductions for exp/exp2/exp10 (PR #217526)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 08:59:08 PDT 2026
================
@@ -520,16 +520,19 @@ KnownFPClass KnownFPClass::exp(const KnownFPClass &KnownSrc) {
Known.propagateNonNaN(KnownSrc);
- if (KnownSrc.cannotBeOrderedLessThanZero()) {
- // If the source is positive this cannot underflow.
+ // Only a negative normal or negative infinity can produce positive zero.
+ // A negative subnormal input is too small to produce positive zero.
----------------
ZERICO2005 wrote:
In other words, my assumption was that if `fltSemantics` is not passed into the function, then I can assume that the type uses one of the following semantics:
```
S_IEEEhalf
S_BFloat
S_IEEEsingle
S_IEEEdouble
S_IEEEquad
S_PPCDoubleDouble
S_PPCDoubleDoubleLegacy
S_FloatTF32
S_x87DoubleExtended
```
Or a future `ieee_binary256`, `_Decimal32`, `_Decimal64`, or `_Decimal128` type.
https://github.com/llvm/llvm-project/pull/217526
More information about the llvm-commits
mailing list