[llvm] [KnownFPClass] Fix KnownFPClass::frexp subnormal mode handling (PR #219114)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 22:27:48 PDT 2026


================
@@ -3516,12 +3516,24 @@ Value *InstCombinerImpl::SimplifyDemandedUseFPClass(Instruction *I,
         switch (IID) {
         case Intrinsic::frexp: {
           FPClassTest SrcDemandedMask = fcNone;
+
           if (DemandedMask & fcNan)
             SrcDemandedMask |= fcNan;
-          if (DemandedMask & fcNegFinite)
-            SrcDemandedMask |= fcNegFinite;
-          if (DemandedMask & fcPosFinite)
-            SrcDemandedMask |= fcPosFinite;
----------------
ZERICO2005 wrote:

Similar bug to `KnownFPClass::frexp` where we rule out positive-zero without testing if the input could be a negative-subnormal that gets flushed to positive-zero.

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


More information about the llvm-commits mailing list