diff options
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 4131ed9..078cbf3 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -3156,6 +3156,31 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { } break; } + case ISD::ADJUST_TRAMP: { + Tmp1 = LegalizeOp(Node->getOperand(0)); + switch (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0))) { + default: assert(0 && "This action is not supported yet!"); + case TargetLowering::Custom: + Result = DAG.UpdateNodeOperands(Result, Tmp1); + Result = TLI.LowerOperation(Result, DAG); + if (Result.Val) break; + // FALL THROUGH + case TargetLowering::Expand: + Result = Tmp1; + break; + } + break; + } + case ISD::TRAMPOLINE: { + SDOperand Ops[6]; + for (unsigned i = 0; i != 6; ++i) + Ops[i] = LegalizeOp(Node->getOperand(i)); + Result = DAG.UpdateNodeOperands(Result, Ops, 6); + // The only option for this node is to custom lower it. + Result = TLI.LowerOperation(Result, DAG); + assert(Result.Val && "Should always custom lower!"); + break; + } } assert(Result.getValueType() == Op.getValueType() && |