From ae099d54428f4113f8a71c53314975fb8a8e8bbc Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Thu, 10 Jul 2008 15:29:55 +0000 Subject: Remove PromoteIntRes_FP_ROUND - not sure what it was doing there: FP_ROUND returns a float, not an integer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53405 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 10 ---------- lib/CodeGen/SelectionDAG/LegalizeTypes.cpp | 3 --- lib/CodeGen/SelectionDAG/LegalizeTypes.h | 1 - lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp | 1 + 4 files changed, 1 insertion(+), 14 deletions(-) (limited to 'lib/CodeGen') diff --git a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp index 75f50f8..6c8f546 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp @@ -60,7 +60,6 @@ void DAGTypeLegalizer::PromoteIntegerResult(SDNode *N, unsigned ResNo) { case ISD::SIGN_EXTEND: case ISD::ZERO_EXTEND: case ISD::ANY_EXTEND: Result = PromoteIntRes_INT_EXTEND(N); break; - case ISD::FP_ROUND: Result = PromoteIntRes_FP_ROUND(N); break; case ISD::FP_TO_SINT: case ISD::FP_TO_UINT: Result = PromoteIntRes_FP_TO_XINT(N); break; case ISD::SETCC: Result = PromoteIntRes_SETCC(N); break; @@ -169,15 +168,6 @@ SDOperand DAGTypeLegalizer::PromoteIntRes_INT_EXTEND(SDNode *N) { return DAG.getNode(N->getOpcode(), NVT, N->getOperand(0)); } -SDOperand DAGTypeLegalizer::PromoteIntRes_FP_ROUND(SDNode *N) { - // NOTE: Assumes input is legal. - if (N->getConstantOperandVal(1) == 0) - return DAG.getNode(ISD::FP_ROUND_INREG, N->getOperand(0).getValueType(), - N->getOperand(0), DAG.getValueType(N->getValueType(0))); - // If the precision discard isn't needed, just return the operand unrounded. - return N->getOperand(0); -} - SDOperand DAGTypeLegalizer::PromoteIntRes_FP_TO_XINT(SDNode *N) { unsigned NewOpc = N->getOpcode(); MVT NVT = TLI.getTypeToTransformTo(N->getValueType(0)); diff --git a/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp index 7a0a52d..285d797 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp @@ -28,7 +28,6 @@ static const bool ViewLegalizeTypesDAGs = 0; #endif - /// run - This is the main entry point for the type legalizer. This does a /// top-down traversal of the dag, legalizing types as it goes. void DAGTypeLegalizer::run() { @@ -353,7 +352,6 @@ void DAGTypeLegalizer::ReplaceNodeWith(SDNode *From, SDNode *To) { } } - /// RemapNode - If the specified value was already legalized to another value, /// replace it by that value. void DAGTypeLegalizer::RemapNode(SDOperand &N) { @@ -441,7 +439,6 @@ void DAGTypeLegalizer::ExpungeNode(SDNode *N) { ReplacedNodes.erase(SDOperand(N, i)); } - void DAGTypeLegalizer::SetPromotedInteger(SDOperand Op, SDOperand Result) { AnalyzeNewNode(Result.Val); diff --git a/lib/CodeGen/SelectionDAG/LegalizeTypes.h b/lib/CodeGen/SelectionDAG/LegalizeTypes.h index 66c696e..f23e5a5 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeTypes.h +++ b/lib/CodeGen/SelectionDAG/LegalizeTypes.h @@ -214,7 +214,6 @@ private: SDOperand PromoteIntRes_CTPOP(SDNode *N); SDOperand PromoteIntRes_CTTZ(SDNode *N); SDOperand PromoteIntRes_EXTRACT_VECTOR_ELT(SDNode *N); - SDOperand PromoteIntRes_FP_ROUND(SDNode *N); SDOperand PromoteIntRes_FP_TO_XINT(SDNode *N); SDOperand PromoteIntRes_INT_EXTEND(SDNode *N); SDOperand PromoteIntRes_LOAD(LoadSDNode *N); diff --git a/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp b/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp index d1606d1..783cc9d 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp @@ -170,6 +170,7 @@ void DAGTypeLegalizer::ExpandRes_NormalLoad(SDNode *N, SDOperand &Lo, ReplaceValueWith(SDOperand(N, 1), Chain); } + //===--------------------------------------------------------------------===// // Generic Operand Expansion. //===--------------------------------------------------------------------===// -- cgit v1.1