]> granicus.if.org Git - llvm/commit
[AArch64][GlobalISel] Support tail calling with swiftself parameters
authorJessica Paquette <jpaquette@apple.com>
Thu, 12 Sep 2019 23:00:59 +0000 (23:00 +0000)
committerJessica Paquette <jpaquette@apple.com>
Thu, 12 Sep 2019 23:00:59 +0000 (23:00 +0000)
commita5e10524acf16aad99a9ab0c4359de87fcb8d783
tree3f8538fd5f756b2e01eb70216008f30574c8a4f8
parent11df0bc741030294ef300b128897d1ef54c23438
[AArch64][GlobalISel] Support tail calling with swiftself parameters

Swiftself uses a callee-saved register. We can tail call when the register used
in the caller and callee is the same.

This behaviour is equivalent to that in `TargetLowering::parametersInCSRMatch`.

Update call-translator-tail-call.ll to verify that we can do this. When we
support inline assembly, we can write a check similar to the one in the
general swiftself.ll. For now, we need to verify that we get the correct COPY
instruction after call lowering.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371788 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64CallLowering.cpp
test/CodeGen/AArch64/GlobalISel/call-translator-tail-call.ll