remove a couple more now-extraneous legalizeop's

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25738 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-01-28 08:22:56 +00:00
parent 5c62f337fe
commit 7cd2997a83

View File

@ -215,7 +215,7 @@ SDOperand SelectionDAGLegalize::ExpandLegalINT_TO_FP(bool isSigned,
// if f32 then cast to f32 // if f32 then cast to f32
Result = DAG.getNode(ISD::FP_ROUND, MVT::f32, Sub); Result = DAG.getNode(ISD::FP_ROUND, MVT::f32, Sub);
} }
return LegalizeOp(Result); return Result;
} }
assert(!isSigned && "Legalize cannot Expand SINT_TO_FP for i64 yet"); assert(!isSigned && "Legalize cannot Expand SINT_TO_FP for i64 yet");
SDOperand Tmp1 = DAG.getNode(ISD::SINT_TO_FP, DestVT, Op0); SDOperand Tmp1 = DAG.getNode(ISD::SINT_TO_FP, DestVT, Op0);
@ -254,7 +254,7 @@ SDOperand SelectionDAGLegalize::ExpandLegalINT_TO_FP(bool isSigned,
DAG.getSrcValue(NULL), MVT::f32)); DAG.getSrcValue(NULL), MVT::f32));
} }
return LegalizeOp(DAG.getNode(ISD::FADD, DestVT, Tmp1, FudgeInReg)); return DAG.getNode(ISD::FADD, DestVT, Tmp1, FudgeInReg);
} }
/// PromoteLegalINT_TO_FP - This function is responsible for legalizing a /// PromoteLegalINT_TO_FP - This function is responsible for legalizing a
@ -307,11 +307,9 @@ SDOperand SelectionDAGLegalize::PromoteLegalINT_TO_FP(SDOperand LegalOp,
// Okay, we found the operation and type to use. Zero extend our input to the // Okay, we found the operation and type to use. Zero extend our input to the
// desired type then run the operation on it. // desired type then run the operation on it.
SDOperand N = DAG.getNode(OpToUse, DestVT, return DAG.getNode(OpToUse, DestVT,
DAG.getNode(isSigned ? ISD::SIGN_EXTEND : ISD::ZERO_EXTEND, DAG.getNode(isSigned ? ISD::SIGN_EXTEND : ISD::ZERO_EXTEND,
NewInTy, LegalOp)); NewInTy, LegalOp));
// Make sure to legalize any nodes we create here.
return LegalizeOp(N);
} }
/// PromoteLegalFP_TO_INT - This function is responsible for legalizing a /// PromoteLegalFP_TO_INT - This function is responsible for legalizing a
@ -363,10 +361,8 @@ SDOperand SelectionDAGLegalize::PromoteLegalFP_TO_INT(SDOperand LegalOp,
// Okay, we found the operation and type to use. Truncate the result of the // Okay, we found the operation and type to use. Truncate the result of the
// extended FP_TO_*INT operation to the desired size. // extended FP_TO_*INT operation to the desired size.
SDOperand N = DAG.getNode(ISD::TRUNCATE, DestVT, return DAG.getNode(ISD::TRUNCATE, DestVT,
DAG.getNode(OpToUse, NewOutTy, LegalOp)); DAG.getNode(OpToUse, NewOutTy, LegalOp));
// Make sure to legalize any nodes we create here in the next pass.
return LegalizeOp(N);
} }
/// ExpandBSWAP - Open code the operations for BSWAP of the specified operation. /// ExpandBSWAP - Open code the operations for BSWAP of the specified operation.