From c4d2bb1ede04985a9b1a57b75a6a0d773fb78fd9 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 16 Dec 2019 20:52:02 -0800 Subject: [PATCH] [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. --- .../CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 29 ---------------------- 1 file changed, 29 deletions(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index a4da91e..9e20ccb 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -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); -- 2.7.4