From: Tilmann Scheller Date: Tue, 2 Dec 2008 12:12:25 +0000 (+0000) Subject: make it possible to custom lower TRUNCATE (needed for the CellSPU target) X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b0a5cdd4511d02afacd0cd39223cf6c52a6ef361;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 9c5745755f2..cd90f672513 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -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);