1 ; RUN: llc < %s -mtriple=x86_64-pc-linux | FileCheck %s 2 3 declare x86_64_win64cc void @win64_callee(i32) 4 declare void @sysv_callee(i32) 5 6 define void @sysv_caller(i32 %p1) { 7 entry: 8 tail call x86_64_win64cc void @win64_callee(i32 %p1) 9 ret void 10 } 11 12 ; CHECK-LABEL: sysv_caller: 13 ; CHECK: subq $40, %rsp 14 ; CHECK: callq win64_callee 15 ; CHECK: addq $40, %rsp 16 ; CHECK: retq 17 18 define x86_64_win64cc void @win64_caller(i32 %p1) { 19 entry: 20 tail call void @sysv_callee(i32 %p1) 21 ret void 22 } 23 24 ; CHECK-LABEL: win64_caller: 25 ; CHECK: callq sysv_callee 26 ; CHECK: retq 27 28 define void @sysv_matched(i32 %p1) { 29 tail call void @sysv_callee(i32 %p1) 30 ret void 31 } 32 33 ; CHECK-LABEL: sysv_matched: 34 ; CHECK: jmp sysv_callee # TAILCALL 35 36 define x86_64_win64cc void @win64_matched(i32 %p1) { 37 tail call x86_64_win64cc void @win64_callee(i32 %p1) 38 ret void 39 } 40 41 ; CHECK-LABEL: win64_matched: 42 ; CHECK: jmp win64_callee # TAILCALL 43