aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-01-06 00:41:43 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-01-06 00:41:43 +0000
commit17c428e23dbeac1f985d725905ce6be1c725491f (patch)
treecf119f274d0dcde0235532479efdf16107300555
parent1cf6db2d3b9637dcd359ed9e2f46d03d3226632e (diff)
Support for custom lowering of ISD::RET.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25116 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 3e470f25b6..e7368f0a0c 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -1302,6 +1302,22 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
break;
}
}
+
+ MVT::ValueType VT = Node->getValueType(0);
+ switch (TLI.getOperationAction(Node->getOpcode(), VT)) {
+ default: assert(0 && "This action is not supported yet!");
+ case TargetLowering::Custom: {
+ SDOperand Tmp = TLI.LowerOperation(Result, DAG);
+ if (Tmp.Val) {
+ Result = LegalizeOp(Tmp);
+ break;
+ }
+ // FALLTHROUGH if the target thinks it is legal.
+ }
+ case TargetLowering::Legal:
+ // Nothing to do.
+ break;
+ }
break;
case ISD::STORE: {
Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain.