[llvm] SelectionDAG: Use qNaN constant if FCANONICALIZE not LegalOrCustom (PR #104564)
    Matt Arsenault via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Sep  4 00:21:40 PDT 2024
    
    
  
================
@@ -8622,8 +8622,16 @@ SDValue TargetLowering::expandFMINIMUMNUM_FMAXIMUMNUM(SDNode *Node,
   // If MinMax is NaN, let's quiet it.
   if (!Flags.hasNoNaNs() && !DAG.isKnownNeverNaN(LHS) &&
       !DAG.isKnownNeverNaN(RHS)) {
-    SDValue MinMaxQuiet =
-        DAG.getNode(ISD::FCANONICALIZE, DL, VT, MinMax, Flags);
+    SDValue MinMaxQuiet;
+    if (isOperationLegalOrCustom(ISD::FCANONICALIZE, VT)) {
----------------
arsenm wrote:
You also can't do a signaling nan check with fcmp in strictfp functions. This cannot raise an exception 
https://github.com/llvm/llvm-project/pull/104564
    
    
More information about the llvm-commits
mailing list