Skip to content

Commit 5773adb

Browse files
authored
SelectionDAG: Remove unneeded getSelectCC in expandFMINIMUMNUM_FMAXIMUMNUM (llvm#107416)
ISD::FCANONICALIZE is enough, which can process NaN or non-NaN correctly, thus getSelectCC is not needed here.
1 parent 1253001 commit 5773adb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8616,10 +8616,7 @@ SDValue TargetLowering::expandFMINIMUMNUM_FMAXIMUMNUM(SDNode *Node,
86168616
// If MinMax is NaN, let's quiet it.
86178617
if (!Flags.hasNoNaNs() && !DAG.isKnownNeverNaN(LHS) &&
86188618
!DAG.isKnownNeverNaN(RHS)) {
8619-
SDValue MinMaxQuiet =
8620-
DAG.getNode(ISD::FCANONICALIZE, DL, VT, MinMax, Flags);
8621-
MinMax =
8622-
DAG.getSelectCC(DL, MinMax, MinMax, MinMaxQuiet, MinMax, ISD::SETUO);
8619+
MinMax = DAG.getNode(ISD::FCANONICALIZE, DL, VT, MinMax, Flags);
86238620
}
86248621

86258622
// Fixup signed zero behavior.

0 commit comments

Comments
 (0)