make it possible to custom lower TRUNCATE (needed for the CellSPU target)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60409 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tilmann Scheller 2008-12-02 12:12:25 +00:00
parent c89c6a964c
commit b0a5cdd451

View File

@ -3904,6 +3904,11 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
case Legal:
Tmp1 = LegalizeOp(Node->getOperand(0));
Result = DAG.UpdateNodeOperands(Result, Tmp1);
if (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)) ==
TargetLowering::Custom) {
Tmp1 = TLI.LowerOperation(Result, DAG);
if (Tmp1.getNode()) Result = Tmp1;
}
break;
case Expand:
ExpandOp(Node->getOperand(0), Tmp1, Tmp2);