1 ; RUN: llc -mattr=+code-object-v3 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 -filetype=obj -o - < %s | llvm-readelf --notes | FileCheck --check-prefix=CHECK --check-prefix=GFX700 --check-prefix=NOTES %s
2 ; RUN: llc -mattr=+code-object-v3 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx802 -filetype=obj -o - < %s | llvm-readelf --notes | FileCheck --check-prefix=CHECK --check-prefix=GFX802 --check-prefix=NOTES %s
3 ; RUN: llc -mattr=+code-object-v3 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj -o - < %s | llvm-readelf --notes | FileCheck --check-prefix=CHECK --check-prefix=GFX900 --check-prefix=NOTES %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: .value_type: struct
28 ; CHECK: - .address_space: global
32 ; CHECK: .type_name: image1d_array_t
33 ; CHECK: .value_kind: image
34 ; CHECK: .value_type: struct
35 ; CHECK: - .address_space: global
39 ; CHECK: .type_name: image1d_buffer_t
40 ; CHECK: .value_kind: image
41 ; CHECK: .value_type: struct
42 ; CHECK: - .address_space: global
46 ; CHECK: .type_name: image2d_t
47 ; CHECK: .value_kind: image
48 ; CHECK: .value_type: struct
49 ; CHECK: - .address_space: global
53 ; CHECK: .type_name: image2d_array_t
54 ; CHECK: .value_kind: image
55 ; CHECK: .value_type: struct
56 ; CHECK: - .address_space: global
60 ; CHECK: .type_name: image2d_array_depth_t
61 ; CHECK: .value_kind: image
62 ; CHECK: .value_type: struct
63 ; CHECK: - .address_space: global
67 ; CHECK: .type_name: image2d_array_msaa_t
68 ; CHECK: .value_kind: image
69 ; CHECK: .value_type: struct
70 ; CHECK: - .address_space: global
74 ; CHECK: .type_name: image2d_array_msaa_depth_t
75 ; CHECK: .value_kind: image
76 ; CHECK: .value_type: struct
77 ; CHECK: - .address_space: global
81 ; CHECK: .type_name: image2d_depth_t
82 ; CHECK: .value_kind: image
83 ; CHECK: .value_type: struct
84 ; CHECK: - .address_space: global
88 ; CHECK: .type_name: image2d_msaa_t
89 ; CHECK: .value_kind: image
90 ; CHECK: .value_type: struct
91 ; CHECK: - .address_space: global
95 ; CHECK: .type_name: image2d_msaa_depth_t
96 ; CHECK: .value_kind: image
97 ; CHECK: .value_type: struct
98 ; CHECK: - .address_space: global
102 ; CHECK: .type_name: image3d_t
103 ; CHECK: .value_kind: image
104 ; CHECK: .value_type: struct
105 define amdgpu_kernel void @test(%opencl.image1d_t addrspace(1)* %a,
106 %opencl.image1d_array_t addrspace(1)* %b,
107 %opencl.image1d_buffer_t addrspace(1)* %c,
108 %opencl.image2d_t addrspace(1)* %d,
109 %opencl.image2d_array_t addrspace(1)* %e,
110 %opencl.image2d_array_depth_t addrspace(1)* %f,
111 %opencl.image2d_array_msaa_t addrspace(1)* %g,
112 %opencl.image2d_array_msaa_depth_t addrspace(1)* %h,
113 %opencl.image2d_depth_t addrspace(1)* %i,
114 %opencl.image2d_msaa_t addrspace(1)* %j,
115 %opencl.image2d_msaa_depth_t addrspace(1)* %k,
116 %opencl.image3d_t addrspace(1)* %l)
117 !kernel_arg_type !1 !kernel_arg_base_type !1 {
121 ; CHECK: amdhsa.version:
125 !1 = !{!"image1d_t", !"image1d_array_t", !"image1d_buffer_t",
126 !"image2d_t", !"image2d_array_t", !"image2d_array_depth_t",
127 !"image2d_array_msaa_t", !"image2d_array_msaa_depth_t",
128 !"image2d_depth_t", !"image2d_msaa_t", !"image2d_msaa_depth_t",