diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-07-06 23:44:52 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-07-06 23:44:52 +0000 |
commit | c66e150b2cb1f2f8e2f4eb124b9177ffc6ef3a74 (patch) | |
tree | 9c79978c7af8e4b3b9f74d2331a18ac8c8df157e /lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | d3b376b4483d816367dd28a41bcbccede1cdcbf0 (diff) | |
download | external_llvm-c66e150b2cb1f2f8e2f4eb124b9177ffc6ef3a74.zip external_llvm-c66e150b2cb1f2f8e2f4eb124b9177ffc6ef3a74.tar.gz external_llvm-c66e150b2cb1f2f8e2f4eb124b9177ffc6ef3a74.tar.bz2 |
By default, the eh.sjlj.setjmp/longjmp intrinsics should just do nothing rather
than assuming a target will custom lower them. Targets which do so should
exlicitly mark them as having custom lowerings. PR7454.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107734 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 69e8c57..f678d03 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -859,6 +859,8 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) { case ISD::MERGE_VALUES: case ISD::EH_RETURN: case ISD::FRAME_TO_ARGS_OFFSET: + case ISD::EH_SJLJ_SETJMP: + case ISD::EH_SJLJ_LONGJMP: // These operations lie about being legal: when they claim to be legal, // they should actually be expanded. Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); @@ -868,8 +870,6 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) { case ISD::TRAMPOLINE: case ISD::FRAMEADDR: case ISD::RETURNADDR: - case ISD::EH_SJLJ_SETJMP: - case ISD::EH_SJLJ_LONGJMP: // These operations lie about being legal: when they claim to be legal, // they should actually be custom-lowered. Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); @@ -2507,6 +2507,11 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node, case ISD::EH_LABEL: case ISD::PREFETCH: case ISD::VAEND: + case ISD::EH_SJLJ_LONGJMP: + Results.push_back(Node->getOperand(0)); + break; + case ISD::EH_SJLJ_SETJMP: + Results.push_back(DAG.getConstant(0, MVT::i32)); Results.push_back(Node->getOperand(0)); break; case ISD::MEMBARRIER: { |