diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-27 17:12:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-27 17:12:52 +0000 |
commit | 1cbe208cdaec73c1ad5c9cbdd4850268a6d896e2 (patch) | |
tree | 16c7e63a01e1fcc69eb085c45d57e2021173e57c /llvm/lib/CodeGen | |
parent | 83a5e928e61c2d27b89a836aa05241971adbe331 (diff) | |
download | bcm5719-llvm-1cbe208cdaec73c1ad5c9cbdd4850268a6d896e2.tar.gz bcm5719-llvm-1cbe208cdaec73c1ad5c9cbdd4850268a6d896e2.zip |
Fix incorrect legalization of EHSELECTOR. This fixes
CodeGen/Generic/2007-04-14-EHSelectorCrash.ll and PR1326
llvm-svn: 36510
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 1835ce2f9c6..99394c73a39 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -692,12 +692,14 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { Result = TLI.LowerOperation(Op, DAG); if (Result.Val) break; // Fall Thru - case TargetLowering::Legal: - Result = DAG.getNode(ISD::MERGE_VALUES, VT, DAG.getConstant(0, VT), Tmp1). - getValue(Op.ResNo); + case TargetLowering::Legal: { + SDOperand Ops[] = { DAG.getConstant(0, VT), Tmp1 }; + Result = DAG.getNode(ISD::MERGE_VALUES, DAG.getVTList(VT, MVT::Other), + Ops, 2).getValue(Op.ResNo); break; } } + } break; case ISD::EHSELECTION: { Tmp1 = LegalizeOp(Node->getOperand(0)); @@ -714,12 +716,14 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { Result = TLI.LowerOperation(Op, DAG); if (Result.Val) break; // Fall Thru - case TargetLowering::Legal: - Result = DAG.getNode(ISD::MERGE_VALUES, VT, DAG.getConstant(0, VT), Tmp2). - getValue(Op.ResNo); + case TargetLowering::Legal: { + SDOperand Ops[] = { DAG.getConstant(0, VT), Tmp2 }; + Result = DAG.getNode(ISD::MERGE_VALUES, DAG.getVTList(VT, MVT::Other), + Ops, 2).getValue(Op.ResNo); break; } } + } break; case ISD::AssertSext: case ISD::AssertZext: |