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

YunQiang Su via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 21 17:49:22 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;
----------------
wzssyqa wrote:

Yes. You are right. We should do this when we fix the behavior of these Intrinsics.

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


More information about the llvm-commits mailing list