[LegalizeTypes] Remove PromoteFloat support form ExpandIntRes_LLROUND_LLRINT.

This code isn't exercised, and was in the wrong place. If we need
this, we would need to promote the type before figuring out which
libcall to use.

I'm choosing to remove it rather than fixing since we don't
support PromoteFloat for LRINT/LROUND/LLRINT/LLROUND when the
result type is legal so I don't see much reason to support it
for the case where the result type isn't legal.
This commit is contained in:
Craig Topper 2019-11-16 19:46:53 -08:00
parent d4ba11ae32
commit 9b515b6dd9
1 changed files with 6 additions and 5 deletions

View File

@ -2586,7 +2586,12 @@ void DAGTypeLegalizer::ExpandIntRes_FP_TO_UINT(SDNode *N, SDValue &Lo,
void DAGTypeLegalizer::ExpandIntRes_LLROUND_LLRINT(SDNode *N, SDValue &Lo,
SDValue &Hi) {
EVT VT = N->getOperand(0).getValueType().getSimpleVT().SimpleTy;
SDValue Op = N->getOperand(0);
assert(getTypeAction(Op.getValueType()) != TargetLowering::TypePromoteFloat &&
"Input type needs to be promoted!");
EVT VT = Op.getValueType();
RTLIB::Libcall LC = RTLIB::UNKNOWN_LIBCALL;
if (N->getOpcode() == ISD::LLROUND) {
@ -2616,10 +2621,6 @@ void DAGTypeLegalizer::ExpandIntRes_LLROUND_LLRINT(SDNode *N, SDValue &Lo,
} else
llvm_unreachable("Unexpected opcode!");
SDValue Op = N->getOperand(0);
if (getTypeAction(Op.getValueType()) == TargetLowering::TypePromoteFloat)
Op = GetPromotedFloat(Op);
SDLoc dl(N);
EVT RetVT = N->getValueType(0);
TargetLowering::MakeLibCallOptions CallOptions;