[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / llvm / test / CodeGen / AMDGPU / hsa-metadata-enqueue-kernel-v3.ll
blobc223d661ac7c8abc02f2746b7e762ea009eb40bd
1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --amdhsa-code-object-version=3 -filetype=obj -o - < %s | llvm-readelf --notes - | FileCheck --check-prefix=CHECK %s
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --amdhsa-code-object-version=3 -amdgpu-dump-hsa-metadata -amdgpu-verify-hsa-metadata -filetype=obj -o - < %s 2>&1 | FileCheck --check-prefix=PARSER %s
4 ; CHECK:              ---
5 ; CHECK:      amdhsa.kernels:
6 ; CHECK:        - .args:
7 ; CHECK-NEXT:       - .name:           a
8 ; CHECK-NEXT:         .offset:         0
9 ; CHECK-NEXT:         .size:           1
10 ; CHECK-NEXT:         .type_name:      char
11 ; CHECK-NEXT:         .value_kind:     by_value
12 ; CHECK-NEXT:       - .offset:         8
13 ; CHECK-NEXT:         .size:           8
14 ; CHECK-NEXT:         .value_kind:     hidden_global_offset_x
15 ; CHECK-NEXT:       - .offset:         16
16 ; CHECK-NEXT:         .size:           8
17 ; CHECK-NEXT:         .value_kind:     hidden_global_offset_y
18 ; CHECK-NEXT:       - .offset:         24
19 ; CHECK-NEXT:         .size:           8
20 ; CHECK-NEXT:         .value_kind:     hidden_global_offset_z
21 ; CHECK-NOT:        .value_kind:    hidden_default_queue
22 ; CHECK-NOT:        .value_kind:    hidden_completion_action
23 ; CHECK:          .language:       OpenCL C
24 ; CHECK-NEXT:     .language_version:
25 ; CHECK-NEXT:       - 2
26 ; CHECK-NEXT:       - 0
27 ; CHECK:          .name:           test_non_enqueue_kernel_caller
28 ; CHECK:          .symbol:         test_non_enqueue_kernel_caller.kd
29 define amdgpu_kernel void @test_non_enqueue_kernel_caller(i8 %a) #0
30     !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
31     !kernel_arg_base_type !3 !kernel_arg_type_qual !4 {
32   ret void
35 ; CHECK:        - .args:
36 ; CHECK-NEXT:       - .name:           a
37 ; CHECK-NEXT:         .offset:         0
38 ; CHECK-NEXT:         .size:           1
39 ; CHECK-NEXT:         .type_name:      char
40 ; CHECK-NEXT:         .value_kind:     by_value
41 ; CHECK-NEXT:       - .offset:         8
42 ; CHECK-NEXT:         .size:           8
43 ; CHECK-NEXT:         .value_kind:     hidden_global_offset_x
44 ; CHECK-NEXT:       - .offset:         16
45 ; CHECK-NEXT:         .size:           8
46 ; CHECK-NEXT:         .value_kind:     hidden_global_offset_y
47 ; CHECK-NEXT:       - .offset:         24
48 ; CHECK-NEXT:         .size:           8
49 ; CHECK-NEXT:         .value_kind:     hidden_global_offset_z
50 ; CHECK-NEXT:       - .offset:         32
51 ; CHECK-NEXT:         .size:           8
52 ; CHECK-NEXT:         .value_kind:     hidden_hostcall_buffer
53 ; CHECK-NEXT:       - .offset:         40
54 ; CHECK-NEXT:         .size:           8
55 ; CHECK-NEXT:         .value_kind:     hidden_default_queue
56 ; CHECK-NEXT:       - .offset:         48
57 ; CHECK-NEXT:         .size:           8
58 ; CHECK-NEXT:         .value_kind:     hidden_completion_action
59 ; CHECK:          .language:       OpenCL C
60 ; CHECK-NEXT:     .language_version:
61 ; CHECK-NEXT:       - 2
62 ; CHECK-NEXT:       - 0
63 ; CHECK:          .name:           test_enqueue_kernel_caller
64 ; CHECK:          .symbol:         test_enqueue_kernel_caller.kd
65 define amdgpu_kernel void @test_enqueue_kernel_caller(i8 %a) #1
66     !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
67     !kernel_arg_base_type !3 !kernel_arg_type_qual !4 {
68   ret void
71 ; CHECK:  amdhsa.version:
72 ; CHECK-NEXT: - 1
73 ; CHECK-NEXT: - 0
74 ; CHECK-NOT:  amdhsa.printf:
76 attributes #0 = { optnone noinline "amdgpu-implicitarg-num-bytes"="48" }
77 attributes #1 = { optnone noinline "calls-enqueue-kernel" "amdgpu-implicitarg-num-bytes"="48" }
79 !1 = !{i32 0}
80 !2 = !{!"none"}
81 !3 = !{!"char"}
82 !4 = !{!""}
84 !opencl.ocl.version = !{!90}
85 !90 = !{i32 2, i32 0}
87 ; PARSER: AMDGPU HSA Metadata Parser Test: PASS