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