1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
Francis Visoiu Mistrih b41107b778 [X86] Enable tail calls for CallingConv::Swift
It's currently only enabled on AArch64 (enabled in r281376).

llvm-svn: 357809
2019-04-05 20:18:25 +00:00

22 lines
486 B
LLVM

; RUN: llc -mtriple x86_64-- -filetype asm -o - %s | FileCheck %s
; RUN: llc -mtriple x86_64-unknown-windows-msvc -filetype asm -o - %s | FileCheck %s --check-prefix=MSVC
define swiftcc void @f() {
%1 = alloca i8
ret void
}
; MSVC-LABEL: f
; MSVC: .seh_stackalloc 8
; MSVC: .seh_endprologue
declare swiftcc i64 @myFunc()
define swiftcc i64 @myFunc2() nounwind {
%r = tail call swiftcc i64 @myFunc()
ret i64 %r
}
; CHECK-LABEL: myFunc2
; CHECK: jmp myFunc
; CHECK-NOT: call