[llvm] [SelectionDAG] Use `KnownBits` to determine if an operand may be NaN. (PR #188606)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 31 02:22:08 PDT 2026


================
@@ -6112,6 +6112,16 @@ KnownFPClass SelectionDAG::computeKnownFPClass(SDValue Op,
     }
     break;
   }
+  case ISD::BITCAST: {
+    // Try to infer NaN from known bits, but only for detecting signaling or
+    // nonsignaling NaNs
+    EVT VT = Op.getValueType();
----------------
RKSimon wrote:

unnecessary - VT is already available at the top of the function (and you can remove the `[[maybe_unused]]` tag with this use.

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


More information about the llvm-commits mailing list