1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=2 -mcpu=gfx900 -filetype=obj -o - < %s | llvm-readelf --notes - | FileCheck %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 ]
8 ; CHECK: - Name: test_kernel
9 ; CHECK-NEXT: SymbolName: 'test_kernel@kd'
10 ; CHECK-NEXT: Language: OpenCL C
11 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
13 ; CHECK-NEXT: - Name: a
14 ; CHECK-NEXT: TypeName: char
16 ; CHECK-NEXT: Align: 1
17 ; CHECK-NEXT: ValueKind: ByValue
18 ; CHECK-NEXT: AccQual: Default
19 ; CHECK-NEXT: - Size: 8
20 ; CHECK-NEXT: Align: 8
21 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
22 ; CHECK-NEXT: - Size: 8
23 ; CHECK-NEXT: Align: 8
24 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
25 ; CHECK-NEXT: - Size: 8
26 ; CHECK-NEXT: Align: 8
27 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
28 ; CHECK-NEXT: - Size: 8
29 ; CHECK-NEXT: Align: 8
30 ; CHECK-NEXT: ValueKind: HiddenHostcallBuffer
31 ; CHECK-NEXT: AddrSpaceQual: Global
32 ; CHECK-NOT: ValueKind: HiddenDefaultQueue
33 ; CHECK-NOT: ValueKind: HiddenCompletionAction
35 declare <2 x i64> @__ockl_hostcall_internal(i8*, i32, i64, i64, i64, i64, i64, i64, i64, i64)
37 define amdgpu_kernel void @test_kernel(i8 %a) #0
38 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
39 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 {
43 attributes #0 = { "amdgpu-implicitarg-num-bytes"="48" }
50 !opencl.ocl.version = !{!90}
53 ; PARSER: AMDGPU HSA Metadata Parser Test: PASS