forked from OSchip/llvm-project
[LegalizeTypes] Remove the call to SplitVecRes_UnaryOp from SplitVecRes_StrictFPOp. NFCI
It doesn't seem to do anything that SplitVecRes_StrictFPOp can't do. SplitVecRes_StrictFPOp already handles nodes with a variable number of arguments and a mix of scalar and vector arguments.
This commit is contained in:
parent
97182013c4
commit
c4d2bb1ede
|
@ -1254,17 +1254,6 @@ void DAGTypeLegalizer::SplitVecRes_ExtVecInRegOp(SDNode *N, SDValue &Lo,
|
|||
|
||||
void DAGTypeLegalizer::SplitVecRes_StrictFPOp(SDNode *N, SDValue &Lo,
|
||||
SDValue &Hi) {
|
||||
switch (N->getOpcode()) {
|
||||
case ISD::STRICT_FP_EXTEND:
|
||||
case ISD::STRICT_FP_ROUND:
|
||||
case ISD::STRICT_FP_TO_SINT:
|
||||
case ISD::STRICT_FP_TO_UINT:
|
||||
SplitVecRes_UnaryOp(N, Lo, Hi);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
unsigned NumOps = N->getNumOperands();
|
||||
SDValue Chain = N->getOperand(0);
|
||||
EVT LoVT, HiVT;
|
||||
|
@ -1719,24 +1708,6 @@ void DAGTypeLegalizer::SplitVecRes_UnaryOp(SDNode *N, SDValue &Lo,
|
|||
if (N->getOpcode() == ISD::FP_ROUND) {
|
||||
Lo = DAG.getNode(N->getOpcode(), dl, LoVT, Lo, N->getOperand(1));
|
||||
Hi = DAG.getNode(N->getOpcode(), dl, HiVT, Hi, N->getOperand(1));
|
||||
} else if (N->getOpcode() == ISD::STRICT_FP_ROUND) {
|
||||
Lo = DAG.getNode(N->getOpcode(), dl, { LoVT, MVT::Other },
|
||||
{ N->getOperand(0), Lo, N->getOperand(2) });
|
||||
Hi = DAG.getNode(N->getOpcode(), dl, { HiVT, MVT::Other },
|
||||
{ N->getOperand(0), Hi, N->getOperand(2) });
|
||||
SDValue NewChain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other,
|
||||
Lo.getValue(1), Hi.getValue(1));
|
||||
ReplaceValueWith(SDValue(N, 1), NewChain);
|
||||
} else if (N->isStrictFPOpcode()) {
|
||||
Lo = DAG.getNode(N->getOpcode(), dl, { LoVT, MVT::Other },
|
||||
{ N->getOperand(0), Lo });
|
||||
Hi = DAG.getNode(N->getOpcode(), dl, { HiVT, MVT::Other },
|
||||
{ N->getOperand(0), Hi });
|
||||
// Legalize the chain result - switch anything that used the old chain to
|
||||
// use the new one.
|
||||
SDValue NewChain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other,
|
||||
Lo.getValue(1), Hi.getValue(1));
|
||||
ReplaceValueWith(SDValue(N, 1), NewChain);
|
||||
} else {
|
||||
Lo = DAG.getNode(N->getOpcode(), dl, LoVT, Lo);
|
||||
Hi = DAG.getNode(N->getOpcode(), dl, HiVT, Hi);
|
||||
|
|
Loading…
Reference in New Issue