1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mattr=-code-object-v3 -mcpu=gfx900 -filetype=obj -o - < %s | llvm-readelf --notes | FileCheck --check-prefix=CHECK --check-prefix=GFX900 --check-prefix=NOTES %s
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mattr=-code-object-v3 -mcpu=gfx900 -amdgpu-dump-hsa-metadata -amdgpu-verify-hsa-metadata -filetype=obj -o - < %s 2>&1 | FileCheck --check-prefix=PARSER %s
5 ; CHECK: Version: [ 1, 0 ]
9 ; CHECK: - Name: test_non_enqueue_kernel_caller
10 ; CHECK-NEXT: SymbolName: 'test_non_enqueue_kernel_caller@kd'
11 ; CHECK-NEXT: Language: OpenCL C
12 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
14 ; CHECK-NEXT: - Name: a
15 ; CHECK-NEXT: TypeName: char
17 ; CHECK-NEXT: Align: 1
18 ; CHECK-NEXT: ValueKind: ByValue
19 ; CHECK-NEXT: ValueType: I8
20 ; CHECK-NEXT: AccQual: Default
21 ; CHECK-NEXT: - Size: 8
22 ; CHECK-NEXT: Align: 8
23 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
24 ; CHECK-NEXT: ValueType: I64
25 ; CHECK-NEXT: - Size: 8
26 ; CHECK-NEXT: Align: 8
27 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
28 ; CHECK-NEXT: ValueType: I64
29 ; CHECK-NEXT: - Size: 8
30 ; CHECK-NEXT: Align: 8
31 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
32 ; CHECK-NEXT: ValueType: I64
33 ; CHECK-NOT: ValueKind: HiddenDefaultQueue
34 ; CHECK-NOT: ValueKind: HiddenCompletionAction
35 define amdgpu_kernel void @test_non_enqueue_kernel_caller(i8 %a) #0
36 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
37 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 {
41 ; CHECK: - Name: test_enqueue_kernel_caller
42 ; CHECK-NEXT: SymbolName: 'test_enqueue_kernel_caller@kd'
43 ; CHECK-NEXT: Language: OpenCL C
44 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
46 ; CHECK-NEXT: - Name: a
47 ; CHECK-NEXT: TypeName: char
49 ; CHECK-NEXT: Align: 1
50 ; CHECK-NEXT: ValueKind: ByValue
51 ; CHECK-NEXT: ValueType: I8
52 ; CHECK-NEXT: AccQual: Default
53 ; CHECK-NEXT: - Size: 8
54 ; CHECK-NEXT: Align: 8
55 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
56 ; CHECK-NEXT: ValueType: I64
57 ; CHECK-NEXT: - Size: 8
58 ; CHECK-NEXT: Align: 8
59 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
60 ; CHECK-NEXT: ValueType: I64
61 ; CHECK-NEXT: - Size: 8
62 ; CHECK-NEXT: Align: 8
63 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
64 ; CHECK-NEXT: ValueType: I64
65 ; CHECK-NEXT: - Size: 8
66 ; CHECK-NEXT: Align: 8
67 ; CHECK-NEXT: ValueKind: HiddenNone
68 ; CHECK-NEXT: ValueType: I8
69 ; CHECK-NEXT: AddrSpaceQual: Global
70 ; CHECK-NEXT: - Size: 8
71 ; CHECK-NEXT: Align: 8
72 ; CHECK-NEXT: ValueKind: HiddenDefaultQueue
73 ; CHECK-NEXT: ValueType: I8
74 ; CHECK-NEXT: AddrSpaceQual: Global
75 ; CHECK-NEXT: - Size: 8
76 ; CHECK-NEXT: Align: 8
77 ; CHECK-NEXT: ValueKind: HiddenCompletionAction
78 ; CHECK-NEXT: ValueType: I8
79 ; CHECK-NEXT: AddrSpaceQual: Global
80 define amdgpu_kernel void @test_enqueue_kernel_caller(i8 %a) #1
81 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
82 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 {
86 attributes #0 = { "amdgpu-implicitarg-num-bytes"="48" }
87 attributes #1 = { "calls-enqueue-kernel" "amdgpu-implicitarg-num-bytes"="48" }
94 !opencl.ocl.version = !{!90}
97 ; PARSER: AMDGPU HSA Metadata Parser Test: PASS