add support for custom lowering SINT_TO_FP

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24531 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Lenharth 2005-11-30 06:43:03 +00:00
parent e26673143a
commit 5b5b8c2755

View File

@ -1956,6 +1956,19 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
return Result;
case TargetLowering::Legal:
break;
case TargetLowering::Custom: {
Tmp1 = LegalizeOp(Node->getOperand(0));
SDOperand Tmp =
DAG.getNode(Node->getOpcode(), Node->getValueType(0), Tmp1);
Tmp = TLI.LowerOperation(Tmp, DAG);
if (Tmp.Val) {
AddLegalizedOperand(Op, Tmp);
NeedsAnotherIteration = true;
return Tmp;
} else {
assert(0 && "Target Must Lower this");
}
}
}
Tmp1 = LegalizeOp(Node->getOperand(0));