Skip to content

Commit 02b1a52

Browse files
[SelectionDAG] Only handle arch-specific COPYSIGNs as libcalls
1 parent 01c4784 commit 02b1a52

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,12 +1649,12 @@ void DAGTypeLegalizer::ExpandFloatRes_FCEIL(SDNode *N,
16491649

16501650
void DAGTypeLegalizer::ExpandFloatRes_FCOPYSIGN(SDNode *N,
16511651
SDValue &Lo, SDValue &Hi) {
1652-
ExpandFloatRes_Binary(N, GetFPLibCall(N->getValueType(0),
1653-
RTLIB::COPYSIGN_F32,
1654-
RTLIB::COPYSIGN_F64,
1655-
RTLIB::COPYSIGN_F80,
1656-
RTLIB::COPYSIGN_F128,
1657-
RTLIB::COPYSIGN_PPCF128), Lo, Hi);
1652+
1653+
EVT VT = N->getValueType(0);
1654+
ExpandFloatRes_Binary(
1655+
N,
1656+
(VT == MVT::ppcf128 ? RTLIB::COPYSIGN_PPCF128 : RTLIB::UNKNOWN_LIBCALL),
1657+
Lo, Hi);
16581658
}
16591659

16601660
void DAGTypeLegalizer::ExpandFloatRes_FCOS(SDNode *N,

0 commit comments

Comments
 (0)