diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-01-29 21:02:23 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-01-29 21:02:23 +0000 |
| commit | 4d1ea71a31ff645e317df9d39fa4af40609848bc (patch) | |
| tree | 9c87ff0ad72a573efec4eca1e198d0cfa40c625a | |
| parent | 32058cfb7b822348c2a6f32d3ccffc34fb4e6911 (diff) | |
| download | bcm5719-llvm-4d1ea71a31ff645e317df9d39fa4af40609848bc.tar.gz bcm5719-llvm-4d1ea71a31ff645e317df9d39fa4af40609848bc.zip | |
Fix RET of promoted values on targets that custom expand RET to a target node.
llvm-svn: 25794
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 08f7326debb..44ce9981a62 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1056,14 +1056,15 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { } } - switch (TLI.getOperationAction(Node->getOpcode(), - Node->getValueType(0))) { - default: assert(0 && "This action is not supported yet!"); - case TargetLowering::Legal: break; - case TargetLowering::Custom: - Tmp1 = TLI.LowerOperation(Result, DAG); - if (Tmp1.Val) Result = Tmp1; - break; + if (Result.getOpcode() == ISD::RET) { + switch (TLI.getOperationAction(Result.getOpcode(), MVT::Other)) { + default: assert(0 && "This action is not supported yet!"); + case TargetLowering::Legal: break; + case TargetLowering::Custom: + Tmp1 = TLI.LowerOperation(Result, DAG); + if (Tmp1.Val) Result = Tmp1; + break; + } } break; case ISD::STORE: { |

