aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTilmann Scheller <tilmann.scheller@googlemail.com>2008-12-02 12:12:25 +0000
committerTilmann Scheller <tilmann.scheller@googlemail.com>2008-12-02 12:12:25 +0000
commitb0a5cdd4511d02afacd0cd39223cf6c52a6ef361 (patch)
tree3a9719d2573696ad7dded04f07fb8bd6703de6e6 /lib
parentc89c6a964c6091e07a51a22ad8c1c38295eb8599 (diff)
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
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 9c5745755f..cd90f67251 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);