forked from OSchip/llvm-project
Fix incorrect legalization of EHSELECTOR. This fixes
CodeGen/Generic/2007-04-14-EHSelectorCrash.ll and PR1326 llvm-svn: 36510
This commit is contained in:
parent
83a5e928e6
commit
1cbe208cda
|
@ -692,12 +692,14 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||||
Result = TLI.LowerOperation(Op, DAG);
|
Result = TLI.LowerOperation(Op, DAG);
|
||||||
if (Result.Val) break;
|
if (Result.Val) break;
|
||||||
// Fall Thru
|
// Fall Thru
|
||||||
case TargetLowering::Legal:
|
case TargetLowering::Legal: {
|
||||||
Result = DAG.getNode(ISD::MERGE_VALUES, VT, DAG.getConstant(0, VT), Tmp1).
|
SDOperand Ops[] = { DAG.getConstant(0, VT), Tmp1 };
|
||||||
getValue(Op.ResNo);
|
Result = DAG.getNode(ISD::MERGE_VALUES, DAG.getVTList(VT, MVT::Other),
|
||||||
|
Ops, 2).getValue(Op.ResNo);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ISD::EHSELECTION: {
|
case ISD::EHSELECTION: {
|
||||||
Tmp1 = LegalizeOp(Node->getOperand(0));
|
Tmp1 = LegalizeOp(Node->getOperand(0));
|
||||||
|
@ -714,12 +716,14 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||||
Result = TLI.LowerOperation(Op, DAG);
|
Result = TLI.LowerOperation(Op, DAG);
|
||||||
if (Result.Val) break;
|
if (Result.Val) break;
|
||||||
// Fall Thru
|
// Fall Thru
|
||||||
case TargetLowering::Legal:
|
case TargetLowering::Legal: {
|
||||||
Result = DAG.getNode(ISD::MERGE_VALUES, VT, DAG.getConstant(0, VT), Tmp2).
|
SDOperand Ops[] = { DAG.getConstant(0, VT), Tmp2 };
|
||||||
getValue(Op.ResNo);
|
Result = DAG.getNode(ISD::MERGE_VALUES, DAG.getVTList(VT, MVT::Other),
|
||||||
|
Ops, 2).getValue(Op.ResNo);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ISD::AssertSext:
|
case ISD::AssertSext:
|
||||||
case ISD::AssertZext:
|
case ISD::AssertZext:
|
||||||
|
|
Loading…
Reference in New Issue