[llvm] SelectionDAG: Fix isKnownNeverNaN for Min and Max (PR #135742)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 20 01:05:31 PDT 2025


================
@@ -5704,7 +5704,8 @@ bool SelectionDAG::isKnownNeverNaN(SDValue Op, bool SNaN, unsigned Depth) const
   }
   case ISD::FMINIMUM:
   case ISD::FMAXIMUM: {
-    // TODO: Does this quiet or return the origina NaN as-is?
+    if (SNaN)
+      return true;
----------------
arsenm wrote:

I don't think this part is covered under the existing tests, and should be done separately from the other bit. The other piece could also just be done in one step to fully replace the IEEE versions 

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


More information about the llvm-commits mailing list