1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 --amdhsa-code-object-version=2 -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=2 -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=2 -filetype=obj -o - < %s | llvm-readelf --notes - | FileCheck --check-prefix=CHECK %s
4 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 --amdhsa-code-object-version=2 -amdgpu-dump-hsa-metadata -amdgpu-verify-hsa-metadata -filetype=obj -o - < %s 2>&1 | FileCheck --check-prefix=PARSER %s
5 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx802 --amdhsa-code-object-version=2 -amdgpu-dump-hsa-metadata -amdgpu-verify-hsa-metadata -filetype=obj -o - < %s 2>&1 | FileCheck --check-prefix=PARSER %s
6 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --amdhsa-code-object-version=2 -amdgpu-dump-hsa-metadata -amdgpu-verify-hsa-metadata -filetype=obj -o - < %s 2>&1 | FileCheck --check-prefix=PARSER %s
8 %struct.A = type { i8, float }
9 %opencl.image1d_t = type opaque
10 %opencl.image2d_t = type opaque
11 %opencl.image3d_t = type opaque
12 %opencl.queue_t = type opaque
13 %opencl.pipe_t = type opaque
14 %struct.B = type { i32 addrspace(1)*}
15 %opencl.clk_event_t = type opaque
17 @__test_block_invoke_kernel_runtime_handle = external addrspace(1) externally_initialized constant i8 addrspace(1)*
20 ; CHECK: Version: [ 1, 0 ]
22 ; CHECK: - '1:1:4:%d\n'
23 ; CHECK: - '2:1:8:%g\n'
26 ; CHECK: - Name: test_char
27 ; CHECK-NEXT: SymbolName: 'test_char@kd'
28 ; CHECK-NEXT: Language: OpenCL C
29 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
31 ; CHECK-NEXT: - Name: a
32 ; CHECK-NEXT: TypeName: char
34 ; CHECK-NEXT: Align: 1
35 ; CHECK-NEXT: ValueKind: ByValue
36 ; CHECK-NEXT: AccQual: Default
37 ; CHECK-NEXT: - Size: 8
38 ; CHECK-NEXT: Align: 8
39 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
40 ; CHECK-NEXT: - Size: 8
41 ; CHECK-NEXT: Align: 8
42 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
43 ; CHECK-NEXT: - Size: 8
44 ; CHECK-NEXT: Align: 8
45 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
46 ; CHECK-NEXT: - Size: 8
47 ; CHECK-NEXT: Align: 8
48 ; CHECK-NOT: ValueKind: HiddenHostcallBuffer
49 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
50 ; CHECK-NEXT: AddrSpaceQual: Global
51 ; CHECK-NOT: ValueKind: HiddenDefaultQueue
52 ; CHECK-NOT: ValueKind: HiddenCompletionAction
53 ; CHECK: ValueKind: HiddenMultiGridSyncArg
54 ; CHECK-NEXT: AddrSpaceQual: Global
55 define amdgpu_kernel void @test_char(i8 %a) #0
56 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !9
57 !kernel_arg_base_type !9 !kernel_arg_type_qual !4 {
61 ; CHECK: - Name: test_char_byref_constant
62 ; CHECK-NEXT: SymbolName: 'test_char_byref_constant@kd'
63 ; CHECK-NEXT: Language: OpenCL C
64 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
66 ; CHECK-NEXT: - Name: a
67 ; CHECK-NEXT: TypeName: char
69 ; CHECK-NEXT: Align: 1
70 ; CHECK-NEXT: ValueKind: ByValue
71 ; CHECK-NEXT: AccQual: Default
72 ; CHECK-NEXT: - Size: 8
73 ; CHECK-NEXT: Align: 8
74 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
75 ; CHECK-NEXT: - Size: 8
76 ; CHECK-NEXT: Align: 8
77 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
78 ; CHECK-NEXT: - Size: 8
79 ; CHECK-NEXT: Align: 8
80 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
81 ; CHECK-NEXT: - Size: 8
82 ; CHECK-NEXT: Align: 8
83 ; CHECK-NOT: ValueKind: HiddenHostcallBuffer
84 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
85 ; CHECK-NEXT: AddrSpaceQual: Global
86 ; CHECK-NOT: ValueKind: HiddenDefaultQueue
87 ; CHECK-NOT: ValueKind: HiddenCompletionAction
88 ; CHECK: ValueKind: HiddenMultiGridSyncArg
89 ; CHECK-NEXT: AddrSpaceQual: Global
90 define amdgpu_kernel void @test_char_byref_constant(i8 addrspace(4)* byref(i8) %a) #0
91 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !9
92 !kernel_arg_base_type !9 !kernel_arg_type_qual !4 {
96 ; CHECK: - Name: test_char_byref_constant_align512
97 ; CHECK-NEXT: SymbolName: 'test_char_byref_constant_align512@kd'
98 ; CHECK-NEXT: Language: OpenCL C
99 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
101 ; CHECK-NEXT: TypeName: char
102 ; CHECK-NEXT: Size: 1
103 ; CHECK-NEXT: Align: 1
104 ; CHECK-NEXT: ValueKind: ByValue
105 ; CHECK-NEXT: AccQual: Default
106 ; CHECK-NEXT: - Name: a
107 ; CHECK-NEXT: TypeName: char
108 ; CHECK-NEXT: Size: 1
109 ; CHECK-NEXT: Align: 512
110 ; CHECK-NEXT: ValueKind: ByValue
111 ; CHECK-NEXT: - Size: 8
112 ; CHECK-NEXT: Align: 8
113 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
114 ; CHECK-NEXT: - Size: 8
115 ; CHECK-NEXT: Align: 8
116 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
117 ; CHECK-NEXT: - Size: 8
118 ; CHECK-NEXT: Align: 8
119 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
120 ; CHECK-NEXT: - Size: 8
121 ; CHECK-NEXT: Align: 8
122 ; CHECK-NOT: ValueKind: HiddenHostcallBuffer
123 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
124 ; CHECK-NEXT: AddrSpaceQual: Global
125 ; CHECK-NOT: ValueKind: HiddenDefaultQueue
126 ; CHECK-NOT: ValueKind: HiddenCompletionAction
127 ; CHECK: ValueKind: HiddenMultiGridSyncArg
128 ; CHECK-NEXT: AddrSpaceQual: Global
129 define amdgpu_kernel void @test_char_byref_constant_align512(i8, i8 addrspace(4)* byref(i8) align 512 %a) #0
130 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !111
131 !kernel_arg_base_type !9 !kernel_arg_type_qual !4 {
135 ; CHECK: - Name: test_ushort2
136 ; CHECK-NEXT: SymbolName: 'test_ushort2@kd'
137 ; CHECK-NEXT: Language: OpenCL C
138 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
140 ; CHECK-NEXT: - Name: a
141 ; CHECK-NEXT: TypeName: ushort2
142 ; CHECK-NEXT: Size: 4
143 ; CHECK-NEXT: Align: 4
144 ; CHECK-NEXT: ValueKind: ByValue
145 ; CHECK-NEXT: AccQual: Default
146 ; CHECK-NEXT: - Size: 8
147 ; CHECK-NEXT: Align: 8
148 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
149 ; CHECK-NEXT: - Size: 8
150 ; CHECK-NEXT: Align: 8
151 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
152 ; CHECK-NEXT: - Size: 8
153 ; CHECK-NEXT: Align: 8
154 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
155 ; CHECK-NEXT: - Size: 8
156 ; CHECK-NEXT: Align: 8
157 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
158 ; CHECK-NEXT: AddrSpaceQual: Global
159 ; CHECK-NEXT: - Size: 8
160 ; CHECK-NEXT: Align: 8
161 ; CHECK-NEXT: ValueKind: HiddenNone
162 ; CHECK-NEXT: AddrSpaceQual: Global
163 ; CHECK-NEXT: - Size: 8
164 ; CHECK-NEXT: Align: 8
165 ; CHECK-NEXT: ValueKind: HiddenNone
166 ; CHECK-NEXT: AddrSpaceQual: Global
167 ; CHECK-NEXT: - Size: 8
168 ; CHECK-NEXT: Align: 8
169 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
170 ; CHECK-NEXT: AddrSpaceQual: Global
171 define amdgpu_kernel void @test_ushort2(<2 x i16> %a) #0
172 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !10
173 !kernel_arg_base_type !10 !kernel_arg_type_qual !4 {
177 ; CHECK: - Name: test_int3
178 ; CHECK-NEXT: SymbolName: 'test_int3@kd'
179 ; CHECK-NEXT: Language: OpenCL C
180 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
182 ; CHECK-NEXT: - Name: a
183 ; CHECK-NEXT: TypeName: int3
184 ; CHECK-NEXT: Size: 16
185 ; CHECK-NEXT: Align: 16
186 ; CHECK-NEXT: ValueKind: ByValue
187 ; CHECK-NEXT: AccQual: Default
188 ; CHECK-NEXT: - Size: 8
189 ; CHECK-NEXT: Align: 8
190 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
191 ; CHECK-NEXT: - Size: 8
192 ; CHECK-NEXT: Align: 8
193 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
194 ; CHECK-NEXT: - Size: 8
195 ; CHECK-NEXT: Align: 8
196 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
197 ; CHECK-NEXT: - Size: 8
198 ; CHECK-NEXT: Align: 8
199 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
200 ; CHECK-NEXT: AddrSpaceQual: Global
201 ; CHECK-NEXT: - Size: 8
202 ; CHECK-NEXT: Align: 8
203 ; CHECK-NEXT: ValueKind: HiddenNone
204 ; CHECK-NEXT: AddrSpaceQual: Global
205 ; CHECK-NEXT: - Size: 8
206 ; CHECK-NEXT: Align: 8
207 ; CHECK-NEXT: ValueKind: HiddenNone
208 ; CHECK-NEXT: AddrSpaceQual: Global
209 ; CHECK-NEXT: - Size: 8
210 ; CHECK-NEXT: Align: 8
211 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
212 ; CHECK-NEXT: AddrSpaceQual: Global
213 define amdgpu_kernel void @test_int3(<3 x i32> %a) #0
214 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !11
215 !kernel_arg_base_type !11 !kernel_arg_type_qual !4 {
219 ; CHECK: - Name: test_ulong4
220 ; CHECK-NEXT: SymbolName: 'test_ulong4@kd'
221 ; CHECK-NEXT: Language: OpenCL C
222 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
224 ; CHECK-NEXT: - Name: a
225 ; CHECK-NEXT: TypeName: ulong4
226 ; CHECK-NEXT: Size: 32
227 ; CHECK-NEXT: Align: 32
228 ; CHECK-NEXT: ValueKind: ByValue
229 ; CHECK-NEXT: AccQual: Default
230 ; CHECK-NEXT: - Size: 8
231 ; CHECK-NEXT: Align: 8
232 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
233 ; CHECK-NEXT: - Size: 8
234 ; CHECK-NEXT: Align: 8
235 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
236 ; CHECK-NEXT: - Size: 8
237 ; CHECK-NEXT: Align: 8
238 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
239 ; CHECK-NEXT: - Size: 8
240 ; CHECK-NEXT: Align: 8
241 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
242 ; CHECK-NEXT: AddrSpaceQual: Global
243 ; CHECK-NEXT: - Size: 8
244 ; CHECK-NEXT: Align: 8
245 ; CHECK-NEXT: ValueKind: HiddenNone
246 ; CHECK-NEXT: AddrSpaceQual: Global
247 ; CHECK-NEXT: - Size: 8
248 ; CHECK-NEXT: Align: 8
249 ; CHECK-NEXT: ValueKind: HiddenNone
250 ; CHECK-NEXT: AddrSpaceQual: Global
251 ; CHECK-NEXT: - Size: 8
252 ; CHECK-NEXT: Align: 8
253 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
254 ; CHECK-NEXT: AddrSpaceQual: Global
255 define amdgpu_kernel void @test_ulong4(<4 x i64> %a) #0
256 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !12
257 !kernel_arg_base_type !12 !kernel_arg_type_qual !4 {
261 ; CHECK: - Name: test_half8
262 ; CHECK-NEXT: SymbolName: 'test_half8@kd'
263 ; CHECK-NEXT: Language: OpenCL C
264 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
266 ; CHECK-NEXT: - Name: a
267 ; CHECK-NEXT: TypeName: half8
268 ; CHECK-NEXT: Size: 16
269 ; CHECK-NEXT: Align: 16
270 ; CHECK-NEXT: ValueKind: ByValue
271 ; CHECK-NEXT: AccQual: Default
272 ; CHECK-NEXT: - Size: 8
273 ; CHECK-NEXT: Align: 8
274 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
275 ; CHECK-NEXT: - Size: 8
276 ; CHECK-NEXT: Align: 8
277 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
278 ; CHECK-NEXT: - Size: 8
279 ; CHECK-NEXT: Align: 8
280 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
281 ; CHECK-NEXT: - Size: 8
282 ; CHECK-NEXT: Align: 8
283 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
284 ; CHECK-NEXT: AddrSpaceQual: Global
285 ; CHECK-NEXT: - Size: 8
286 ; CHECK-NEXT: Align: 8
287 ; CHECK-NEXT: ValueKind: HiddenNone
288 ; CHECK-NEXT: AddrSpaceQual: Global
289 ; CHECK-NEXT: - Size: 8
290 ; CHECK-NEXT: Align: 8
291 ; CHECK-NEXT: ValueKind: HiddenNone
292 ; CHECK-NEXT: AddrSpaceQual: Global
293 ; CHECK-NEXT: - Size: 8
294 ; CHECK-NEXT: Align: 8
295 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
296 ; CHECK-NEXT: AddrSpaceQual: Global
297 define amdgpu_kernel void @test_half8(<8 x half> %a) #0
298 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !13
299 !kernel_arg_base_type !13 !kernel_arg_type_qual !4 {
303 ; CHECK: - Name: test_float16
304 ; CHECK-NEXT: SymbolName: 'test_float16@kd'
305 ; CHECK-NEXT: Language: OpenCL C
306 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
308 ; CHECK-NEXT: - Name: a
309 ; CHECK-NEXT: TypeName: float16
310 ; CHECK-NEXT: Size: 64
311 ; CHECK-NEXT: Align: 64
312 ; CHECK-NEXT: ValueKind: ByValue
313 ; CHECK-NEXT: AccQual: Default
314 ; CHECK-NEXT: - Size: 8
315 ; CHECK-NEXT: Align: 8
316 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
317 ; CHECK-NEXT: - Size: 8
318 ; CHECK-NEXT: Align: 8
319 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
320 ; CHECK-NEXT: - Size: 8
321 ; CHECK-NEXT: Align: 8
322 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
323 ; CHECK-NEXT: - Size: 8
324 ; CHECK-NEXT: Align: 8
325 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
326 ; CHECK-NEXT: AddrSpaceQual: Global
327 ; CHECK-NEXT: - Size: 8
328 ; CHECK-NEXT: Align: 8
329 ; CHECK-NEXT: ValueKind: HiddenNone
330 ; CHECK-NEXT: AddrSpaceQual: Global
331 ; CHECK-NEXT: - Size: 8
332 ; CHECK-NEXT: Align: 8
333 ; CHECK-NEXT: ValueKind: HiddenNone
334 ; CHECK-NEXT: AddrSpaceQual: Global
335 ; CHECK-NEXT: - Size: 8
336 ; CHECK-NEXT: Align: 8
337 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
338 ; CHECK-NEXT: AddrSpaceQual: Global
339 define amdgpu_kernel void @test_float16(<16 x float> %a) #0
340 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !14
341 !kernel_arg_base_type !14 !kernel_arg_type_qual !4 {
345 ; CHECK: - Name: test_double16
346 ; CHECK-NEXT: SymbolName: 'test_double16@kd'
347 ; CHECK-NEXT: Language: OpenCL C
348 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
350 ; CHECK-NEXT: - Name: a
351 ; CHECK-NEXT: TypeName: double16
352 ; CHECK-NEXT: Size: 128
353 ; CHECK-NEXT: Align: 128
354 ; CHECK-NEXT: ValueKind: ByValue
355 ; CHECK-NEXT: AccQual: Default
356 ; CHECK-NEXT: - Size: 8
357 ; CHECK-NEXT: Align: 8
358 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
359 ; CHECK-NEXT: - Size: 8
360 ; CHECK-NEXT: Align: 8
361 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
362 ; CHECK-NEXT: - Size: 8
363 ; CHECK-NEXT: Align: 8
364 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
365 ; CHECK-NEXT: - Size: 8
366 ; CHECK-NEXT: Align: 8
367 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
368 ; CHECK-NEXT: AddrSpaceQual: Global
369 ; CHECK-NEXT: - Size: 8
370 ; CHECK-NEXT: Align: 8
371 ; CHECK-NEXT: ValueKind: HiddenNone
372 ; CHECK-NEXT: AddrSpaceQual: Global
373 ; CHECK-NEXT: - Size: 8
374 ; CHECK-NEXT: Align: 8
375 ; CHECK-NEXT: ValueKind: HiddenNone
376 ; CHECK-NEXT: AddrSpaceQual: Global
377 ; CHECK-NEXT: - Size: 8
378 ; CHECK-NEXT: Align: 8
379 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
380 ; CHECK-NEXT: AddrSpaceQual: Global
381 define amdgpu_kernel void @test_double16(<16 x double> %a) #0
382 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !15
383 !kernel_arg_base_type !15 !kernel_arg_type_qual !4 {
387 ; CHECK: - Name: test_pointer
388 ; CHECK-NEXT: SymbolName: 'test_pointer@kd'
389 ; CHECK-NEXT: Language: OpenCL C
390 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
392 ; CHECK-NEXT: - Name: a
393 ; CHECK-NEXT: TypeName: 'int addrspace(5)*'
394 ; CHECK-NEXT: Size: 8
395 ; CHECK-NEXT: Align: 8
396 ; CHECK-NEXT: ValueKind: GlobalBuffer
397 ; CHECK-NEXT: AddrSpaceQual: Global
398 ; CHECK-NEXT: AccQual: Default
399 ; CHECK-NEXT: - Size: 8
400 ; CHECK-NEXT: Align: 8
401 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
402 ; CHECK-NEXT: - Size: 8
403 ; CHECK-NEXT: Align: 8
404 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
405 ; CHECK-NEXT: - Size: 8
406 ; CHECK-NEXT: Align: 8
407 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
408 ; CHECK-NEXT: - Size: 8
409 ; CHECK-NEXT: Align: 8
410 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
411 ; CHECK-NEXT: AddrSpaceQual: Global
412 ; CHECK-NEXT: - Size: 8
413 ; CHECK-NEXT: Align: 8
414 ; CHECK-NEXT: ValueKind: HiddenNone
415 ; CHECK-NEXT: AddrSpaceQual: Global
416 ; CHECK-NEXT: - Size: 8
417 ; CHECK-NEXT: Align: 8
418 ; CHECK-NEXT: ValueKind: HiddenNone
419 ; CHECK-NEXT: AddrSpaceQual: Global
420 ; CHECK-NEXT: - Size: 8
421 ; CHECK-NEXT: Align: 8
422 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
423 ; CHECK-NEXT: AddrSpaceQual: Global
424 define amdgpu_kernel void @test_pointer(i32 addrspace(1)* %a) #0
425 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !16
426 !kernel_arg_base_type !16 !kernel_arg_type_qual !4 {
430 ; CHECK: - Name: test_image
431 ; CHECK-NEXT: SymbolName: 'test_image@kd'
432 ; CHECK-NEXT: Language: OpenCL C
433 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
435 ; CHECK-NEXT: - Name: a
436 ; CHECK-NEXT: TypeName: image2d_t
437 ; CHECK-NEXT: Size: 8
438 ; CHECK-NEXT: Align: 8
439 ; CHECK-NEXT: ValueKind: Image
440 ; CHECK-NEXT: AddrSpaceQual: Global
441 ; CHECK-NEXT: AccQual: Default
442 ; CHECK-NEXT: - Size: 8
443 ; CHECK-NEXT: Align: 8
444 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
445 ; CHECK-NEXT: - Size: 8
446 ; CHECK-NEXT: Align: 8
447 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
448 ; CHECK-NEXT: - Size: 8
449 ; CHECK-NEXT: Align: 8
450 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
451 ; CHECK-NEXT: - Size: 8
452 ; CHECK-NEXT: Align: 8
453 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
454 ; CHECK-NEXT: AddrSpaceQual: Global
455 ; CHECK-NEXT: - Size: 8
456 ; CHECK-NEXT: Align: 8
457 ; CHECK-NEXT: ValueKind: HiddenNone
458 ; CHECK-NEXT: AddrSpaceQual: Global
459 ; CHECK-NEXT: - Size: 8
460 ; CHECK-NEXT: Align: 8
461 ; CHECK-NEXT: ValueKind: HiddenNone
462 ; CHECK-NEXT: AddrSpaceQual: Global
463 ; CHECK-NEXT: - Size: 8
464 ; CHECK-NEXT: Align: 8
465 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
466 ; CHECK-NEXT: AddrSpaceQual: Global
467 define amdgpu_kernel void @test_image(%opencl.image2d_t addrspace(1)* %a) #0
468 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !17
469 !kernel_arg_base_type !17 !kernel_arg_type_qual !4 {
473 ; CHECK: - Name: test_sampler
474 ; CHECK-NEXT: SymbolName: 'test_sampler@kd'
475 ; CHECK-NEXT: Language: OpenCL C
476 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
478 ; CHECK-NEXT: - Name: a
479 ; CHECK-NEXT: TypeName: sampler_t
480 ; CHECK-NEXT: Size: 4
481 ; CHECK-NEXT: Align: 4
482 ; CHECK-NEXT: ValueKind: Sampler
483 ; CHECK-NEXT: AccQual: Default
484 ; CHECK-NEXT: - Size: 8
485 ; CHECK-NEXT: Align: 8
486 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
487 ; CHECK-NEXT: - Size: 8
488 ; CHECK-NEXT: Align: 8
489 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
490 ; CHECK-NEXT: - Size: 8
491 ; CHECK-NEXT: Align: 8
492 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
493 ; CHECK-NEXT: - Size: 8
494 ; CHECK-NEXT: Align: 8
495 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
496 ; CHECK-NEXT: AddrSpaceQual: Global
497 ; CHECK-NEXT: - Size: 8
498 ; CHECK-NEXT: Align: 8
499 ; CHECK-NEXT: ValueKind: HiddenNone
500 ; CHECK-NEXT: AddrSpaceQual: Global
501 ; CHECK-NEXT: - Size: 8
502 ; CHECK-NEXT: Align: 8
503 ; CHECK-NEXT: ValueKind: HiddenNone
504 ; CHECK-NEXT: AddrSpaceQual: Global
505 ; CHECK-NEXT: - Size: 8
506 ; CHECK-NEXT: Align: 8
507 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
508 ; CHECK-NEXT: AddrSpaceQual: Global
509 define amdgpu_kernel void @test_sampler(i32 %a) #0
510 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !18
511 !kernel_arg_base_type !18 !kernel_arg_type_qual !4 {
515 ; CHECK: - Name: test_queue
516 ; CHECK-NEXT: SymbolName: 'test_queue@kd'
517 ; CHECK-NEXT: Language: OpenCL C
518 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
520 ; CHECK-NEXT: - Name: a
521 ; CHECK-NEXT: TypeName: queue_t
522 ; CHECK-NEXT: Size: 8
523 ; CHECK-NEXT: Align: 8
524 ; CHECK-NEXT: ValueKind: Queue
525 ; CHECK-NEXT: AddrSpaceQual: Global
526 ; CHECK-NEXT: AccQual: Default
527 ; CHECK-NEXT: - Size: 8
528 ; CHECK-NEXT: Align: 8
529 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
530 ; CHECK-NEXT: - Size: 8
531 ; CHECK-NEXT: Align: 8
532 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
533 ; CHECK-NEXT: - Size: 8
534 ; CHECK-NEXT: Align: 8
535 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
536 ; CHECK-NEXT: - Size: 8
537 ; CHECK-NEXT: Align: 8
538 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
539 ; CHECK-NEXT: AddrSpaceQual: Global
540 ; CHECK-NEXT: - Size: 8
541 ; CHECK-NEXT: Align: 8
542 ; CHECK-NEXT: ValueKind: HiddenNone
543 ; CHECK-NEXT: AddrSpaceQual: Global
544 ; CHECK-NEXT: - Size: 8
545 ; CHECK-NEXT: Align: 8
546 ; CHECK-NEXT: ValueKind: HiddenNone
547 ; CHECK-NEXT: AddrSpaceQual: Global
548 ; CHECK-NEXT: - Size: 8
549 ; CHECK-NEXT: Align: 8
550 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
551 ; CHECK-NEXT: AddrSpaceQual: Global
552 define amdgpu_kernel void @test_queue(%opencl.queue_t addrspace(1)* %a) #0
553 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !19
554 !kernel_arg_base_type !19 !kernel_arg_type_qual !4 {
558 ; CHECK: - Name: test_struct
559 ; CHECK-NEXT: SymbolName: 'test_struct@kd'
560 ; CHECK-NEXT: Language: OpenCL C
561 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
563 ; CHECK-NEXT: - Name: a
564 ; CHECK-NEXT: TypeName: struct A
565 ; CHECK-NEXT: Size: 8
566 ; CHECK-NEXT: Align: 4
567 ; CHECK-NEXT: ValueKind: ByValue
568 ; CHECK-NEXT: AccQual: Default
569 ; CHECK-NEXT: - Size: 8
570 ; CHECK-NEXT: Align: 8
571 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
572 ; CHECK-NEXT: - Size: 8
573 ; CHECK-NEXT: Align: 8
574 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
575 ; CHECK-NEXT: - Size: 8
576 ; CHECK-NEXT: Align: 8
577 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
578 ; CHECK-NEXT: - Size: 8
579 ; CHECK-NEXT: Align: 8
580 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
581 ; CHECK-NEXT: AddrSpaceQual: Global
582 ; CHECK-NEXT: - Size: 8
583 ; CHECK-NEXT: Align: 8
584 ; CHECK-NEXT: ValueKind: HiddenNone
585 ; CHECK-NEXT: AddrSpaceQual: Global
586 ; CHECK-NEXT: - Size: 8
587 ; CHECK-NEXT: Align: 8
588 ; CHECK-NEXT: ValueKind: HiddenNone
589 ; CHECK-NEXT: AddrSpaceQual: Global
590 ; CHECK-NEXT: - Size: 8
591 ; CHECK-NEXT: Align: 8
592 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
593 ; CHECK-NEXT: AddrSpaceQual: Global
594 define amdgpu_kernel void @test_struct(%struct.A %a) #0
595 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !20
596 !kernel_arg_base_type !20 !kernel_arg_type_qual !4 {
600 ; CHECK: - Name: test_struct_byref_constant
601 ; CHECK-NEXT: SymbolName: 'test_struct_byref_constant@kd'
602 ; CHECK-NEXT: Language: OpenCL C
603 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
605 ; CHECK-NEXT: - Name: a
606 ; CHECK-NEXT: TypeName: struct A
607 ; CHECK-NEXT: Size: 8
608 ; CHECK-NEXT: Align: 4
609 ; CHECK-NEXT: ValueKind: ByValue
610 ; CHECK-NEXT: AccQual: Default
611 ; CHECK-NEXT: - Size: 8
612 ; CHECK-NEXT: Align: 8
613 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
614 ; CHECK-NEXT: - Size: 8
615 ; CHECK-NEXT: Align: 8
616 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
617 ; CHECK-NEXT: - Size: 8
618 ; CHECK-NEXT: Align: 8
619 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
620 ; CHECK-NEXT: - Size: 8
621 ; CHECK-NEXT: Align: 8
622 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
623 ; CHECK-NEXT: AddrSpaceQual: Global
624 ; CHECK-NEXT: - Size: 8
625 ; CHECK-NEXT: Align: 8
626 ; CHECK-NEXT: ValueKind: HiddenNone
627 ; CHECK-NEXT: AddrSpaceQual: Global
628 ; CHECK-NEXT: - Size: 8
629 ; CHECK-NEXT: Align: 8
630 ; CHECK-NEXT: ValueKind: HiddenNone
631 ; CHECK-NEXT: AddrSpaceQual: Global
632 ; CHECK-NEXT: - Size: 8
633 ; CHECK-NEXT: Align: 8
634 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
635 ; CHECK-NEXT: AddrSpaceQual: Global
636 define amdgpu_kernel void @test_struct_byref_constant(%struct.A addrspace(4)* byref(%struct.A) %a) #0
637 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !20
638 !kernel_arg_base_type !20 !kernel_arg_type_qual !4 {
642 ; CHECK: - Name: test_array
643 ; CHECK-NEXT: SymbolName: 'test_array@kd'
644 ; CHECK-NEXT: Language: OpenCL C
645 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
647 ; CHECK-NEXT: - Name: a
648 ; CHECK-NEXT: TypeName: struct A
649 ; CHECK-NEXT: Size: 8
650 ; CHECK-NEXT: Align: 1
651 ; CHECK-NEXT: ValueKind: ByValue
652 ; CHECK-NEXT: AccQual: Default
653 ; CHECK-NEXT: - Size: 8
654 ; CHECK-NEXT: Align: 8
655 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
656 ; CHECK-NEXT: - Size: 8
657 ; CHECK-NEXT: Align: 8
658 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
659 ; CHECK-NEXT: - Size: 8
660 ; CHECK-NEXT: Align: 8
661 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
662 ; CHECK-NEXT: - Size: 8
663 ; CHECK-NEXT: Align: 8
664 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
665 ; CHECK-NEXT: AddrSpaceQual: Global
666 ; CHECK-NEXT: - Size: 8
667 ; CHECK-NEXT: Align: 8
668 ; CHECK-NEXT: ValueKind: HiddenNone
669 ; CHECK-NEXT: AddrSpaceQual: Global
670 ; CHECK-NEXT: - Size: 8
671 ; CHECK-NEXT: Align: 8
672 ; CHECK-NEXT: ValueKind: HiddenNone
673 ; CHECK-NEXT: AddrSpaceQual: Global
674 ; CHECK-NEXT: - Size: 8
675 ; CHECK-NEXT: Align: 8
676 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
677 ; CHECK-NEXT: AddrSpaceQual: Global
678 define amdgpu_kernel void @test_array([8 x i8] %a) #0
679 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !20
680 !kernel_arg_base_type !20 !kernel_arg_type_qual !4 {
684 ; CHECK: - Name: test_array_byref_constant
685 ; CHECK-NEXT: SymbolName: 'test_array_byref_constant@kd'
686 ; CHECK-NEXT: Language: OpenCL C
687 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
689 ; CHECK-NEXT: - Name: a
690 ; CHECK-NEXT: TypeName: struct A
691 ; CHECK-NEXT: Size: 8
692 ; CHECK-NEXT: Align: 1
693 ; CHECK-NEXT: ValueKind: ByValue
694 ; CHECK-NEXT: AccQual: Default
695 ; CHECK-NEXT: - Size: 8
696 ; CHECK-NEXT: Align: 8
697 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
698 ; CHECK-NEXT: - Size: 8
699 ; CHECK-NEXT: Align: 8
700 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
701 ; CHECK-NEXT: - Size: 8
702 ; CHECK-NEXT: Align: 8
703 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
704 ; CHECK-NEXT: - Size: 8
705 ; CHECK-NEXT: Align: 8
706 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
707 ; CHECK-NEXT: AddrSpaceQual: Global
708 ; CHECK-NEXT: - Size: 8
709 ; CHECK-NEXT: Align: 8
710 ; CHECK-NEXT: ValueKind: HiddenNone
711 ; CHECK-NEXT: AddrSpaceQual: Global
712 ; CHECK-NEXT: - Size: 8
713 ; CHECK-NEXT: Align: 8
714 ; CHECK-NEXT: ValueKind: HiddenNone
715 ; CHECK-NEXT: AddrSpaceQual: Global
716 ; CHECK-NEXT: - Size: 8
717 ; CHECK-NEXT: Align: 8
718 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
719 ; CHECK-NEXT: AddrSpaceQual: Global
720 define amdgpu_kernel void @test_array_byref_constant([8 x i8] addrspace(4)* byref([8 x i8]) %a) #0
721 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !20
722 !kernel_arg_base_type !20 !kernel_arg_type_qual !4 {
726 ; CHECK: - Name: test_i128
727 ; CHECK-NEXT: SymbolName: 'test_i128@kd'
728 ; CHECK-NEXT: Language: OpenCL C
729 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
731 ; CHECK-NEXT: - Name: a
732 ; CHECK-NEXT: TypeName: i128
733 ; CHECK-NEXT: Size: 16
734 ; CHECK-NEXT: Align: 8
735 ; CHECK-NEXT: ValueKind: ByValue
736 ; CHECK-NEXT: AccQual: Default
737 ; CHECK-NEXT: - Size: 8
738 ; CHECK-NEXT: Align: 8
739 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
740 ; CHECK-NEXT: - Size: 8
741 ; CHECK-NEXT: Align: 8
742 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
743 ; CHECK-NEXT: - Size: 8
744 ; CHECK-NEXT: Align: 8
745 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
746 ; CHECK-NEXT: - Size: 8
747 ; CHECK-NEXT: Align: 8
748 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
749 ; CHECK-NEXT: AddrSpaceQual: Global
750 ; CHECK-NEXT: - Size: 8
751 ; CHECK-NEXT: Align: 8
752 ; CHECK-NEXT: ValueKind: HiddenNone
753 ; CHECK-NEXT: AddrSpaceQual: Global
754 ; CHECK-NEXT: - Size: 8
755 ; CHECK-NEXT: Align: 8
756 ; CHECK-NEXT: ValueKind: HiddenNone
757 ; CHECK-NEXT: AddrSpaceQual: Global
758 ; CHECK-NEXT: - Size: 8
759 ; CHECK-NEXT: Align: 8
760 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
761 ; CHECK-NEXT: AddrSpaceQual: Global
762 define amdgpu_kernel void @test_i128(i128 %a) #0
763 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !21
764 !kernel_arg_base_type !21 !kernel_arg_type_qual !4 {
768 ; CHECK: - Name: test_multi_arg
769 ; CHECK-NEXT: SymbolName: 'test_multi_arg@kd'
770 ; CHECK-NEXT: Language: OpenCL C
771 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
773 ; CHECK-NEXT: - Name: a
774 ; CHECK-NEXT: TypeName: int
775 ; CHECK-NEXT: Size: 4
776 ; CHECK-NEXT: Align: 4
777 ; CHECK-NEXT: ValueKind: ByValue
778 ; CHECK-NEXT: AccQual: Default
779 ; CHECK-NEXT: - Name: b
780 ; CHECK-NEXT: TypeName: short2
781 ; CHECK-NEXT: Size: 4
782 ; CHECK-NEXT: Align: 4
783 ; CHECK-NEXT: ValueKind: ByValue
784 ; CHECK-NEXT: AccQual: Default
785 ; CHECK-NEXT: - Name: c
786 ; CHECK-NEXT: TypeName: char3
787 ; CHECK-NEXT: Size: 4
788 ; CHECK-NEXT: Align: 4
789 ; CHECK-NEXT: ValueKind: ByValue
790 ; CHECK-NEXT: AccQual: Default
791 ; CHECK-NEXT: - Size: 8
792 ; CHECK-NEXT: Align: 8
793 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
794 ; CHECK-NEXT: - Size: 8
795 ; CHECK-NEXT: Align: 8
796 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
797 ; CHECK-NEXT: - Size: 8
798 ; CHECK-NEXT: Align: 8
799 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
800 ; CHECK-NEXT: - Size: 8
801 ; CHECK-NEXT: Align: 8
802 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
803 ; CHECK-NEXT: AddrSpaceQual: Global
804 ; CHECK-NEXT: - Size: 8
805 ; CHECK-NEXT: Align: 8
806 ; CHECK-NEXT: ValueKind: HiddenNone
807 ; CHECK-NEXT: AddrSpaceQual: Global
808 ; CHECK-NEXT: - Size: 8
809 ; CHECK-NEXT: Align: 8
810 ; CHECK-NEXT: ValueKind: HiddenNone
811 ; CHECK-NEXT: AddrSpaceQual: Global
812 ; CHECK-NEXT: - Size: 8
813 ; CHECK-NEXT: Align: 8
814 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
815 ; CHECK-NEXT: AddrSpaceQual: Global
816 define amdgpu_kernel void @test_multi_arg(i32 %a, <2 x i16> %b, <3 x i8> %c) #0
817 !kernel_arg_addr_space !22 !kernel_arg_access_qual !23 !kernel_arg_type !24
818 !kernel_arg_base_type !24 !kernel_arg_type_qual !25 {
822 ; CHECK: - Name: test_addr_space
823 ; CHECK-NEXT: SymbolName: 'test_addr_space@kd'
824 ; CHECK-NEXT: Language: OpenCL C
825 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
827 ; CHECK-NEXT: - Name: g
828 ; CHECK-NEXT: TypeName: 'int addrspace(5)*'
829 ; CHECK-NEXT: Size: 8
830 ; CHECK-NEXT: Align: 8
831 ; CHECK-NEXT: ValueKind: GlobalBuffer
832 ; CHECK-NEXT: AddrSpaceQual: Global
833 ; CHECK-NEXT: AccQual: Default
834 ; CHECK-NEXT: - Name: c
835 ; CHECK-NEXT: TypeName: 'int addrspace(5)*'
836 ; CHECK-NEXT: Size: 8
837 ; CHECK-NEXT: Align: 8
838 ; CHECK-NEXT: ValueKind: GlobalBuffer
839 ; CHECK-NEXT: AddrSpaceQual: Constant
840 ; CHECK-NEXT: AccQual: Default
841 ; CHECK-NEXT: - Name: l
842 ; CHECK-NEXT: TypeName: 'int addrspace(5)*'
843 ; CHECK-NEXT: Size: 4
844 ; CHECK-NEXT: Align: 4
845 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
846 ; CHECK-NEXT: PointeeAlign: 4
847 ; CHECK-NEXT: AddrSpaceQual: Local
848 ; CHECK-NEXT: AccQual: Default
849 ; CHECK-NEXT: - Size: 8
850 ; CHECK-NEXT: Align: 8
851 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
852 ; CHECK-NEXT: - Size: 8
853 ; CHECK-NEXT: Align: 8
854 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
855 ; CHECK-NEXT: - Size: 8
856 ; CHECK-NEXT: Align: 8
857 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
858 ; CHECK-NEXT: - Size: 8
859 ; CHECK-NEXT: Align: 8
860 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
861 ; CHECK-NEXT: AddrSpaceQual: Global
862 ; CHECK-NEXT: - Size: 8
863 ; CHECK-NEXT: Align: 8
864 ; CHECK-NEXT: ValueKind: HiddenNone
865 ; CHECK-NEXT: AddrSpaceQual: Global
866 ; CHECK-NEXT: - Size: 8
867 ; CHECK-NEXT: Align: 8
868 ; CHECK-NEXT: ValueKind: HiddenNone
869 ; CHECK-NEXT: AddrSpaceQual: Global
870 ; CHECK-NEXT: - Size: 8
871 ; CHECK-NEXT: Align: 8
872 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
873 ; CHECK-NEXT: AddrSpaceQual: Global
874 define amdgpu_kernel void @test_addr_space(i32 addrspace(1)* %g,
875 i32 addrspace(4)* %c,
876 i32 addrspace(3)* %l) #0
877 !kernel_arg_addr_space !50 !kernel_arg_access_qual !23 !kernel_arg_type !51
878 !kernel_arg_base_type !51 !kernel_arg_type_qual !25 {
882 ; CHECK: - Name: test_type_qual
883 ; CHECK-NEXT: SymbolName: 'test_type_qual@kd'
884 ; CHECK-NEXT: Language: OpenCL C
885 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
887 ; CHECK-NEXT: - Name: a
888 ; CHECK-NEXT: TypeName: 'int addrspace(5)*'
889 ; CHECK-NEXT: Size: 8
890 ; CHECK-NEXT: Align: 8
891 ; CHECK-NEXT: ValueKind: GlobalBuffer
892 ; CHECK-NEXT: AddrSpaceQual: Global
893 ; CHECK-NEXT: AccQual: Default
894 ; CHECK-NEXT: IsVolatile: true
895 ; CHECK-NEXT: - Name: b
896 ; CHECK-NEXT: TypeName: 'int addrspace(5)*'
897 ; CHECK-NEXT: Size: 8
898 ; CHECK-NEXT: Align: 8
899 ; CHECK-NEXT: ValueKind: GlobalBuffer
900 ; CHECK-NEXT: AddrSpaceQual: Global
901 ; CHECK-NEXT: AccQual: Default
902 ; CHECK-NEXT: IsConst: true
903 ; CHECK-NEXT: IsRestrict: true
904 ; CHECK-NEXT: - Name: c
905 ; CHECK-NEXT: TypeName: 'int addrspace(5)*'
906 ; CHECK-NEXT: Size: 8
907 ; CHECK-NEXT: Align: 8
908 ; CHECK-NEXT: ValueKind: Pipe
909 ; CHECK-NEXT: AddrSpaceQual: Global
910 ; CHECK-NEXT: AccQual: Default
911 ; CHECK-NEXT: IsPipe: true
912 ; CHECK-NEXT: - Size: 8
913 ; CHECK-NEXT: Align: 8
914 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
915 ; CHECK-NEXT: - Size: 8
916 ; CHECK-NEXT: Align: 8
917 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
918 ; CHECK-NEXT: - Size: 8
919 ; CHECK-NEXT: Align: 8
920 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
921 ; CHECK-NEXT: - Size: 8
922 ; CHECK-NEXT: Align: 8
923 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
924 ; CHECK-NEXT: AddrSpaceQual: Global
925 ; CHECK-NEXT: - Size: 8
926 ; CHECK-NEXT: Align: 8
927 ; CHECK-NEXT: ValueKind: HiddenNone
928 ; CHECK-NEXT: AddrSpaceQual: Global
929 ; CHECK-NEXT: - Size: 8
930 ; CHECK-NEXT: Align: 8
931 ; CHECK-NEXT: ValueKind: HiddenNone
932 ; CHECK-NEXT: AddrSpaceQual: Global
933 ; CHECK-NEXT: - Size: 8
934 ; CHECK-NEXT: Align: 8
935 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
936 ; CHECK-NEXT: AddrSpaceQual: Global
937 define amdgpu_kernel void @test_type_qual(i32 addrspace(1)* %a,
938 i32 addrspace(1)* %b,
939 %opencl.pipe_t addrspace(1)* %c) #0
940 !kernel_arg_addr_space !22 !kernel_arg_access_qual !23 !kernel_arg_type !51
941 !kernel_arg_base_type !51 !kernel_arg_type_qual !70 {
945 ; CHECK: - Name: test_access_qual
946 ; CHECK-NEXT: SymbolName: 'test_access_qual@kd'
947 ; CHECK-NEXT: Language: OpenCL C
948 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
950 ; CHECK-NEXT: - Name: ro
951 ; CHECK-NEXT: TypeName: image1d_t
952 ; CHECK-NEXT: Size: 8
953 ; CHECK-NEXT: Align: 8
954 ; CHECK-NEXT: ValueKind: Image
955 ; CHECK-NEXT: AddrSpaceQual: Global
956 ; CHECK-NEXT: AccQual: ReadOnly
957 ; CHECK-NEXT: - Name: wo
958 ; CHECK-NEXT: TypeName: image2d_t
959 ; CHECK-NEXT: Size: 8
960 ; CHECK-NEXT: Align: 8
961 ; CHECK-NEXT: ValueKind: Image
962 ; CHECK-NEXT: AddrSpaceQual: Global
963 ; CHECK-NEXT: AccQual: WriteOnly
964 ; CHECK-NEXT: - Name: rw
965 ; CHECK-NEXT: TypeName: image3d_t
966 ; CHECK-NEXT: Size: 8
967 ; CHECK-NEXT: Align: 8
968 ; CHECK-NEXT: ValueKind: Image
969 ; CHECK-NEXT: AddrSpaceQual: Global
970 ; CHECK-NEXT: AccQual: ReadWrite
971 ; CHECK-NEXT: - Size: 8
972 ; CHECK-NEXT: Align: 8
973 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
974 ; CHECK-NEXT: - Size: 8
975 ; CHECK-NEXT: Align: 8
976 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
977 ; CHECK-NEXT: - Size: 8
978 ; CHECK-NEXT: Align: 8
979 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
980 ; CHECK-NEXT: - Size: 8
981 ; CHECK-NEXT: Align: 8
982 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
983 ; CHECK-NEXT: AddrSpaceQual: Global
984 ; CHECK-NEXT: - Size: 8
985 ; CHECK-NEXT: Align: 8
986 ; CHECK-NEXT: ValueKind: HiddenNone
987 ; CHECK-NEXT: AddrSpaceQual: Global
988 ; CHECK-NEXT: - Size: 8
989 ; CHECK-NEXT: Align: 8
990 ; CHECK-NEXT: ValueKind: HiddenNone
991 ; CHECK-NEXT: AddrSpaceQual: Global
992 ; CHECK-NEXT: - Size: 8
993 ; CHECK-NEXT: Align: 8
994 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
995 ; CHECK-NEXT: AddrSpaceQual: Global
996 define amdgpu_kernel void @test_access_qual(%opencl.image1d_t addrspace(1)* %ro,
997 %opencl.image2d_t addrspace(1)* %wo,
998 %opencl.image3d_t addrspace(1)* %rw) #0
999 !kernel_arg_addr_space !60 !kernel_arg_access_qual !61 !kernel_arg_type !62
1000 !kernel_arg_base_type !62 !kernel_arg_type_qual !25 {
1004 ; CHECK: - Name: test_vec_type_hint_half
1005 ; CHECK-NEXT: SymbolName: 'test_vec_type_hint_half@kd'
1006 ; CHECK-NEXT: Language: OpenCL C
1007 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1008 ; CHECK-NEXT: Attrs:
1009 ; CHECK-NEXT: VecTypeHint: half
1011 ; CHECK-NEXT: - Name: a
1012 ; CHECK-NEXT: TypeName: int
1013 ; CHECK-NEXT: Size: 4
1014 ; CHECK-NEXT: Align: 4
1015 ; CHECK-NEXT: ValueKind: ByValue
1016 ; CHECK-NEXT: AccQual: Default
1017 ; CHECK-NEXT: - Size: 8
1018 ; CHECK-NEXT: Align: 8
1019 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1020 ; CHECK-NEXT: - Size: 8
1021 ; CHECK-NEXT: Align: 8
1022 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1023 ; CHECK-NEXT: - Size: 8
1024 ; CHECK-NEXT: Align: 8
1025 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1026 ; CHECK-NEXT: - Size: 8
1027 ; CHECK-NEXT: Align: 8
1028 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1029 ; CHECK-NEXT: AddrSpaceQual: Global
1030 ; CHECK-NEXT: - Size: 8
1031 ; CHECK-NEXT: Align: 8
1032 ; CHECK-NEXT: ValueKind: HiddenNone
1033 ; CHECK-NEXT: AddrSpaceQual: Global
1034 ; CHECK-NEXT: - Size: 8
1035 ; CHECK-NEXT: Align: 8
1036 ; CHECK-NEXT: ValueKind: HiddenNone
1037 ; CHECK-NEXT: AddrSpaceQual: Global
1038 ; CHECK-NEXT: - Size: 8
1039 ; CHECK-NEXT: Align: 8
1040 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1041 ; CHECK-NEXT: AddrSpaceQual: Global
1042 define amdgpu_kernel void @test_vec_type_hint_half(i32 %a) #0
1043 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
1044 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 !vec_type_hint !26 {
1048 ; CHECK: - Name: test_vec_type_hint_float
1049 ; CHECK-NEXT: SymbolName: 'test_vec_type_hint_float@kd'
1050 ; CHECK-NEXT: Language: OpenCL C
1051 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1052 ; CHECK-NEXT: Attrs:
1053 ; CHECK-NEXT: VecTypeHint: float
1055 ; CHECK-NEXT: - Name: a
1056 ; CHECK-NEXT: TypeName: int
1057 ; CHECK-NEXT: Size: 4
1058 ; CHECK-NEXT: Align: 4
1059 ; CHECK-NEXT: ValueKind: ByValue
1060 ; CHECK-NEXT: AccQual: Default
1061 ; CHECK-NEXT: - Size: 8
1062 ; CHECK-NEXT: Align: 8
1063 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1064 ; CHECK-NEXT: - Size: 8
1065 ; CHECK-NEXT: Align: 8
1066 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1067 ; CHECK-NEXT: - Size: 8
1068 ; CHECK-NEXT: Align: 8
1069 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1070 ; CHECK-NEXT: - Size: 8
1071 ; CHECK-NEXT: Align: 8
1072 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1073 ; CHECK-NEXT: AddrSpaceQual: Global
1074 ; CHECK-NEXT: - Size: 8
1075 ; CHECK-NEXT: Align: 8
1076 ; CHECK-NEXT: ValueKind: HiddenNone
1077 ; CHECK-NEXT: AddrSpaceQual: Global
1078 ; CHECK-NEXT: - Size: 8
1079 ; CHECK-NEXT: Align: 8
1080 ; CHECK-NEXT: ValueKind: HiddenNone
1081 ; CHECK-NEXT: AddrSpaceQual: Global
1082 ; CHECK-NEXT: - Size: 8
1083 ; CHECK-NEXT: Align: 8
1084 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1085 ; CHECK-NEXT: AddrSpaceQual: Global
1086 define amdgpu_kernel void @test_vec_type_hint_float(i32 %a) #0
1087 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
1088 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 !vec_type_hint !27 {
1092 ; CHECK: - Name: test_vec_type_hint_double
1093 ; CHECK-NEXT: SymbolName: 'test_vec_type_hint_double@kd'
1094 ; CHECK-NEXT: Language: OpenCL C
1095 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1096 ; CHECK-NEXT: Attrs:
1097 ; CHECK-NEXT: VecTypeHint: double
1099 ; CHECK-NEXT: - Name: a
1100 ; CHECK-NEXT: TypeName: int
1101 ; CHECK-NEXT: Size: 4
1102 ; CHECK-NEXT: Align: 4
1103 ; CHECK-NEXT: ValueKind: ByValue
1104 ; CHECK-NEXT: AccQual: Default
1105 ; CHECK-NEXT: - Size: 8
1106 ; CHECK-NEXT: Align: 8
1107 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1108 ; CHECK-NEXT: - Size: 8
1109 ; CHECK-NEXT: Align: 8
1110 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1111 ; CHECK-NEXT: - Size: 8
1112 ; CHECK-NEXT: Align: 8
1113 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1114 ; CHECK-NEXT: - Size: 8
1115 ; CHECK-NEXT: Align: 8
1116 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1117 ; CHECK-NEXT: AddrSpaceQual: Global
1118 ; CHECK-NEXT: - Size: 8
1119 ; CHECK-NEXT: Align: 8
1120 ; CHECK-NEXT: ValueKind: HiddenNone
1121 ; CHECK-NEXT: AddrSpaceQual: Global
1122 ; CHECK-NEXT: - Size: 8
1123 ; CHECK-NEXT: Align: 8
1124 ; CHECK-NEXT: ValueKind: HiddenNone
1125 ; CHECK-NEXT: AddrSpaceQual: Global
1126 ; CHECK-NEXT: - Size: 8
1127 ; CHECK-NEXT: Align: 8
1128 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1129 ; CHECK-NEXT: AddrSpaceQual: Global
1130 define amdgpu_kernel void @test_vec_type_hint_double(i32 %a) #0
1131 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
1132 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 !vec_type_hint !28 {
1136 ; CHECK: - Name: test_vec_type_hint_char
1137 ; CHECK-NEXT: SymbolName: 'test_vec_type_hint_char@kd'
1138 ; CHECK-NEXT: Language: OpenCL C
1139 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1140 ; CHECK-NEXT: Attrs:
1141 ; CHECK-NEXT: VecTypeHint: char
1143 ; CHECK-NEXT: - Name: a
1144 ; CHECK-NEXT: TypeName: int
1145 ; CHECK-NEXT: Size: 4
1146 ; CHECK-NEXT: Align: 4
1147 ; CHECK-NEXT: ValueKind: ByValue
1148 ; CHECK-NEXT: AccQual: Default
1149 ; CHECK-NEXT: - Size: 8
1150 ; CHECK-NEXT: Align: 8
1151 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1152 ; CHECK-NEXT: - Size: 8
1153 ; CHECK-NEXT: Align: 8
1154 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1155 ; CHECK-NEXT: - Size: 8
1156 ; CHECK-NEXT: Align: 8
1157 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1158 ; CHECK-NEXT: - Size: 8
1159 ; CHECK-NEXT: Align: 8
1160 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1161 ; CHECK-NEXT: AddrSpaceQual: Global
1162 ; CHECK-NEXT: - Size: 8
1163 ; CHECK-NEXT: Align: 8
1164 ; CHECK-NEXT: ValueKind: HiddenNone
1165 ; CHECK-NEXT: AddrSpaceQual: Global
1166 ; CHECK-NEXT: - Size: 8
1167 ; CHECK-NEXT: Align: 8
1168 ; CHECK-NEXT: ValueKind: HiddenNone
1169 ; CHECK-NEXT: AddrSpaceQual: Global
1170 ; CHECK-NEXT: - Size: 8
1171 ; CHECK-NEXT: Align: 8
1172 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1173 ; CHECK-NEXT: AddrSpaceQual: Global
1174 define amdgpu_kernel void @test_vec_type_hint_char(i32 %a) #0
1175 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
1176 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 !vec_type_hint !29 {
1180 ; CHECK: - Name: test_vec_type_hint_short
1181 ; CHECK-NEXT: SymbolName: 'test_vec_type_hint_short@kd'
1182 ; CHECK-NEXT: Language: OpenCL C
1183 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1184 ; CHECK-NEXT: Attrs:
1185 ; CHECK-NEXT: VecTypeHint: short
1187 ; CHECK-NEXT: - Name: a
1188 ; CHECK-NEXT: TypeName: int
1189 ; CHECK-NEXT: Size: 4
1190 ; CHECK-NEXT: Align: 4
1191 ; CHECK-NEXT: ValueKind: ByValue
1192 ; CHECK-NEXT: AccQual: Default
1193 ; CHECK-NEXT: - Size: 8
1194 ; CHECK-NEXT: Align: 8
1195 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1196 ; CHECK-NEXT: - Size: 8
1197 ; CHECK-NEXT: Align: 8
1198 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1199 ; CHECK-NEXT: - Size: 8
1200 ; CHECK-NEXT: Align: 8
1201 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1202 ; CHECK-NEXT: - Size: 8
1203 ; CHECK-NEXT: Align: 8
1204 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1205 ; CHECK-NEXT: AddrSpaceQual: Global
1206 ; CHECK-NEXT: - Size: 8
1207 ; CHECK-NEXT: Align: 8
1208 ; CHECK-NEXT: ValueKind: HiddenNone
1209 ; CHECK-NEXT: AddrSpaceQual: Global
1210 ; CHECK-NEXT: - Size: 8
1211 ; CHECK-NEXT: Align: 8
1212 ; CHECK-NEXT: ValueKind: HiddenNone
1213 ; CHECK-NEXT: AddrSpaceQual: Global
1214 ; CHECK-NEXT: - Size: 8
1215 ; CHECK-NEXT: Align: 8
1216 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1217 ; CHECK-NEXT: AddrSpaceQual: Global
1218 define amdgpu_kernel void @test_vec_type_hint_short(i32 %a) #0
1219 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
1220 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 !vec_type_hint !30 {
1224 ; CHECK: - Name: test_vec_type_hint_long
1225 ; CHECK-NEXT: SymbolName: 'test_vec_type_hint_long@kd'
1226 ; CHECK-NEXT: Language: OpenCL C
1227 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1228 ; CHECK-NEXT: Attrs:
1229 ; CHECK-NEXT: VecTypeHint: long
1231 ; CHECK-NEXT: - Name: a
1232 ; CHECK-NEXT: TypeName: int
1233 ; CHECK-NEXT: Size: 4
1234 ; CHECK-NEXT: Align: 4
1235 ; CHECK-NEXT: ValueKind: ByValue
1236 ; CHECK-NEXT: AccQual: Default
1237 ; CHECK-NEXT: - Size: 8
1238 ; CHECK-NEXT: Align: 8
1239 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1240 ; CHECK-NEXT: - Size: 8
1241 ; CHECK-NEXT: Align: 8
1242 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1243 ; CHECK-NEXT: - Size: 8
1244 ; CHECK-NEXT: Align: 8
1245 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1246 ; CHECK-NEXT: - Size: 8
1247 ; CHECK-NEXT: Align: 8
1248 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1249 ; CHECK-NEXT: AddrSpaceQual: Global
1250 ; CHECK-NEXT: - Size: 8
1251 ; CHECK-NEXT: Align: 8
1252 ; CHECK-NEXT: ValueKind: HiddenNone
1253 ; CHECK-NEXT: AddrSpaceQual: Global
1254 ; CHECK-NEXT: - Size: 8
1255 ; CHECK-NEXT: Align: 8
1256 ; CHECK-NEXT: ValueKind: HiddenNone
1257 ; CHECK-NEXT: AddrSpaceQual: Global
1258 ; CHECK-NEXT: - Size: 8
1259 ; CHECK-NEXT: Align: 8
1260 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1261 ; CHECK-NEXT: AddrSpaceQual: Global
1262 define amdgpu_kernel void @test_vec_type_hint_long(i32 %a) #0
1263 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
1264 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 !vec_type_hint !31 {
1268 ; CHECK: - Name: test_vec_type_hint_unknown
1269 ; CHECK-NEXT: SymbolName: 'test_vec_type_hint_unknown@kd'
1270 ; CHECK-NEXT: Language: OpenCL C
1271 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1272 ; CHECK-NEXT: Attrs:
1273 ; CHECK-NEXT: VecTypeHint: unknown
1275 ; CHECK-NEXT: - Name: a
1276 ; CHECK-NEXT: TypeName: int
1277 ; CHECK-NEXT: Size: 4
1278 ; CHECK-NEXT: Align: 4
1279 ; CHECK-NEXT: ValueKind: ByValue
1280 ; CHECK-NEXT: AccQual: Default
1281 ; CHECK-NEXT: - Size: 8
1282 ; CHECK-NEXT: Align: 8
1283 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1284 ; CHECK-NEXT: - Size: 8
1285 ; CHECK-NEXT: Align: 8
1286 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1287 ; CHECK-NEXT: - Size: 8
1288 ; CHECK-NEXT: Align: 8
1289 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1290 ; CHECK-NEXT: - Size: 8
1291 ; CHECK-NEXT: Align: 8
1292 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1293 ; CHECK-NEXT: AddrSpaceQual: Global
1294 ; CHECK-NEXT: - Size: 8
1295 ; CHECK-NEXT: Align: 8
1296 ; CHECK-NEXT: ValueKind: HiddenNone
1297 ; CHECK-NEXT: AddrSpaceQual: Global
1298 ; CHECK-NEXT: - Size: 8
1299 ; CHECK-NEXT: Align: 8
1300 ; CHECK-NEXT: ValueKind: HiddenNone
1301 ; CHECK-NEXT: AddrSpaceQual: Global
1302 ; CHECK-NEXT: - Size: 8
1303 ; CHECK-NEXT: Align: 8
1304 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1305 ; CHECK-NEXT: AddrSpaceQual: Global
1306 define amdgpu_kernel void @test_vec_type_hint_unknown(i32 %a) #0
1307 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
1308 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 !vec_type_hint !32 {
1312 ; CHECK: - Name: test_reqd_wgs_vec_type_hint
1313 ; CHECK-NEXT: SymbolName: 'test_reqd_wgs_vec_type_hint@kd'
1314 ; CHECK-NEXT: Language: OpenCL C
1315 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1316 ; CHECK-NEXT: Attrs:
1317 ; CHECK-NEXT: ReqdWorkGroupSize: [ 1, 2, 4 ]
1318 ; CHECK-NEXT: VecTypeHint: int
1320 ; CHECK-NEXT: - Name: a
1321 ; CHECK-NEXT: TypeName: int
1322 ; CHECK-NEXT: Size: 4
1323 ; CHECK-NEXT: Align: 4
1324 ; CHECK-NEXT: ValueKind: ByValue
1325 ; CHECK-NEXT: AccQual: Default
1326 ; CHECK-NEXT: - Size: 8
1327 ; CHECK-NEXT: Align: 8
1328 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1329 ; CHECK-NEXT: - Size: 8
1330 ; CHECK-NEXT: Align: 8
1331 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1332 ; CHECK-NEXT: - Size: 8
1333 ; CHECK-NEXT: Align: 8
1334 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1335 ; CHECK-NEXT: - Size: 8
1336 ; CHECK-NEXT: Align: 8
1337 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1338 ; CHECK-NEXT: AddrSpaceQual: Global
1339 ; CHECK-NEXT: - Size: 8
1340 ; CHECK-NEXT: Align: 8
1341 ; CHECK-NEXT: ValueKind: HiddenNone
1342 ; CHECK-NEXT: AddrSpaceQual: Global
1343 ; CHECK-NEXT: - Size: 8
1344 ; CHECK-NEXT: Align: 8
1345 ; CHECK-NEXT: ValueKind: HiddenNone
1346 ; CHECK-NEXT: AddrSpaceQual: Global
1347 ; CHECK-NEXT: - Size: 8
1348 ; CHECK-NEXT: Align: 8
1349 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1350 ; CHECK-NEXT: AddrSpaceQual: Global
1351 define amdgpu_kernel void @test_reqd_wgs_vec_type_hint(i32 %a) #0
1352 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
1353 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 !vec_type_hint !5
1354 !reqd_work_group_size !6 {
1358 ; CHECK: - Name: test_wgs_hint_vec_type_hint
1359 ; CHECK-NEXT: SymbolName: 'test_wgs_hint_vec_type_hint@kd'
1360 ; CHECK-NEXT: Language: OpenCL C
1361 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1362 ; CHECK-NEXT: Attrs:
1363 ; CHECK-NEXT: WorkGroupSizeHint: [ 8, 16, 32 ]
1364 ; CHECK-NEXT: VecTypeHint: uint4
1366 ; CHECK-NEXT: - Name: a
1367 ; CHECK-NEXT: TypeName: int
1368 ; CHECK-NEXT: Size: 4
1369 ; CHECK-NEXT: Align: 4
1370 ; CHECK-NEXT: ValueKind: ByValue
1371 ; CHECK-NEXT: AccQual: Default
1372 ; CHECK-NEXT: - Size: 8
1373 ; CHECK-NEXT: Align: 8
1374 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1375 ; CHECK-NEXT: - Size: 8
1376 ; CHECK-NEXT: Align: 8
1377 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1378 ; CHECK-NEXT: - Size: 8
1379 ; CHECK-NEXT: Align: 8
1380 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1381 ; CHECK-NEXT: - Size: 8
1382 ; CHECK-NEXT: Align: 8
1383 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1384 ; CHECK-NEXT: AddrSpaceQual: Global
1385 ; CHECK-NEXT: - Size: 8
1386 ; CHECK-NEXT: Align: 8
1387 ; CHECK-NEXT: ValueKind: HiddenNone
1388 ; CHECK-NEXT: AddrSpaceQual: Global
1389 ; CHECK-NEXT: - Size: 8
1390 ; CHECK-NEXT: Align: 8
1391 ; CHECK-NEXT: ValueKind: HiddenNone
1392 ; CHECK-NEXT: AddrSpaceQual: Global
1393 ; CHECK-NEXT: - Size: 8
1394 ; CHECK-NEXT: Align: 8
1395 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1396 ; CHECK-NEXT: AddrSpaceQual: Global
1397 define amdgpu_kernel void @test_wgs_hint_vec_type_hint(i32 %a) #0
1398 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3
1399 !kernel_arg_base_type !3 !kernel_arg_type_qual !4 !vec_type_hint !7
1400 !work_group_size_hint !8 {
1404 ; CHECK: - Name: test_arg_ptr_to_ptr
1405 ; CHECK-NEXT: SymbolName: 'test_arg_ptr_to_ptr@kd'
1406 ; CHECK-NEXT: Language: OpenCL C
1407 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1409 ; CHECK-NEXT: - Name: a
1410 ; CHECK-NEXT: TypeName: 'int addrspace(5)* addrspace(5)*'
1411 ; CHECK-NEXT: Size: 8
1412 ; CHECK-NEXT: Align: 8
1413 ; CHECK-NEXT: ValueKind: GlobalBuffer
1414 ; CHECK-NEXT: AddrSpaceQual: Global
1415 ; CHECK-NEXT: AccQual: Default
1416 ; CHECK-NEXT: - Size: 8
1417 ; CHECK-NEXT: Align: 8
1418 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1419 ; CHECK-NEXT: - Size: 8
1420 ; CHECK-NEXT: Align: 8
1421 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1422 ; CHECK-NEXT: - Size: 8
1423 ; CHECK-NEXT: Align: 8
1424 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1425 ; CHECK-NEXT: - Size: 8
1426 ; CHECK-NEXT: Align: 8
1427 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1428 ; CHECK-NEXT: AddrSpaceQual: Global
1429 ; CHECK-NEXT: - Size: 8
1430 ; CHECK-NEXT: Align: 8
1431 ; CHECK-NEXT: ValueKind: HiddenNone
1432 ; CHECK-NEXT: AddrSpaceQual: Global
1433 ; CHECK-NEXT: - Size: 8
1434 ; CHECK-NEXT: Align: 8
1435 ; CHECK-NEXT: ValueKind: HiddenNone
1436 ; CHECK-NEXT: AddrSpaceQual: Global
1437 ; CHECK-NEXT: - Size: 8
1438 ; CHECK-NEXT: Align: 8
1439 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1440 ; CHECK-NEXT: AddrSpaceQual: Global
1441 define amdgpu_kernel void @test_arg_ptr_to_ptr(i32 addrspace(5)* addrspace(1)* %a) #0
1442 !kernel_arg_addr_space !81 !kernel_arg_access_qual !2 !kernel_arg_type !80
1443 !kernel_arg_base_type !80 !kernel_arg_type_qual !4 {
1447 ; CHECK: - Name: test_arg_struct_contains_ptr
1448 ; CHECK-NEXT: SymbolName: 'test_arg_struct_contains_ptr@kd'
1449 ; CHECK-NEXT: Language: OpenCL C
1450 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1452 ; CHECK-NEXT: - Name: a
1453 ; CHECK-NEXT: TypeName: struct B
1454 ; CHECK-NEXT: Size: 8
1455 ; CHECK-NEXT: Align: 8
1456 ; CHECK-NEXT: ValueKind: ByValue
1457 ; CHECK-NEXT: AccQual: Default
1458 ; CHECK-NEXT: - Size: 8
1459 ; CHECK-NEXT: Align: 8
1460 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1461 ; CHECK-NEXT: - Size: 8
1462 ; CHECK-NEXT: Align: 8
1463 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1464 ; CHECK-NEXT: - Size: 8
1465 ; CHECK-NEXT: Align: 8
1466 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1467 ; CHECK-NEXT: - Size: 8
1468 ; CHECK-NEXT: Align: 8
1469 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1470 ; CHECK-NEXT: AddrSpaceQual: Global
1471 define amdgpu_kernel void @test_arg_struct_contains_ptr(%struct.B %a) #0
1472 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !82
1473 !kernel_arg_base_type !82 !kernel_arg_type_qual !4 {
1477 ; CHECK: - Name: test_arg_vector_of_ptr
1478 ; CHECK-NEXT: SymbolName: 'test_arg_vector_of_ptr@kd'
1479 ; CHECK-NEXT: Language: OpenCL C
1480 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1482 ; CHECK-NEXT: - Name: a
1483 ; CHECK-NEXT: TypeName: 'global int addrspace(5)* __attribute__((ext_vector_type(2)))'
1484 ; CHECK-NEXT: Size: 16
1485 ; CHECK-NEXT: Align: 16
1486 ; CHECK-NEXT: ValueKind: ByValue
1487 ; CHECK-NEXT: AccQual: Default
1488 ; CHECK-NEXT: - Size: 8
1489 ; CHECK-NEXT: Align: 8
1490 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1491 ; CHECK-NEXT: - Size: 8
1492 ; CHECK-NEXT: Align: 8
1493 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1494 ; CHECK-NEXT: - Size: 8
1495 ; CHECK-NEXT: Align: 8
1496 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1497 ; CHECK-NEXT: - Size: 8
1498 ; CHECK-NEXT: Align: 8
1499 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1500 ; CHECK-NEXT: AddrSpaceQual: Global
1501 ; CHECK-NEXT: - Size: 8
1502 ; CHECK-NEXT: Align: 8
1503 ; CHECK-NEXT: ValueKind: HiddenNone
1504 ; CHECK-NEXT: AddrSpaceQual: Global
1505 ; CHECK-NEXT: - Size: 8
1506 ; CHECK-NEXT: Align: 8
1507 ; CHECK-NEXT: ValueKind: HiddenNone
1508 ; CHECK-NEXT: AddrSpaceQual: Global
1509 ; CHECK-NEXT: - Size: 8
1510 ; CHECK-NEXT: Align: 8
1511 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1512 ; CHECK-NEXT: AddrSpaceQual: Global
1513 define amdgpu_kernel void @test_arg_vector_of_ptr(<2 x i32 addrspace(1)*> %a) #0
1514 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !83
1515 !kernel_arg_base_type !83 !kernel_arg_type_qual !4 {
1519 ; CHECK: - Name: test_arg_unknown_builtin_type
1520 ; CHECK-NEXT: SymbolName: 'test_arg_unknown_builtin_type@kd'
1521 ; CHECK-NEXT: Language: OpenCL C
1522 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1524 ; CHECK-NEXT: - Name: a
1525 ; CHECK-NEXT: TypeName: clk_event_t
1526 ; CHECK-NEXT: Size: 8
1527 ; CHECK-NEXT: Align: 8
1528 ; CHECK-NEXT: ValueKind: GlobalBuffer
1529 ; CHECK-NEXT: AddrSpaceQual: Global
1530 ; CHECK-NEXT: AccQual: Default
1531 ; CHECK-NEXT: - Size: 8
1532 ; CHECK-NEXT: Align: 8
1533 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1534 ; CHECK-NEXT: - Size: 8
1535 ; CHECK-NEXT: Align: 8
1536 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1537 ; CHECK-NEXT: - Size: 8
1538 ; CHECK-NEXT: Align: 8
1539 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1540 ; CHECK-NEXT: - Size: 8
1541 ; CHECK-NEXT: Align: 8
1542 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1543 ; CHECK-NEXT: AddrSpaceQual: Global
1544 ; CHECK-NEXT: - Size: 8
1545 ; CHECK-NEXT: Align: 8
1546 ; CHECK-NEXT: ValueKind: HiddenNone
1547 ; CHECK-NEXT: AddrSpaceQual: Global
1548 ; CHECK-NEXT: - Size: 8
1549 ; CHECK-NEXT: Align: 8
1550 ; CHECK-NEXT: ValueKind: HiddenNone
1551 ; CHECK-NEXT: AddrSpaceQual: Global
1552 ; CHECK-NEXT: - Size: 8
1553 ; CHECK-NEXT: Align: 8
1554 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1555 ; CHECK-NEXT: AddrSpaceQual: Global
1556 define amdgpu_kernel void @test_arg_unknown_builtin_type(
1557 %opencl.clk_event_t addrspace(1)* %a) #0
1558 !kernel_arg_addr_space !81 !kernel_arg_access_qual !2 !kernel_arg_type !84
1559 !kernel_arg_base_type !84 !kernel_arg_type_qual !4 {
1563 ; CHECK: - Name: test_pointee_align
1564 ; CHECK-NEXT: SymbolName: 'test_pointee_align@kd'
1565 ; CHECK-NEXT: Language: OpenCL C
1566 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1568 ; CHECK-NEXT: - Name: a
1569 ; CHECK-NEXT: TypeName: 'long addrspace(5)*'
1570 ; CHECK-NEXT: Size: 8
1571 ; CHECK-NEXT: Align: 8
1572 ; CHECK-NEXT: ValueKind: GlobalBuffer
1573 ; CHECK-NEXT: AddrSpaceQual: Global
1574 ; CHECK-NEXT: AccQual: Default
1575 ; CHECK-NEXT: - Name: b
1576 ; CHECK-NEXT: TypeName: 'char addrspace(5)*'
1577 ; CHECK-NEXT: Size: 4
1578 ; CHECK-NEXT: Align: 4
1579 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1580 ; CHECK-NEXT: PointeeAlign: 1
1581 ; CHECK-NEXT: AddrSpaceQual: Local
1582 ; CHECK-NEXT: AccQual: Default
1583 ; CHECK-NEXT: - Name: c
1584 ; CHECK-NEXT: TypeName: 'char2 addrspace(5)*'
1585 ; CHECK-NEXT: Size: 4
1586 ; CHECK-NEXT: Align: 4
1587 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1588 ; CHECK-NEXT: PointeeAlign: 2
1589 ; CHECK-NEXT: AddrSpaceQual: Local
1590 ; CHECK-NEXT: AccQual: Default
1591 ; CHECK-NEXT: - Name: d
1592 ; CHECK-NEXT: TypeName: 'char3 addrspace(5)*'
1593 ; CHECK-NEXT: Size: 4
1594 ; CHECK-NEXT: Align: 4
1595 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1596 ; CHECK-NEXT: PointeeAlign: 4
1597 ; CHECK-NEXT: AddrSpaceQual: Local
1598 ; CHECK-NEXT: AccQual: Default
1599 ; CHECK-NEXT: - Name: e
1600 ; CHECK-NEXT: TypeName: 'char4 addrspace(5)*'
1601 ; CHECK-NEXT: Size: 4
1602 ; CHECK-NEXT: Align: 4
1603 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1604 ; CHECK-NEXT: PointeeAlign: 4
1605 ; CHECK-NEXT: AddrSpaceQual: Local
1606 ; CHECK-NEXT: AccQual: Default
1607 ; CHECK-NEXT: - Name: f
1608 ; CHECK-NEXT: TypeName: 'char8 addrspace(5)*'
1609 ; CHECK-NEXT: Size: 4
1610 ; CHECK-NEXT: Align: 4
1611 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1612 ; CHECK-NEXT: PointeeAlign: 8
1613 ; CHECK-NEXT: AddrSpaceQual: Local
1614 ; CHECK-NEXT: AccQual: Default
1615 ; CHECK-NEXT: - Name: g
1616 ; CHECK-NEXT: TypeName: 'char16 addrspace(5)*'
1617 ; CHECK-NEXT: Size: 4
1618 ; CHECK-NEXT: Align: 4
1619 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1620 ; CHECK-NEXT: PointeeAlign: 16
1621 ; CHECK-NEXT: AddrSpaceQual: Local
1622 ; CHECK-NEXT: AccQual: Default
1623 ; CHECK-NEXT: - Name: h
1624 ; CHECK-NEXT: Size: 4
1625 ; CHECK-NEXT: Align: 4
1626 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1627 ; CHECK-NEXT: PointeeAlign: 1
1628 ; CHECK-NEXT: AddrSpaceQual: Local
1629 ; CHECK-NEXT: - Size: 8
1630 ; CHECK-NEXT: Align: 8
1631 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1632 ; CHECK-NEXT: - Size: 8
1633 ; CHECK-NEXT: Align: 8
1634 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1635 ; CHECK-NEXT: - Size: 8
1636 ; CHECK-NEXT: Align: 8
1637 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1638 ; CHECK-NEXT: - Size: 8
1639 ; CHECK-NEXT: Align: 8
1640 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1641 ; CHECK-NEXT: AddrSpaceQual: Global
1642 ; CHECK-NEXT: - Size: 8
1643 ; CHECK-NEXT: Align: 8
1644 ; CHECK-NEXT: ValueKind: HiddenNone
1645 ; CHECK-NEXT: AddrSpaceQual: Global
1646 ; CHECK-NEXT: - Size: 8
1647 ; CHECK-NEXT: Align: 8
1648 ; CHECK-NEXT: ValueKind: HiddenNone
1649 ; CHECK-NEXT: AddrSpaceQual: Global
1650 ; CHECK-NEXT: - Size: 8
1651 ; CHECK-NEXT: Align: 8
1652 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1653 ; CHECK-NEXT: AddrSpaceQual: Global
1654 define amdgpu_kernel void @test_pointee_align(i64 addrspace(1)* %a,
1655 i8 addrspace(3)* %b,
1656 <2 x i8> addrspace(3)* %c,
1657 <3 x i8> addrspace(3)* %d,
1658 <4 x i8> addrspace(3)* %e,
1659 <8 x i8> addrspace(3)* %f,
1660 <16 x i8> addrspace(3)* %g,
1661 {} addrspace(3)* %h) #0
1662 !kernel_arg_addr_space !91 !kernel_arg_access_qual !92 !kernel_arg_type !93
1663 !kernel_arg_base_type !93 !kernel_arg_type_qual !94 {
1667 ; CHECK: - Name: test_pointee_align_attribute
1668 ; CHECK-NEXT: SymbolName: 'test_pointee_align_attribute@kd'
1669 ; CHECK-NEXT: Language: OpenCL C
1670 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1672 ; CHECK-NEXT: - Name: a
1673 ; CHECK-NEXT: TypeName: 'long addrspace(5)*'
1674 ; CHECK-NEXT: Size: 8
1675 ; CHECK-NEXT: Align: 8
1676 ; CHECK-NEXT: ValueKind: GlobalBuffer
1677 ; CHECK-NEXT: AddrSpaceQual: Global
1678 ; CHECK-NEXT: AccQual: Default
1679 ; CHECK-NEXT: - Name: b
1680 ; CHECK-NEXT: TypeName: 'char addrspace(5)*'
1681 ; CHECK-NEXT: Size: 4
1682 ; CHECK-NEXT: Align: 4
1683 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1684 ; CHECK-NEXT: PointeeAlign: 8
1685 ; CHECK-NEXT: AddrSpaceQual: Local
1686 ; CHECK-NEXT: AccQual: Default
1687 ; CHECK-NEXT: - Name: c
1688 ; CHECK-NEXT: TypeName: 'char2 addrspace(5)*'
1689 ; CHECK-NEXT: Size: 4
1690 ; CHECK-NEXT: Align: 4
1691 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1692 ; CHECK-NEXT: PointeeAlign: 32
1693 ; CHECK-NEXT: AddrSpaceQual: Local
1694 ; CHECK-NEXT: AccQual: Default
1695 ; CHECK-NEXT: - Name: d
1696 ; CHECK-NEXT: TypeName: 'char3 addrspace(5)*'
1697 ; CHECK-NEXT: Size: 4
1698 ; CHECK-NEXT: Align: 4
1699 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1700 ; CHECK-NEXT: PointeeAlign: 64
1701 ; CHECK-NEXT: AddrSpaceQual: Local
1702 ; CHECK-NEXT: AccQual: Default
1703 ; CHECK-NEXT: - Name: e
1704 ; CHECK-NEXT: TypeName: 'char4 addrspace(5)*'
1705 ; CHECK-NEXT: Size: 4
1706 ; CHECK-NEXT: Align: 4
1707 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1708 ; CHECK-NEXT: PointeeAlign: 256
1709 ; CHECK-NEXT: AddrSpaceQual: Local
1710 ; CHECK-NEXT: AccQual: Default
1711 ; CHECK-NEXT: - Name: f
1712 ; CHECK-NEXT: TypeName: 'char8 addrspace(5)*'
1713 ; CHECK-NEXT: Size: 4
1714 ; CHECK-NEXT: Align: 4
1715 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1716 ; CHECK-NEXT: PointeeAlign: 128
1717 ; CHECK-NEXT: AddrSpaceQual: Local
1718 ; CHECK-NEXT: AccQual: Default
1719 ; CHECK-NEXT: - Name: g
1720 ; CHECK-NEXT: TypeName: 'char16 addrspace(5)*'
1721 ; CHECK-NEXT: Size: 4
1722 ; CHECK-NEXT: Align: 4
1723 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1724 ; CHECK-NEXT: PointeeAlign: 1024
1725 ; CHECK-NEXT: AddrSpaceQual: Local
1726 ; CHECK-NEXT: AccQual: Default
1727 ; CHECK-NEXT: - Name: h
1728 ; CHECK-NEXT: Size: 4
1729 ; CHECK-NEXT: Align: 4
1730 ; CHECK-NEXT: ValueKind: DynamicSharedPointer
1731 ; CHECK-NEXT: PointeeAlign: 16
1732 ; CHECK-NEXT: AddrSpaceQual: Local
1733 ; CHECK-NEXT: - Size: 8
1734 ; CHECK-NEXT: Align: 8
1735 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1736 ; CHECK-NEXT: - Size: 8
1737 ; CHECK-NEXT: Align: 8
1738 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1739 ; CHECK-NEXT: - Size: 8
1740 ; CHECK-NEXT: Align: 8
1741 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1742 ; CHECK-NEXT: - Size: 8
1743 ; CHECK-NEXT: Align: 8
1744 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1745 ; CHECK-NEXT: AddrSpaceQual: Global
1746 ; CHECK-NEXT: - Size: 8
1747 ; CHECK-NEXT: Align: 8
1748 ; CHECK-NEXT: ValueKind: HiddenNone
1749 ; CHECK-NEXT: AddrSpaceQual: Global
1750 ; CHECK-NEXT: - Size: 8
1751 ; CHECK-NEXT: Align: 8
1752 ; CHECK-NEXT: ValueKind: HiddenNone
1753 ; CHECK-NEXT: AddrSpaceQual: Global
1754 ; CHECK-NEXT: - Size: 8
1755 ; CHECK-NEXT: Align: 8
1756 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1757 ; CHECK-NEXT: AddrSpaceQual: Global
1758 define amdgpu_kernel void @test_pointee_align_attribute(i64 addrspace(1)* align 16 %a,
1759 i8 addrspace(3)* align 8 %b,
1760 <2 x i8> addrspace(3)* align 32 %c,
1761 <3 x i8> addrspace(3)* align 64 %d,
1762 <4 x i8> addrspace(3)* align 256 %e,
1763 <8 x i8> addrspace(3)* align 128 %f,
1764 <16 x i8> addrspace(3)* align 1024 %g,
1765 {} addrspace(3)* align 16 %h) #0
1766 !kernel_arg_addr_space !91 !kernel_arg_access_qual !92 !kernel_arg_type !93
1767 !kernel_arg_base_type !93 !kernel_arg_type_qual !94 {
1772 ; CHECK: - Name: __test_block_invoke_kernel
1773 ; CHECK-NEXT: SymbolName: '__test_block_invoke_kernel@kd'
1774 ; CHECK-NEXT: Language: OpenCL C
1775 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1776 ; CHECK-NEXT: Attrs:
1777 ; CHECK-NEXT: RuntimeHandle: __test_block_invoke_kernel_runtime_handle
1779 ; CHECK-NEXT: - Name: arg
1780 ; CHECK-NEXT: TypeName: __block_literal
1781 ; CHECK-NEXT: Size: 25
1782 ; CHECK-NEXT: Align: 1
1783 ; CHECK-NEXT: ValueKind: ByValue
1784 ; CHECK-NEXT: AccQual: Default
1785 ; CHECK-NEXT: - Size: 8
1786 ; CHECK-NEXT: Align: 8
1787 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1788 ; CHECK-NEXT: - Size: 8
1789 ; CHECK-NEXT: Align: 8
1790 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1791 ; CHECK-NEXT: - Size: 8
1792 ; CHECK-NEXT: Align: 8
1793 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1794 ; CHECK-NEXT: - Size: 8
1795 ; CHECK-NEXT: Align: 8
1796 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1797 ; CHECK-NEXT: AddrSpaceQual: Global
1798 ; CHECK-NEXT: - Size: 8
1799 ; CHECK-NEXT: Align: 8
1800 ; CHECK-NEXT: ValueKind: HiddenNone
1801 ; CHECK-NEXT: AddrSpaceQual: Global
1802 ; CHECK-NEXT: - Size: 8
1803 ; CHECK-NEXT: Align: 8
1804 ; CHECK-NEXT: ValueKind: HiddenNone
1805 ; CHECK-NEXT: AddrSpaceQual: Global
1806 ; CHECK-NEXT: - Size: 8
1807 ; CHECK-NEXT: Align: 8
1808 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1809 ; CHECK-NEXT: AddrSpaceQual: Global
1810 define amdgpu_kernel void @__test_block_invoke_kernel(
1811 <{ i32, i32, i8*, i8 addrspace(1)*, i8 }> %arg) #1
1812 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !110
1813 !kernel_arg_base_type !110 !kernel_arg_type_qual !4 {
1817 ; CHECK: - Name: test_enqueue_kernel_caller
1818 ; CHECK-NEXT: SymbolName: 'test_enqueue_kernel_caller@kd'
1819 ; CHECK-NEXT: Language: OpenCL C
1820 ; CHECK-NEXT: LanguageVersion: [ 2, 0 ]
1822 ; CHECK-NEXT: - Name: a
1823 ; CHECK-NEXT: TypeName: char
1824 ; CHECK-NEXT: Size: 1
1825 ; CHECK-NEXT: Align: 1
1826 ; CHECK-NEXT: ValueKind: ByValue
1827 ; CHECK-NEXT: AccQual: Default
1828 ; CHECK-NEXT: - Size: 8
1829 ; CHECK-NEXT: Align: 8
1830 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetX
1831 ; CHECK-NEXT: - Size: 8
1832 ; CHECK-NEXT: Align: 8
1833 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetY
1834 ; CHECK-NEXT: - Size: 8
1835 ; CHECK-NEXT: Align: 8
1836 ; CHECK-NEXT: ValueKind: HiddenGlobalOffsetZ
1837 ; CHECK-NEXT: - Size: 8
1838 ; CHECK-NEXT: Align: 8
1839 ; CHECK-NEXT: ValueKind: HiddenPrintfBuffer
1840 ; CHECK-NEXT: AddrSpaceQual: Global
1841 ; CHECK-NEXT: - Size: 8
1842 ; CHECK-NEXT: Align: 8
1843 ; CHECK-NEXT: ValueKind: HiddenDefaultQueue
1844 ; CHECK-NEXT: AddrSpaceQual: Global
1845 ; CHECK-NEXT: - Size: 8
1846 ; CHECK-NEXT: Align: 8
1847 ; CHECK-NEXT: ValueKind: HiddenCompletionAction
1848 ; CHECK-NEXT: AddrSpaceQual: Global
1849 ; CHECK-NEXT: - Size: 8
1850 ; CHECK-NEXT: Align: 8
1851 ; CHECK-NEXT: ValueKind: HiddenMultiGridSyncArg
1852 ; CHECK-NEXT: AddrSpaceQual: Global
1853 define amdgpu_kernel void @test_enqueue_kernel_caller(i8 %a) #2
1854 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !9
1855 !kernel_arg_base_type !9 !kernel_arg_type_qual !4 {
1859 ; CHECK: - Name: unknown_addrspace_kernarg
1861 ; CHECK-NEXT: - Name: ptr
1862 ; CHECK-NEXT: Size: 8
1863 ; CHECK-NEXT: Align: 8
1864 ; CHECK-NEXT: ValueKind: GlobalBuffer
1865 define amdgpu_kernel void @unknown_addrspace_kernarg(i32 addrspace(12345)* %ptr) #0 {
1869 attributes #0 = { "amdgpu-implicitarg-num-bytes"="56" }
1870 attributes #1 = { "amdgpu-implicitarg-num-bytes"="56" "runtime-handle"="__test_block_invoke_kernel_runtime_handle" }
1871 attributes #2 = { "amdgpu-implicitarg-num-bytes"="56" "calls-enqueue-kernel" }
1873 !llvm.printf.fmts = !{!100, !101}
1879 !5 = !{i32 undef, i32 1}
1880 !6 = !{i32 1, i32 2, i32 4}
1881 !7 = !{<4 x i32> undef, i32 0}
1882 !8 = !{i32 8, i32 16, i32 32}
1889 !15 = !{!"double16"}
1890 !16 = !{!"int addrspace(5)*"}
1891 !17 = !{!"image2d_t"}
1892 !18 = !{!"sampler_t"}
1894 !20 = !{!"struct A"}
1896 !22 = !{i32 0, i32 0, i32 0}
1897 !23 = !{!"none", !"none", !"none"}
1898 !24 = !{!"int", !"short2", !"char3"}
1899 !25 = !{!"", !"", !""}
1900 !26 = !{half undef, i32 1}
1901 !27 = !{float undef, i32 1}
1902 !28 = !{double undef, i32 1}
1903 !29 = !{i8 undef, i32 1}
1904 !30 = !{i16 undef, i32 1}
1905 !31 = !{i64 undef, i32 1}
1906 !32 = !{i32 addrspace(5)*undef, i32 1}
1907 !50 = !{i32 1, i32 2, i32 3}
1908 !51 = !{!"int addrspace(5)*", !"int addrspace(5)*", !"int addrspace(5)*"}
1909 !60 = !{i32 1, i32 1, i32 1}
1910 !61 = !{!"read_only", !"write_only", !"read_write"}
1911 !62 = !{!"image1d_t", !"image2d_t", !"image3d_t"}
1912 !70 = !{!"volatile", !"const restrict", !"pipe"}
1913 !80 = !{!"int addrspace(5)* addrspace(5)*"}
1915 !82 = !{!"struct B"}
1916 !83 = !{!"global int addrspace(5)* __attribute__((ext_vector_type(2)))"}
1917 !84 = !{!"clk_event_t"}
1918 !opencl.ocl.version = !{!90}
1919 !90 = !{i32 2, i32 0}
1920 !91 = !{i32 0, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3}
1921 !92 = !{!"none", !"none", !"none", !"none", !"none", !"none", !"none"}
1922 !93 = !{!"long addrspace(5)*", !"char addrspace(5)*", !"char2 addrspace(5)*", !"char3 addrspace(5)*", !"char4 addrspace(5)*", !"char8 addrspace(5)*", !"char16 addrspace(5)*"}
1923 !94 = !{!"", !"", !"", !"", !"", !"", !""}
1924 !100 = !{!"1:1:4:%d\5Cn"}
1925 !101 = !{!"2:1:8:%g\5Cn"}
1926 !110 = !{!"__block_literal"}
1927 !111 = !{!"char", !"char"}
1928 ; PARSER: AMDGPU HSA Metadata Parser Test: PASS