amdgpu-cc.ll
1.64 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
; CHECK: Calling convention requires void return type
; CHECK-NEXT: i32 ()* @nonvoid_cc_amdgpu_kernel
define amdgpu_kernel i32 @nonvoid_cc_amdgpu_kernel() {
ret i32 0
}
; CHECK: Calling convention does not support varargs or perfect forwarding!
; CHECK-NEXT: void (...)* @varargs_amdgpu_kernel
define amdgpu_kernel void @varargs_amdgpu_kernel(...) {
ret void
}
; CHECK: Calling convention does not allow sret
; CHECK-NEXT: void (i32*)* @sret_cc_amdgpu_kernel
define amdgpu_kernel void @sret_cc_amdgpu_kernel(i32* sret %ptr) {
ret void
}
; CHECK: Calling convention does not support varargs or perfect forwarding!
; CHECK-NEXT: void (...)* @varargs_amdgpu_vs
define amdgpu_vs void @varargs_amdgpu_vs(...) {
ret void
}
; CHECK: Calling convention does not support varargs or perfect forwarding!
; CHECK-NEXT: void (...)* @varargs_amdgpu_gs
define amdgpu_gs void @varargs_amdgpu_gs(...) {
ret void
}
; CHECK: Calling convention does not support varargs or perfect forwarding!
; CHECK-NEXT: void (...)* @varargs_amdgpu_ps
define amdgpu_ps void @varargs_amdgpu_ps(...) {
ret void
}
; CHECK: Calling convention does not support varargs or perfect forwarding!
; CHECK-NEXT: void (...)* @varargs_amdgpu_cs
define amdgpu_cs void @varargs_amdgpu_cs(...) {
ret void
}
; CHECK: Calling convention requires void return type
; CHECK-NEXT: i32 ()* @nonvoid_cc_spir_kernel
define spir_kernel i32 @nonvoid_cc_spir_kernel() {
ret i32 0
}
; CHECK: Calling convention does not support varargs or perfect forwarding!
; CHECK-NEXT: void (...)* @varargs_spir_kernel
define spir_kernel void @varargs_spir_kernel(...) {
ret void
}