[llvm] [KnownFPClass] Improve known class deductions for exp/exp2/exp10 (PR #217526)
Eric Ross via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 12 16:29:28 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:
I have added a note in `KnownFPClass.cpp` stating that it assumes +0.1 and +10.0 are both positive normal values (Since `exp10(-1.0) == 0.1` and `exp10(+1.0) == 10.0`). Should we also have this note in `KnownFPClass.h`?
https://github.com/llvm/llvm-project/pull/217526
More information about the llvm-commits
mailing list