diff options
author | Hans Wennborg <hans@hanshq.net> | 2016-09-30 20:07:35 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2016-09-30 20:07:35 +0000 |
commit | 68604c21e7bae0d5339fef86ac64d4c769aa824d (patch) | |
tree | 8c5413f6d2507a509e9cb60dbf5b5b2d318e6106 /lib/Target/X86/X86ExpandPseudo.cpp | |
parent | d8588ac73f8891c0a7a23fe87825753546766cff (diff) | |
download | llvm-68604c21e7bae0d5339fef86ac64d4c769aa824d.tar.gz |
X86: Allow conditional tail calls in Win64 "leaf" functions (PR26302)
We can't use Jcc to leave a Win64 function in general, because that
confuses the unwinder. However, for "leaf" functions, that is, functions
where the return address is always on top of the stack and which don't
have unwind info, it's OK.
Differential Revision: https://reviews.llvm.org/D24836
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ExpandPseudo.cpp')
-rw-r--r-- | lib/Target/X86/X86ExpandPseudo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/X86/X86ExpandPseudo.cpp b/lib/Target/X86/X86ExpandPseudo.cpp index 63e8f017fe2a..8ae214901f3b 100644 --- a/lib/Target/X86/X86ExpandPseudo.cpp +++ b/lib/Target/X86/X86ExpandPseudo.cpp @@ -122,8 +122,9 @@ bool X86ExpandPseudo::ExpandMI(MachineBasicBlock &MBB, Op = X86::TAILJMPd_CC; break; case X86::TCRETURNdi64cc: - assert(!IsWin64 && "Conditional tail calls confuse the Win64 unwinder."); - // TODO: We could do it for Win64 "leaf" functions though; PR30337. + assert(!MBB.getParent()->hasWinCFI() && + "Conditional tail calls confuse " + "the Win64 unwinder."); Op = X86::TAILJMPd64_CC; break; default: |