[llvm] SelectionDAG: Improve expandFP_TO_INT_SAT (PR #139217)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri May 9 04:47:55 PDT 2025


================
@@ -11542,22 +11542,47 @@ SDValue TargetLowering::expandFP_TO_INT_SAT(SDNode *Node,
   // If the integer bounds are exactly representable as floats and min/max are
   // legal, emit a min+max+fptoi sequence. Otherwise we have to use a sequence
   // of comparisons and selects.
-  bool MinMaxLegal = isOperationLegal(ISD::FMINNUM, SrcVT) &&
+  bool MinMax2019NumLegal = isOperationLegal(ISD::FMINIMUMNUM, SrcVT) &&
+                     isOperationLegal(ISD::FMAXIMUMNUM, SrcVT);
----------------
arsenm wrote:

probably should be isLegalOrCustom 

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


More information about the llvm-commits mailing list