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
This commit is contained in:
Duncan Sands 2008-07-10 15:29:55 +00:00
parent c5ffb45934
commit ae099d5442
4 changed files with 1 additions and 14 deletions

View 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));

View 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);

View 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);

View File

@ -170,6 +170,7 @@ void DAGTypeLegalizer::ExpandRes_NormalLoad(SDNode *N, SDOperand &Lo,
ReplaceValueWith(SDOperand(N, 1), Chain);
}
//===--------------------------------------------------------------------===//
// Generic Operand Expansion.
//===--------------------------------------------------------------------===//