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