1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=kaveri -enable-ipra=0 -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GCN,CIVI %s
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -enable-ipra=0 -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefixes=GCN,GFX9 %s
4 ; GCN-LABEL: {{^}}use_dispatch_ptr:
5 ; GCN: s_load_dword s{{[0-9]+}}, s[4:5]
6 define hidden void @use_dispatch_ptr() #1 {
7 %dispatch_ptr = call noalias ptr addrspace(4) @llvm.amdgcn.dispatch.ptr() #0
8 %value = load volatile i32, ptr addrspace(4) %dispatch_ptr
12 ; GCN-LABEL: {{^}}kern_indirect_use_dispatch_ptr:
16 ; GCN: .amdhsa_user_sgpr_dispatch_ptr 1
17 define amdgpu_kernel void @kern_indirect_use_dispatch_ptr(i32) #1 {
18 call void @use_dispatch_ptr()
22 ; GCN-LABEL: {{^}}use_queue_ptr:
23 ; GCN: s_load_dword s{{[0-9]+}}, s[6:7]
24 define hidden void @use_queue_ptr() #1 {
25 %queue_ptr = call noalias ptr addrspace(4) @llvm.amdgcn.queue.ptr() #0
26 %value = load volatile i32, ptr addrspace(4) %queue_ptr
30 ; GCN-LABEL: {{^}}kern_indirect_use_queue_ptr:
31 ; GCN: s_mov_b64 s[6:7], s[4:5]
32 ; GCN: .amdhsa_user_sgpr_queue_ptr 1
33 define amdgpu_kernel void @kern_indirect_use_queue_ptr(i32) #1 {
34 call void @use_queue_ptr()
38 ; GCN-LABEL: {{^}}use_queue_ptr_addrspacecast:
39 ; CIVI: s_load_dword [[APERTURE_LOAD:s[0-9]+]], s[6:7], 0x10
40 ; CIVI: v_mov_b32_e32 v[[LO:[0-9]+]], 16
41 ; CIVI-DAG: v_mov_b32_e32 v[[HI:[0-9]+]], [[APERTURE_LOAD]]
43 ; GFX9: s_mov_b64 s[{{[0-9]+}}:[[HI:[0-9]+]]], src_shared_base
44 ; GFX9-DAG: v_mov_b32_e32 v[[VGPR_HI:[0-9]+]], s[[HI]]
45 ; GFX9: {{flat|global}}_store_dword v{{\[[0-9]+}}:[[VGPR_HI]]]
47 ; CIVI: {{flat|global}}_store_dword v[[[LO]]:[[HI]]]
48 define hidden void @use_queue_ptr_addrspacecast() #1 {
49 %asc = addrspacecast ptr addrspace(3) inttoptr (i32 16 to ptr addrspace(3)) to ptr
50 store volatile i32 0, ptr %asc
54 ; GCN-LABEL: {{^}}kern_indirect_use_queue_ptr_addrspacecast:
55 ; CIVI: s_mov_b64 s[6:7], s[4:5]
56 ; CIVI: .amdhsa_user_sgpr_queue_ptr 1
58 ; GFX9-NOT: s_mov_b64 s[6:7]
59 ; GFX9: .amdhsa_user_sgpr_queue_ptr 0
60 define amdgpu_kernel void @kern_indirect_use_queue_ptr_addrspacecast(i32) #1 {
61 call void @use_queue_ptr_addrspacecast()
65 ; Not really supported in callable functions.
66 ; GCN-LABEL: {{^}}use_kernarg_segment_ptr:
67 ; GCN: s_mov_b64 [[PTR:s\[[0-9]+:[0-9]+\]]], 0
68 ; GCN: s_load_dword s{{[0-9]+}}, [[PTR]], 0x0
69 define hidden void @use_kernarg_segment_ptr() #1 {
70 %kernarg_segment_ptr = call noalias ptr addrspace(4) @llvm.amdgcn.kernarg.segment.ptr() #0
71 %value = load volatile i32, ptr addrspace(4) %kernarg_segment_ptr
75 ; GCN-LABEL: {{^}}use_implicitarg_ptr:
76 ; GCN: s_load_dword s{{[0-9]+}}, s[8:9]
77 define hidden void @use_implicitarg_ptr() #1 {
78 %implicit.arg.ptr = call noalias ptr addrspace(4) @llvm.amdgcn.implicitarg.ptr() #0
79 %value = load volatile i32, ptr addrspace(4) %implicit.arg.ptr
83 ; GCN-LABEL: {{^}}kern_indirect_use_kernarg_segment_ptr:
84 ; GCN: .amdhsa_user_sgpr_kernarg_segment_ptr 1
85 define amdgpu_kernel void @kern_indirect_use_kernarg_segment_ptr(i32) #1 {
86 call void @use_kernarg_segment_ptr()
90 ; GCN-LABEL: {{^}}use_dispatch_id:
92 define hidden void @use_dispatch_id() #1 {
93 %id = call i64 @llvm.amdgcn.dispatch.id()
94 call void asm sideeffect "; use $0", "s"(i64 %id)
98 ; No kernarg segment so that there is a mov to check. With kernarg
99 ; pointer enabled, it happens to end up in the right place anyway.
101 ; GCN-LABEL: {{^}}kern_indirect_use_dispatch_id:
102 ; GCN: s_mov_b64 s[10:11], s[4:5]
103 ; GCN: .amdhsa_user_sgpr_dispatch_id 1
104 define amdgpu_kernel void @kern_indirect_use_dispatch_id() #1 {
105 call void @use_dispatch_id()
109 ; GCN-LABEL: {{^}}use_workgroup_id_x:
112 define hidden void @use_workgroup_id_x() #1 {
113 %val = call i32 @llvm.amdgcn.workgroup.id.x()
114 call void asm sideeffect "; use $0", "s"(i32 %val)
118 ; GCN-LABEL: {{^}}use_stack_workgroup_id_x:
121 ; GCN: buffer_store_dword v0, off, s[0:3], s32{{$}}
124 define hidden void @use_stack_workgroup_id_x() #1 {
125 %alloca = alloca i32, addrspace(5)
126 store volatile i32 0, ptr addrspace(5) %alloca
127 %val = call i32 @llvm.amdgcn.workgroup.id.x()
128 call void asm sideeffect "; use $0", "s"(i32 %val)
132 ; GCN-LABEL: {{^}}use_workgroup_id_y:
135 define hidden void @use_workgroup_id_y() #1 {
136 %val = call i32 @llvm.amdgcn.workgroup.id.y()
137 call void asm sideeffect "; use $0", "s"(i32 %val)
141 ; GCN-LABEL: {{^}}use_workgroup_id_z:
144 define hidden void @use_workgroup_id_z() #1 {
145 %val = call i32 @llvm.amdgcn.workgroup.id.z()
146 call void asm sideeffect "; use $0", "s"(i32 %val)
150 ; GCN-LABEL: {{^}}use_workgroup_id_xy:
153 define hidden void @use_workgroup_id_xy() #1 {
154 %val0 = call i32 @llvm.amdgcn.workgroup.id.x()
155 %val1 = call i32 @llvm.amdgcn.workgroup.id.y()
156 call void asm sideeffect "; use $0", "s"(i32 %val0)
157 call void asm sideeffect "; use $0", "s"(i32 %val1)
161 ; GCN-LABEL: {{^}}use_workgroup_id_xyz:
165 define hidden void @use_workgroup_id_xyz() #1 {
166 %val0 = call i32 @llvm.amdgcn.workgroup.id.x()
167 %val1 = call i32 @llvm.amdgcn.workgroup.id.y()
168 %val2 = call i32 @llvm.amdgcn.workgroup.id.z()
169 call void asm sideeffect "; use $0", "s"(i32 %val0)
170 call void asm sideeffect "; use $0", "s"(i32 %val1)
171 call void asm sideeffect "; use $0", "s"(i32 %val2)
175 ; GCN-LABEL: {{^}}use_workgroup_id_xz:
178 define hidden void @use_workgroup_id_xz() #1 {
179 %val0 = call i32 @llvm.amdgcn.workgroup.id.x()
180 %val1 = call i32 @llvm.amdgcn.workgroup.id.z()
181 call void asm sideeffect "; use $0", "s"(i32 %val0)
182 call void asm sideeffect "; use $0", "s"(i32 %val1)
186 ; GCN-LABEL: {{^}}use_workgroup_id_yz:
189 define hidden void @use_workgroup_id_yz() #1 {
190 %val0 = call i32 @llvm.amdgcn.workgroup.id.y()
191 %val1 = call i32 @llvm.amdgcn.workgroup.id.z()
192 call void asm sideeffect "; use $0", "s"(i32 %val0)
193 call void asm sideeffect "; use $0", "s"(i32 %val1)
197 ; GCN-LABEL: {{^}}kern_indirect_use_workgroup_id_x:
199 ; GCN: s_mov_b32 s12, s6
200 ; GCN: s_mov_b32 s32, 0
201 ; GCN: s_getpc_b64 s[4:5]
202 ; GCN-NEXT: s_add_u32 s4, s4, use_workgroup_id_x@rel32@lo+4
203 ; GCN-NEXT: s_addc_u32 s5, s5, use_workgroup_id_x@rel32@hi+12
207 ; GCN: .amdhsa_system_sgpr_workgroup_id_x 1
208 ; GCN: .amdhsa_system_sgpr_workgroup_id_y 0
209 ; GCN: .amdhsa_system_sgpr_workgroup_id_z 0
210 define amdgpu_kernel void @kern_indirect_use_workgroup_id_x() #1 {
211 call void @use_workgroup_id_x()
215 ; GCN-LABEL: {{^}}kern_indirect_use_workgroup_id_y:
217 ; GCN: s_mov_b32 s13, s7
219 ; GCN: s_mov_b32 s32, 0
222 ; GCN: .amdhsa_system_sgpr_workgroup_id_x 1
223 ; GCN: .amdhsa_system_sgpr_workgroup_id_y 1
224 ; GCN: .amdhsa_system_sgpr_workgroup_id_z 0
225 define amdgpu_kernel void @kern_indirect_use_workgroup_id_y() #1 {
226 call void @use_workgroup_id_y()
230 ; GCN-LABEL: {{^}}kern_indirect_use_workgroup_id_z:
233 ; GCN: s_mov_b32 s14, s7
237 ; GCN: s_mov_b32 s32, 0
240 ; GCN: .amdhsa_system_sgpr_workgroup_id_x 1
241 ; GCN: .amdhsa_system_sgpr_workgroup_id_y 0
242 ; GCN: .amdhsa_system_sgpr_workgroup_id_z 1
243 define amdgpu_kernel void @kern_indirect_use_workgroup_id_z() #1 {
244 call void @use_workgroup_id_z()
248 ; GCN-LABEL: {{^}}kern_indirect_use_workgroup_id_xy:
250 ; GCN: s_mov_b32 s12, s6
251 ; GCN-NEXT: s_mov_b32 s13, s7
254 ; GCN: s_mov_b32 s32, 0
257 ; GCN: .amdhsa_system_sgpr_workgroup_id_x 1
258 ; GCN: .amdhsa_system_sgpr_workgroup_id_y 1
259 ; GCN: .amdhsa_system_sgpr_workgroup_id_z 0
260 define amdgpu_kernel void @kern_indirect_use_workgroup_id_xy() #1 {
261 call void @use_workgroup_id_xy()
265 ; GCN-LABEL: {{^}}kern_indirect_use_workgroup_id_xyz:
266 ; GCN: s_mov_b32 s12, s6
267 ; GCN: s_mov_b32 s13, s7
268 ; GCN: s_mov_b32 s14, s8
269 ; GCN: s_mov_b32 s32, 0
272 ; GCN: .amdhsa_system_sgpr_workgroup_id_x 1
273 ; GCN: .amdhsa_system_sgpr_workgroup_id_y 1
274 ; GCN: .amdhsa_system_sgpr_workgroup_id_z 1
275 define amdgpu_kernel void @kern_indirect_use_workgroup_id_xyz() #1 {
276 call void @use_workgroup_id_xyz()
280 ; GCN-LABEL: {{^}}kern_indirect_use_workgroup_id_xz:
283 ; GCN: s_mov_b32 s12, s6
284 ; GCN-NEXT: s_mov_b32 s14, s7
287 ; GCN: s_mov_b32 s32, 0
290 ; GCN: .amdhsa_system_sgpr_workgroup_id_x 1
291 ; GCN: .amdhsa_system_sgpr_workgroup_id_y 0
292 ; GCN: .amdhsa_system_sgpr_workgroup_id_z 1
293 define amdgpu_kernel void @kern_indirect_use_workgroup_id_xz() #1 {
294 call void @use_workgroup_id_xz()
298 ; GCN-LABEL: {{^}}kern_indirect_use_workgroup_id_yz:
300 ; GCN: s_mov_b32 s13, s7
301 ; GCN: s_mov_b32 s14, s8
303 ; GCN: s_mov_b32 s32, 0
306 ; GCN: .amdhsa_system_sgpr_workgroup_id_x 1
307 ; GCN: .amdhsa_system_sgpr_workgroup_id_y 1
308 ; GCN: .amdhsa_system_sgpr_workgroup_id_z 1
309 define amdgpu_kernel void @kern_indirect_use_workgroup_id_yz() #1 {
310 call void @use_workgroup_id_yz()
314 ; Argument is in right place already
315 ; GCN-LABEL: {{^}}func_indirect_use_workgroup_id_x:
319 ; GCN: v_readlane_b32 s30, v40, 0
320 define hidden void @func_indirect_use_workgroup_id_x() #1 {
321 call void @use_workgroup_id_x()
325 ; Argument is in right place already. We are free to clobber other
327 ; GCN-LABEL: {{^}}func_indirect_use_workgroup_id_y:
331 define hidden void @func_indirect_use_workgroup_id_y() #1 {
332 call void @use_workgroup_id_y()
336 ; GCN-LABEL: {{^}}func_indirect_use_workgroup_id_z:
340 define hidden void @func_indirect_use_workgroup_id_z() #1 {
341 call void @use_workgroup_id_z()
345 ; GCN-LABEL: {{^}}other_arg_use_workgroup_id_x:
346 ; CIVI: flat_store_dword v{{\[[0-9]+:[0-9]+\]}}, v0
347 ; GFX9: global_store_dword v{{\[[0-9]+:[0-9]+\]}}, v0, off
349 define hidden void @other_arg_use_workgroup_id_x(i32 %arg0) #1 {
350 %val = call i32 @llvm.amdgcn.workgroup.id.x()
351 store volatile i32 %arg0, ptr addrspace(1) undef
352 call void asm sideeffect "; use $0", "s"(i32 %val)
356 ; GCN-LABEL: {{^}}other_arg_use_workgroup_id_y:
357 ; CIVI: flat_store_dword v{{\[[0-9]+:[0-9]+\]}}, v0
358 ; GFX9: global_store_dword v{{\[[0-9]+:[0-9]+\]}}, v0, off
360 define hidden void @other_arg_use_workgroup_id_y(i32 %arg0) #1 {
361 %val = call i32 @llvm.amdgcn.workgroup.id.y()
362 store volatile i32 %arg0, ptr addrspace(1) undef
363 call void asm sideeffect "; use $0", "s"(i32 %val)
367 ; GCN-LABEL: {{^}}other_arg_use_workgroup_id_z:
368 ; CIVI: flat_store_dword v{{\[[0-9]+:[0-9]+\]}}, v0
369 ; GFX9: global_store_dword v{{\[[0-9]+:[0-9]+\]}}, v0, off
371 define hidden void @other_arg_use_workgroup_id_z(i32 %arg0) #1 {
372 %val = call i32 @llvm.amdgcn.workgroup.id.z()
373 store volatile i32 %arg0, ptr addrspace(1) undef
374 call void asm sideeffect "; use $0", "s"(i32 %val)
378 ; GCN-LABEL: {{^}}kern_indirect_other_arg_use_workgroup_id_x:
382 ; GCN-DAG: s_mov_b32 s12, s6
383 ; GCN-DAG: v_mov_b32_e32 v0, 0x22b
387 ; GCN-DAG: s_mov_b32 s32, 0
390 ; GCN: .amdhsa_system_sgpr_workgroup_id_x 1
391 ; GCN: .amdhsa_system_sgpr_workgroup_id_y 0
392 ; GCN: .amdhsa_system_sgpr_workgroup_id_z 0
393 define amdgpu_kernel void @kern_indirect_other_arg_use_workgroup_id_x() #1 {
394 call void @other_arg_use_workgroup_id_x(i32 555)
398 ; GCN-LABEL: {{^}}kern_indirect_other_arg_use_workgroup_id_y:
399 ; GCN-DAG: v_mov_b32_e32 v0, 0x22b
400 ; GCN-DAG: s_mov_b32 s13, s7
402 ; GCN-DAG: s_mov_b32 s32, 0
405 ; GCN: .amdhsa_system_sgpr_workgroup_id_x 1
406 ; GCN: .amdhsa_system_sgpr_workgroup_id_y 1
407 ; GCN: .amdhsa_system_sgpr_workgroup_id_z 0
408 define amdgpu_kernel void @kern_indirect_other_arg_use_workgroup_id_y() #1 {
409 call void @other_arg_use_workgroup_id_y(i32 555)
413 ; GCN-LABEL: {{^}}kern_indirect_other_arg_use_workgroup_id_z:
414 ; GCN-DAG: v_mov_b32_e32 v0, 0x22b
415 ; GCN-DAG: s_mov_b32 s14, s7
417 ; GCN: s_mov_b32 s32, 0
420 ; GCN: .amdhsa_system_sgpr_workgroup_id_x 1
421 ; GCN: .amdhsa_system_sgpr_workgroup_id_y 0
422 ; GCN: .amdhsa_system_sgpr_workgroup_id_z 1
423 define amdgpu_kernel void @kern_indirect_other_arg_use_workgroup_id_z() #1 {
424 call void @other_arg_use_workgroup_id_z(i32 555)
428 ; GCN-LABEL: {{^}}use_every_sgpr_input:
429 ; GCN: buffer_store_dword v{{[0-9]+}}, off, s[0:3], s32{{$}}
430 ; GCN: s_load_dword s{{[0-9]+}}, s[4:5]
431 ; GCN: s_load_dword s{{[0-9]+}}, s[6:7]
432 ; GCN: s_load_dword s{{[0-9]+}}, s[8:9]
433 ; GCN: ; use s[10:11]
437 define hidden void @use_every_sgpr_input() #1 {
438 %alloca = alloca i32, align 4, addrspace(5)
439 store volatile i32 0, ptr addrspace(5) %alloca
441 %dispatch_ptr = call noalias ptr addrspace(4) @llvm.amdgcn.dispatch.ptr() #0
442 %val0 = load volatile i32, ptr addrspace(4) %dispatch_ptr
444 %queue_ptr = call noalias ptr addrspace(4) @llvm.amdgcn.queue.ptr() #0
445 %val1 = load volatile i32, ptr addrspace(4) %queue_ptr
447 %implicitarg.ptr = call noalias ptr addrspace(4) @llvm.amdgcn.implicitarg.ptr() #0
448 %val2 = load volatile i32, ptr addrspace(4) %implicitarg.ptr
450 %val3 = call i64 @llvm.amdgcn.dispatch.id()
451 call void asm sideeffect "; use $0", "s"(i64 %val3)
453 %val4 = call i32 @llvm.amdgcn.workgroup.id.x()
454 call void asm sideeffect "; use $0", "s"(i32 %val4)
456 %val5 = call i32 @llvm.amdgcn.workgroup.id.y()
457 call void asm sideeffect "; use $0", "s"(i32 %val5)
459 %val6 = call i32 @llvm.amdgcn.workgroup.id.z()
460 call void asm sideeffect "; use $0", "s"(i32 %val6)
465 ; GCN-LABEL: {{^}}kern_indirect_use_every_sgpr_input:
466 ; GCN: s_mov_b32 s13, s15
467 ; GCN: s_mov_b32 s12, s14
468 ; GCN: s_mov_b32 s14, s16
469 ; GCN: s_mov_b32 s32, 0
472 ; GCN: .amdhsa_user_sgpr_private_segment_buffer 1
473 ; GCN: .amdhsa_user_sgpr_dispatch_ptr 1
474 ; GCN: .amdhsa_user_sgpr_queue_ptr 1
475 ; GCN: .amdhsa_user_sgpr_kernarg_segment_ptr 1
476 ; GCN: .amdhsa_user_sgpr_dispatch_id 1
477 ; GCN: .amdhsa_user_sgpr_flat_scratch_init 1
478 ; GCN: .amdhsa_user_sgpr_private_segment_size 0
479 ; GCN: .amdhsa_system_sgpr_private_segment_wavefront_offset 1
480 ; GCN: .amdhsa_system_sgpr_workgroup_id_x 1
481 ; GCN: .amdhsa_system_sgpr_workgroup_id_y 1
482 ; GCN: .amdhsa_system_sgpr_workgroup_id_z 1
483 ; GCN: .amdhsa_system_sgpr_workgroup_info 0
484 ; GCN: .amdhsa_system_vgpr_workitem_id 0
485 define amdgpu_kernel void @kern_indirect_use_every_sgpr_input(i8) #1 {
486 call void @use_every_sgpr_input()
490 ; We have to pass the kernarg segment, but there are no kernel
491 ; arguments so null is passed.
492 ; GCN-LABEL: {{^}}kern_indirect_use_every_sgpr_input_no_kernargs:
493 ; GCN: s_mov_b64 s[10:11], s[8:9]
494 ; GCN: s_mov_b64 s[8:9], 0{{$}}
495 ; GCN: s_mov_b32 s32, 0
498 ; GCN: .amdhsa_user_sgpr_private_segment_buffer 1
499 ; GCN: .amdhsa_user_sgpr_dispatch_ptr 1
500 ; GCN: .amdhsa_user_sgpr_queue_ptr 1
501 ; GCN: .amdhsa_user_sgpr_kernarg_segment_ptr 0
502 ; GCN: .amdhsa_user_sgpr_dispatch_id 1
503 ; GCN: .amdhsa_user_sgpr_flat_scratch_init 1
504 ; GCN: .amdhsa_user_sgpr_private_segment_size 0
505 ; GCN: .amdhsa_system_sgpr_private_segment_wavefront_offset 1
506 ; GCN: .amdhsa_system_sgpr_workgroup_id_x 1
507 ; GCN: .amdhsa_system_sgpr_workgroup_id_y 1
508 ; GCN: .amdhsa_system_sgpr_workgroup_id_z 1
509 ; GCN: .amdhsa_system_sgpr_workgroup_info 0
510 ; GCN: .amdhsa_system_vgpr_workitem_id 0
511 define amdgpu_kernel void @kern_indirect_use_every_sgpr_input_no_kernargs() #2 {
512 call void @use_every_sgpr_input()
516 ; GCN-LABEL: {{^}}func_indirect_use_every_sgpr_input:
530 ; GCN: s_or_saveexec_b64 s[16:17], -1
531 define hidden void @func_indirect_use_every_sgpr_input() #1 {
532 call void @use_every_sgpr_input()
536 ; GCN-LABEL: {{^}}func_use_every_sgpr_input_call_use_workgroup_id_xyz:
540 ; GCN: ; use s[10:11]
546 define hidden void @func_use_every_sgpr_input_call_use_workgroup_id_xyz() #1 {
547 %alloca = alloca i32, align 4, addrspace(5)
548 store volatile i32 0, ptr addrspace(5) %alloca
550 %dispatch_ptr = call noalias ptr addrspace(4) @llvm.amdgcn.dispatch.ptr() #0
551 %val0 = load volatile i32, ptr addrspace(4) %dispatch_ptr
553 %queue_ptr = call noalias ptr addrspace(4) @llvm.amdgcn.queue.ptr() #0
554 %val1 = load volatile i32, ptr addrspace(4) %queue_ptr
556 %kernarg_segment_ptr = call noalias ptr addrspace(4) @llvm.amdgcn.implicitarg.ptr() #0
557 %val2 = load volatile i32, ptr addrspace(4) %kernarg_segment_ptr
559 %val3 = call i64 @llvm.amdgcn.dispatch.id()
560 call void asm sideeffect "; use $0", "s"(i64 %val3)
562 %val4 = call i32 @llvm.amdgcn.workgroup.id.x()
563 call void asm sideeffect "; use $0", "s"(i32 %val4)
565 %val5 = call i32 @llvm.amdgcn.workgroup.id.y()
566 call void asm sideeffect "; use $0", "s"(i32 %val5)
568 %val6 = call i32 @llvm.amdgcn.workgroup.id.z()
569 call void asm sideeffect "; use $0", "s"(i32 %val6)
571 call void @use_workgroup_id_xyz()
575 declare i32 @llvm.amdgcn.workgroup.id.x() #0
576 declare i32 @llvm.amdgcn.workgroup.id.y() #0
577 declare i32 @llvm.amdgcn.workgroup.id.z() #0
578 declare noalias ptr addrspace(4) @llvm.amdgcn.queue.ptr() #0
579 declare noalias ptr addrspace(4) @llvm.amdgcn.kernarg.segment.ptr() #0
580 declare noalias ptr addrspace(4) @llvm.amdgcn.implicitarg.ptr() #0
581 declare i64 @llvm.amdgcn.dispatch.id() #0
582 declare noalias ptr addrspace(4) @llvm.amdgcn.dispatch.ptr() #0
584 attributes #0 = { nounwind readnone speculatable }
585 attributes #1 = { nounwind noinline }
586 attributes #2 = { nounwind noinline "amdgpu-implicitarg-num-bytes"="0" }