[llvm] [X86][StrictFP] Combine fcmp + select to fmin/fmax for some predicates (PR #109512)
Andy Kaylor via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 27 12:00:39 PDT 2024
================
@@ -46494,17 +46496,22 @@ static SDValue combineSelect(SDNode *N, SelectionDAG &DAG,
// x<=y?x:y, because of how they handle negative zero (which can be
// ignored in unsafe-math mode).
// We also try to create v2f32 min/max nodes, which we later widen to v4f32.
- if (Cond.getOpcode() == ISD::SETCC && VT.isFloatingPoint() &&
- VT != MVT::f80 && VT != MVT::f128 && !isSoftF16(VT, Subtarget) &&
- (TLI.isTypeLegal(VT) || VT == MVT::v2f32) &&
+ if ((Cond.getOpcode() == ISD::SETCC ||
+ Cond.getOpcode() == ISD::STRICT_FSETCC ||
----------------
andykaylor wrote:
I don't think you can do this with STRICT_FSETCC because the SSE min/max instructions signal on quiet NaNs.
https://github.com/llvm/llvm-project/pull/109512
More information about the llvm-commits
mailing list