[llvm] expandFMINIMUM_FMAXIMUM: FMAXNUM/FMINNUM treat +0>-0 (PR #137367)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 4 13:26:50 PST 2025
================
@@ -8745,15 +8745,14 @@ SDValue TargetLowering::expandFMINIMUM_FMAXIMUM(SDNode *N,
unsigned CompOpcIeee = IsMax ? ISD::FMAXNUM_IEEE : ISD::FMINNUM_IEEE;
unsigned CompOpc = IsMax ? ISD::FMAXNUM : ISD::FMINNUM;
- // FIXME: We should probably define fminnum/fmaxnum variants with correct
- // signed zero behavior.
bool MinMaxMustRespectOrderedZero = false;
if (isOperationLegalOrCustom(CompOpcIeee, VT)) {
MinMax = DAG.getNode(CompOpcIeee, DL, VT, LHS, RHS, Flags);
MinMaxMustRespectOrderedZero = true;
} else if (isOperationLegalOrCustom(CompOpc, VT)) {
MinMax = DAG.getNode(CompOpc, DL, VT, LHS, RHS, Flags);
+ MinMaxMustRespectOrderedZero = true;
----------------
arsenm wrote:
This shouldn't be necessary anymore. With all operations defined to have strict ordering, this just needs to check the nsz flag
https://github.com/llvm/llvm-project/pull/137367
More information about the llvm-commits
mailing list