Remove PromoteIntRes_FP_ROUND - not sure what it
authorDuncan Sands <baldrick@free.fr>
Thu, 10 Jul 2008 15:29:55 +0000 (15:29 +0000)
committerDuncan Sands <baldrick@free.fr>
Thu, 10 Jul 2008 15:29:55 +0000 (15:29 +0000)
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
lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp

index 75f50f89294ec546403c01bc3adb38b63a79c2b9..6c8f546be85582d6381ba9b270b2e19e62a7dfd2 100644 (file)
@@ -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));
index 7a0a52d97df3bf3f4dd8ea3851851b6823e13e23..285d797e3517d0328eb023bd7b442c573614b1bd 100644 (file)
@@ -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);
 
index 66c696e2e38ebe69a6e5c46975204dd123d6a848..f23e5a5ce7072053f6c9ea2cb17de9e36cbc146c 100644 (file)
@@ -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);
index d1606d1d16377d8b1fded1a26cbe3d2cf76759df..783cc9d213bca4ea4df50330dec116dee8aadce2 100644 (file)
@@ -170,6 +170,7 @@ void DAGTypeLegalizer::ExpandRes_NormalLoad(SDNode *N, SDOperand &Lo,
   ReplaceValueWith(SDOperand(N, 1), Chain);
 }
 
+
 //===--------------------------------------------------------------------===//
 // Generic Operand Expansion.
 //===--------------------------------------------------------------------===//