diff options
author | Arnold Schwaighofer <aschwaighofer@apple.com> | 2016-09-21 16:53:36 +0000 |
---|---|---|
committer | Arnold Schwaighofer <aschwaighofer@apple.com> | 2016-09-21 16:53:36 +0000 |
commit | de2490d0dcff0dd4358456d94f88bdf99859fb5c (patch) | |
tree | 18fcc282a44fb6a3bd01c8b6003322ac305935e9 /llvm/lib/CodeGen/SelectionDAG | |
parent | 15869f86d84927ceb965eb5eaecabf523d8c7eb9 (diff) | |
download | bcm5719-llvm-de2490d0dcff0dd4358456d94f88bdf99859fb5c.tar.gz bcm5719-llvm-de2490d0dcff0dd4358456d94f88bdf99859fb5c.zip |
Disable tail calls if there is an swifterror argument
ISel does not handle them correctly yet i.e we crash trying to emit tail call
code.
radar://28407842
llvm-svn: 282088
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index ceabccca2ab..a0db9ae34f8 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -5833,6 +5833,11 @@ void SelectionDAGBuilder::LowerCallTo(ImmutableCallSite CS, SDValue Callee, if (isTailCall && !isInTailCallPosition(CS, DAG.getTarget())) isTailCall = false; + // Disable tail calls if there is an swifterror argument. Targets have not + // been updated to support tail calls. + if (TLI.supportSwiftError() && SwiftErrorVal) + isTailCall = false; + TargetLowering::CallLoweringInfo CLI(DAG); CLI.setDebugLoc(getCurSDLoc()) .setChain(getRoot()) |