[llvm] SelectionDAG: Support FMINIMUMNUM and FMINIMUM in combineMinNumMaxNumImpl (PR #137449)

YunQiang Su via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 14 21:22:25 PST 2025


================
@@ -11907,7 +11907,16 @@ static bool isLegalToCombineMinNumMaxNum(SelectionDAG &DAG, SDValue LHS,
   if (!VT.isFloatingPoint())
     return false;
 
-  return Flags.hasNoSignedZeros() &&
+  bool hasMinMaxOpc = (TLI.isOperationLegalOrCustom(ISD::FMINNUM, VT) &&
----------------
wzssyqa wrote:

I found this is not correct for something like:
``` 
   -0 >= +0 ? -0 : +0
```

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


More information about the llvm-commits mailing list