Skip to content

Commit 6f4f0ef

Browse files
committed
[X86] Don't pass a 1 to the second argument of ISD::FP_ROUND in LowerFCOPYSIGN.
I don't think we have any reason to believe the FP_ROUND here doesn't change the value. Found while trying to see if we still need the fp128 block in CanCombineFCOPYSIGN_EXTEND_ROUND. Removing that check caused this FP_ROUND to fire for fp128 which introduced a libcall expansion that asserted for this being a 1. Reviewed By: RKSimon, pengfei Differential Revision: https://reviews.llvm.org/D96098
1 parent b7d870e commit 6f4f0ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21900,7 +21900,8 @@ static SDValue LowerFCOPYSIGN(SDValue Op, SelectionDAG &DAG) {
2190021900

2190121901
// And if it is bigger, shrink it first.
2190221902
if (Sign.getSimpleValueType().bitsGT(VT))
21903-
Sign = DAG.getNode(ISD::FP_ROUND, dl, VT, Sign, DAG.getIntPtrConstant(1, dl));
21903+
Sign =
21904+
DAG.getNode(ISD::FP_ROUND, dl, VT, Sign, DAG.getIntPtrConstant(0, dl));
2190421905

2190521906
// At this point the operands and the result should have the same
2190621907
// type, and that won't be f80 since that is not custom lowered.

0 commit comments

Comments
 (0)