diff options
author | Duncan Sands <baldrick@free.fr> | 2007-09-11 14:10:23 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2007-09-11 14:10:23 +0000 |
commit | f7331b3dd72409e644833ecaf62a0f6db03c97ee (patch) | |
tree | b7b77992e62b2e876b9e394a9bec4fda3c289589 /lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | 49c23935e01ec039910184d071633468557eb28b (diff) |
Fold the adjust_trampoline intrinsic into
init_trampoline. There is now only one
trampoline intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41841 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 2c5b9dad42..31e29470e8 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -3384,21 +3384,6 @@ 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) @@ -3407,7 +3392,14 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { // The only option for this node is to custom lower it. Result = TLI.LowerOperation(Result, DAG); assert(Result.Val && "Should always custom lower!"); - break; + + // Since trampoline produces two values, make sure to remember that we + // legalized both of them. + Tmp1 = LegalizeOp(Result.getValue(1)); + Result = LegalizeOp(Result); + AddLegalizedOperand(SDOperand(Node, 0), Result); + AddLegalizedOperand(SDOperand(Node, 1), Tmp1); + return Op.ResNo ? Tmp1 : Result; } } |