Skip to content

Commit 1b77723

Browse files
committed
PromoteFloatRes_AssertNoFPClass: conservative stripping
1 parent 5ac47f6 commit 1b77723

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,9 +2645,7 @@ SDValue DAGTypeLegalizer::PromoteFloatOp_UnaryOp(SDNode *N, unsigned OpNo) {
26452645
// Convert the promoted float value to the desired integer type
26462646
SDValue DAGTypeLegalizer::PromoteFloatOp_AssertNoFPClass(SDNode *N,
26472647
unsigned OpNo) {
2648-
SDValue Op = GetPromotedFloat(N->getOperand(0));
2649-
return DAG.getNode(N->getOpcode(), SDLoc(N), N->getValueType(0), Op,
2650-
N->getOperand(1));
2648+
return GetPromotedFloat(N->getOperand(0));
26512649
}
26522650

26532651
SDValue DAGTypeLegalizer::PromoteFloatOp_FP_TO_XINT_SAT(SDNode *N,
@@ -3016,11 +3014,9 @@ SDValue DAGTypeLegalizer::PromoteFloatRes_UnaryOp(SDNode *N) {
30163014
// operand have PromoteFloat type action. Construct a new SDNode with the
30173015
// promoted float value of the old operand.
30183016
SDValue DAGTypeLegalizer::PromoteFloatRes_AssertNoFPClass(SDNode *N) {
3019-
EVT VT = N->getValueType(0);
3020-
EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), VT);
3021-
SDValue Op = GetPromotedFloat(N->getOperand(0));
3022-
return DAG.getNode(N->getOpcode(), SDLoc(N), NVT, Op, N->getOperand(1));
3017+
return GetPromotedFloat(N->getOperand(0));
30233018
}
3019+
30243020
// Binary operations where the result and both operands have PromoteFloat type
30253021
// action. Construct a new SDNode with the promoted float values of the old
30263022
// operands.

0 commit comments

Comments
 (0)