1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=2 -mcpu=gfx900 -filetype=obj -o - < %s | llvm-readelf --notes - | FileCheck --check-prefix=CHECK %s
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=2 -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: AccQual: Default
20 ; CHECK-NEXT: - Size: 8
21 ; CHECK-NEXT: Align: 8
22 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
23 ; CHECK-NEXT: - Size: 8
24 ; CHECK-NEXT: Align: 8
25 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
26 ; CHECK-NEXT: - Size: 8
27 ; CHECK-NEXT: Align: 8
28 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
29 ; CHECK-NOT: ValueKind: HiddenDefaultQueue
30 ; CHECK-NOT: ValueKind: HiddenCompletionAction
31 define amdgpu_kernel void @test_non_enqueue_kernel_caller(i8 %a) #0
32 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
33 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 {
37 ; CHECK: - Name: test_enqueue_kernel_caller
38 ; CHECK-NEXT: SymbolName: 'test_enqueue_kernel_caller@kd'
39 ; CHECK-NEXT: Language: OpenCL C
40 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
42 ; CHECK-NEXT: - Name: a
43 ; CHECK-NEXT: TypeName: char
45 ; CHECK-NEXT: Align: 1
46 ; CHECK-NEXT: ValueKind: ByValue
47 ; CHECK-NEXT: AccQual: Default
48 ; CHECK-NEXT: - Size: 8
49 ; CHECK-NEXT: Align: 8
50 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
51 ; CHECK-NEXT: - Size: 8
52 ; CHECK-NEXT: Align: 8
53 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
54 ; CHECK-NEXT: - Size: 8
55 ; CHECK-NEXT: Align: 8
56 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
57 ; CHECK-NEXT: - Size: 8
58 ; CHECK-NEXT: Align: 8
59 ; CHECK-NEXT: ValueKind: HiddenNone
60 ; CHECK-NEXT: AddrSpaceQual: Global
61 ; CHECK-NEXT: - Size: 8
62 ; CHECK-NEXT: Align: 8
63 ; CHECK-NEXT: ValueKind: HiddenDefaultQueue
64 ; CHECK-NEXT: AddrSpaceQual: Global
65 ; CHECK-NEXT: - Size: 8
66 ; CHECK-NEXT: Align: 8
67 ; CHECK-NEXT: ValueKind: HiddenCompletionAction
68 ; CHECK-NEXT: AddrSpaceQual: Global
69 define amdgpu_kernel void @test_enqueue_kernel_caller(i8 %a) #1
70 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
71 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 {
75 attributes #0 = { "amdgpu-implicitarg-num-bytes"="48" }
76 attributes #1 = { "calls-enqueue-kernel" "amdgpu-implicitarg-num-bytes"="48" }
83 !opencl.ocl.version = !{!90}
86 ; PARSER: AMDGPU HSA Metadata Parser Test: PASS