musttail: Only set the inreg flag for fastcall and vectorcall
authorReid Kleckner <reid@kleckner.net>
Mon, 12 Jan 2015 23:28:23 +0000 (23:28 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 12 Jan 2015 23:28:23 +0000 (23:28 +0000)
commit1ec250a32fd0c7f98da08dbfa90424ea186410d4
tree4c37d2aa1dd9dd410f170169b6ced007f0157e67
parent549b6dbbb7a52c32178107bb1fdba31bd5d314df
musttail: Only set the inreg flag for fastcall and vectorcall

Otherwise we'll attempt to forward ECX, EDX, and EAX for cdecl and
stdcall thunks, leaving us with no scratch registers for indirect call
targets.

Fixes PR22052.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225729 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CallingConvLower.cpp
test/CodeGen/X86/musttail-varargs.ll