[AArch64] Preserve X8 for thunks ending in variadic musttail calls
authorReid Kleckner <rnk@google.com>
Fri, 24 May 2019 01:27:20 +0000 (01:27 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 24 May 2019 01:27:20 +0000 (01:27 +0000)
commitb7a78c7dff18485e5ac85aa8c902571da4b06a33
tree3ac414250e2a3bbd2cb3913f45198b3030d1868a
parented595e8627b37131d1f0146c24655a1825c5cf13
[AArch64] Preserve X8 for thunks ending in variadic musttail calls

Summary:
On Windows, X8 may be used to pass in the address of an aggregate that
is returned indirectly. Therefore, it should be forwarded to variadic
musttail calls and preserved in thunks.

Fixes PR41997

Reviewers: mgrang, efriedma

Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62344

llvm-svn: 361585
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/vararg-tallcall.ll