X86: Allow conditional tail calls in Win64 "leaf" functions (PR26302)
authorHans Wennborg <hans@hanshq.net>
Fri, 30 Sep 2016 20:07:35 +0000 (20:07 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 30 Sep 2016 20:07:35 +0000 (20:07 +0000)
commitb5643b47b6d2c07b2fd30b077e5fac3a0753c2ff
treeee252dcaf37043c0c1cd4d6dc99381bf239811c4
parent2cd87a0cf2008d74de5c1ed5b061d57bdd527481
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

llvm-svn: 282920
llvm/lib/Target/X86/X86ExpandPseudo.cpp
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/conditional-tailcall.ll