1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 --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=gfx802 --amdhsa-code-object-version=3 -filetype=obj -o - < %s | llvm-readelf --notes - | FileCheck --check-prefix=CHECK %s
3 ; 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
5 %opencl.image1d_t = type opaque
6 %opencl.image1d_array_t = type opaque
7 %opencl.image1d_buffer_t = type opaque
8 %opencl.image2d_t = type opaque
9 %opencl.image2d_array_t = type opaque
10 %opencl.image2d_array_depth_t = type opaque
11 %opencl.image2d_array_msaa_t = type opaque
12 %opencl.image2d_array_msaa_depth_t = type opaque
13 %opencl.image2d_depth_t = type opaque
14 %opencl.image2d_msaa_t = type opaque
15 %opencl.image2d_msaa_depth_t = type opaque
16 %opencl.image3d_t = type opaque
19 ; CHECK: amdhsa.kernels:
21 ; CHECK: - .address_space: global
25 ; CHECK: .type_name: image1d_t
26 ; CHECK: .value_kind: image
27 ; CHECK: - .address_space: global
31 ; CHECK: .type_name: image1d_array_t
32 ; CHECK: .value_kind: image
33 ; CHECK: - .address_space: global
37 ; CHECK: .type_name: image1d_buffer_t
38 ; CHECK: .value_kind: image
39 ; CHECK: - .address_space: global
43 ; CHECK: .type_name: image2d_t
44 ; CHECK: .value_kind: image
45 ; CHECK: - .address_space: global
49 ; CHECK: .type_name: image2d_array_t
50 ; CHECK: .value_kind: image
51 ; CHECK: - .address_space: global
55 ; CHECK: .type_name: image2d_array_depth_t
56 ; CHECK: .value_kind: image
57 ; CHECK: - .address_space: global
61 ; CHECK: .type_name: image2d_array_msaa_t
62 ; CHECK: .value_kind: image
63 ; CHECK: - .address_space: global
67 ; CHECK: .type_name: image2d_array_msaa_depth_t
68 ; CHECK: .value_kind: image
69 ; CHECK: - .address_space: global
73 ; CHECK: .type_name: image2d_depth_t
74 ; CHECK: .value_kind: image
75 ; CHECK: - .address_space: global
79 ; CHECK: .type_name: image2d_msaa_t
80 ; CHECK: .value_kind: image
81 ; CHECK: - .address_space: global
85 ; CHECK: .type_name: image2d_msaa_depth_t
86 ; CHECK: .value_kind: image
87 ; CHECK: - .address_space: global
91 ; CHECK: .type_name: image3d_t
92 ; CHECK: .value_kind: image
93 define amdgpu_kernel void @test(%opencl.image1d_t addrspace(1)* %a,
94 %opencl.image1d_array_t addrspace(1)* %b,
95 %opencl.image1d_buffer_t addrspace(1)* %c,
96 %opencl.image2d_t addrspace(1)* %d,
97 %opencl.image2d_array_t addrspace(1)* %e,
98 %opencl.image2d_array_depth_t addrspace(1)* %f,
99 %opencl.image2d_array_msaa_t addrspace(1)* %g,
100 %opencl.image2d_array_msaa_depth_t addrspace(1)* %h,
101 %opencl.image2d_depth_t addrspace(1)* %i,
102 %opencl.image2d_msaa_t addrspace(1)* %j,
103 %opencl.image2d_msaa_depth_t addrspace(1)* %k,
104 %opencl.image3d_t addrspace(1)* %l)
105 !kernel_arg_type !1 !kernel_arg_base_type !1 {
109 ; CHECK: amdhsa.version:
113 !1 = !{!"image1d_t", !"image1d_array_t", !"image1d_buffer_t",
114 !"image2d_t", !"image2d_array_t", !"image2d_array_depth_t",
115 !"image2d_array_msaa_t", !"image2d_array_msaa_depth_t",
116 !"image2d_depth_t", !"image2d_msaa_t", !"image2d_msaa_depth_t",