1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -global-isel -stop-after=irtranslator -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs -o - %s | FileCheck -enable-var-scope -check-prefix=GFX900 %s
3 ; RUN: llc -global-isel -stop-after=irtranslator -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx908 -verify-machineinstrs -o - %s | FileCheck -enable-var-scope -check-prefix=GFX908 %s
5 ; Workitem IDs are passed to the kernel differently for gfx908
7 declare hidden void @external_void_func_void() #0
8 declare hidden void @external_void_func_i32(i32) #0
9 declare hidden void @external_void_func_v32i32(<32 x i32>) #0
11 define amdgpu_kernel void @test_call_external_void_func_i32([17 x i8]) #0 {
12 ; GFX900-LABEL: name: test_call_external_void_func_i32
13 ; GFX900: bb.1 (%ir-block.1):
14 ; GFX900-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr0, $vgpr1, $vgpr2, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
16 ; GFX900-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr2
17 ; GFX900-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr1
18 ; GFX900-NEXT: [[COPY2:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
19 ; GFX900-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr16
20 ; GFX900-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr15
21 ; GFX900-NEXT: [[COPY5:%[0-9]+]]:sgpr_32 = COPY $sgpr14
22 ; GFX900-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
23 ; GFX900-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
24 ; GFX900-NEXT: [[COPY8:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
25 ; GFX900-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
26 ; GFX900-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
27 ; GFX900-NEXT: [[INT:%[0-9]+]]:_(p4) = G_INTRINSIC intrinsic(@llvm.amdgcn.kernarg.segment.ptr)
28 ; GFX900-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
29 ; GFX900-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
30 ; GFX900-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY8]]
31 ; GFX900-NEXT: [[COPY11:%[0-9]+]]:_(p4) = COPY [[COPY7]]
32 ; GFX900-NEXT: [[COPY12:%[0-9]+]]:_(p4) = COPY [[COPY9]](p4)
33 ; GFX900-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 20
34 ; GFX900-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY12]], [[C1]](s64)
35 ; GFX900-NEXT: [[COPY13:%[0-9]+]]:_(s64) = COPY [[COPY6]]
36 ; GFX900-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY5]]
37 ; GFX900-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY4]]
38 ; GFX900-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY [[COPY3]]
39 ; GFX900-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
40 ; GFX900-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY [[COPY2]](s32)
41 ; GFX900-NEXT: [[COPY18:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
42 ; GFX900-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
43 ; GFX900-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY18]], [[C2]](s32)
44 ; GFX900-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY17]], [[SHL]]
45 ; GFX900-NEXT: [[COPY19:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
46 ; GFX900-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
47 ; GFX900-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY19]], [[C3]](s32)
48 ; GFX900-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[OR]], [[SHL1]]
49 ; GFX900-NEXT: $vgpr0 = COPY [[C]](s32)
50 ; GFX900-NEXT: [[COPY20:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
51 ; GFX900-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY20]](<4 x s32>)
52 ; GFX900-NEXT: $sgpr4_sgpr5 = COPY [[COPY10]](p4)
53 ; GFX900-NEXT: $sgpr6_sgpr7 = COPY [[COPY11]](p4)
54 ; GFX900-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
55 ; GFX900-NEXT: $sgpr10_sgpr11 = COPY [[COPY13]](s64)
56 ; GFX900-NEXT: $sgpr12 = COPY [[COPY14]](s32)
57 ; GFX900-NEXT: $sgpr13 = COPY [[COPY15]](s32)
58 ; GFX900-NEXT: $sgpr14 = COPY [[COPY16]](s32)
59 ; GFX900-NEXT: $sgpr15 = COPY [[DEF]](s32)
60 ; GFX900-NEXT: $vgpr31 = COPY [[OR1]](s32)
61 ; GFX900-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
62 ; GFX900-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
63 ; GFX900-NEXT: S_ENDPGM 0
65 ; GFX908-LABEL: name: test_call_external_void_func_i32
66 ; GFX908: bb.1 (%ir-block.1):
67 ; GFX908-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr0, $vgpr1, $vgpr2, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
69 ; GFX908-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr2
70 ; GFX908-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr1
71 ; GFX908-NEXT: [[COPY2:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
72 ; GFX908-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr16
73 ; GFX908-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr15
74 ; GFX908-NEXT: [[COPY5:%[0-9]+]]:sgpr_32 = COPY $sgpr14
75 ; GFX908-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
76 ; GFX908-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
77 ; GFX908-NEXT: [[COPY8:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
78 ; GFX908-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
79 ; GFX908-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
80 ; GFX908-NEXT: [[INT:%[0-9]+]]:_(p4) = G_INTRINSIC intrinsic(@llvm.amdgcn.kernarg.segment.ptr)
81 ; GFX908-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
82 ; GFX908-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
83 ; GFX908-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY8]]
84 ; GFX908-NEXT: [[COPY11:%[0-9]+]]:_(p4) = COPY [[COPY7]]
85 ; GFX908-NEXT: [[COPY12:%[0-9]+]]:_(p4) = COPY [[COPY9]](p4)
86 ; GFX908-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 20
87 ; GFX908-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY12]], [[C1]](s64)
88 ; GFX908-NEXT: [[COPY13:%[0-9]+]]:_(s64) = COPY [[COPY6]]
89 ; GFX908-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY5]]
90 ; GFX908-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY4]]
91 ; GFX908-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY [[COPY3]]
92 ; GFX908-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
93 ; GFX908-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY [[COPY2]](s32)
94 ; GFX908-NEXT: [[COPY18:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
95 ; GFX908-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
96 ; GFX908-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY18]], [[C2]](s32)
97 ; GFX908-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY17]], [[SHL]]
98 ; GFX908-NEXT: [[COPY19:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
99 ; GFX908-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
100 ; GFX908-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY19]], [[C3]](s32)
101 ; GFX908-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[OR]], [[SHL1]]
102 ; GFX908-NEXT: $vgpr0 = COPY [[C]](s32)
103 ; GFX908-NEXT: [[COPY20:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
104 ; GFX908-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY20]](<4 x s32>)
105 ; GFX908-NEXT: $sgpr4_sgpr5 = COPY [[COPY10]](p4)
106 ; GFX908-NEXT: $sgpr6_sgpr7 = COPY [[COPY11]](p4)
107 ; GFX908-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
108 ; GFX908-NEXT: $sgpr10_sgpr11 = COPY [[COPY13]](s64)
109 ; GFX908-NEXT: $sgpr12 = COPY [[COPY14]](s32)
110 ; GFX908-NEXT: $sgpr13 = COPY [[COPY15]](s32)
111 ; GFX908-NEXT: $sgpr14 = COPY [[COPY16]](s32)
112 ; GFX908-NEXT: $sgpr15 = COPY [[DEF]](s32)
113 ; GFX908-NEXT: $vgpr31 = COPY [[OR1]](s32)
114 ; GFX908-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
115 ; GFX908-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
116 ; GFX908-NEXT: S_ENDPGM 0
117 call void @external_void_func_i32(i32 42)
121 define void @test_func_call_external_void_func_i32() #0 {
122 ; GFX900-LABEL: name: test_func_call_external_void_func_i32
123 ; GFX900: bb.1 (%ir-block.0):
124 ; GFX900-NEXT: liveins: $sgpr12, $sgpr13, $sgpr14, $sgpr15, $vgpr31, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
125 ; GFX900-NEXT: {{ $}}
126 ; GFX900-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr31
127 ; GFX900-NEXT: [[COPY1:%[0-9]+]]:sgpr_32 = COPY $sgpr15
128 ; GFX900-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr14
129 ; GFX900-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr13
130 ; GFX900-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr12
131 ; GFX900-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
132 ; GFX900-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr8_sgpr9
133 ; GFX900-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
134 ; GFX900-NEXT: [[COPY8:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
135 ; GFX900-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 99
136 ; GFX900-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
137 ; GFX900-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
138 ; GFX900-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY8]]
139 ; GFX900-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY7]]
140 ; GFX900-NEXT: [[COPY11:%[0-9]+]]:_(p4) = COPY [[COPY6]]
141 ; GFX900-NEXT: [[COPY12:%[0-9]+]]:_(s64) = COPY [[COPY5]]
142 ; GFX900-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY4]]
143 ; GFX900-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY3]]
144 ; GFX900-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY2]]
145 ; GFX900-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY [[COPY1]]
146 ; GFX900-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
147 ; GFX900-NEXT: $vgpr0 = COPY [[C]](s32)
148 ; GFX900-NEXT: [[COPY18:%[0-9]+]]:_(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
149 ; GFX900-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY18]](<4 x s32>)
150 ; GFX900-NEXT: $sgpr4_sgpr5 = COPY [[COPY9]](p4)
151 ; GFX900-NEXT: $sgpr6_sgpr7 = COPY [[COPY10]](p4)
152 ; GFX900-NEXT: $sgpr8_sgpr9 = COPY [[COPY11]](p4)
153 ; GFX900-NEXT: $sgpr10_sgpr11 = COPY [[COPY12]](s64)
154 ; GFX900-NEXT: $sgpr12 = COPY [[COPY13]](s32)
155 ; GFX900-NEXT: $sgpr13 = COPY [[COPY14]](s32)
156 ; GFX900-NEXT: $sgpr14 = COPY [[COPY15]](s32)
157 ; GFX900-NEXT: $sgpr15 = COPY [[COPY16]](s32)
158 ; GFX900-NEXT: $vgpr31 = COPY [[COPY17]](s32)
159 ; GFX900-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
160 ; GFX900-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
161 ; GFX900-NEXT: SI_RETURN
163 ; GFX908-LABEL: name: test_func_call_external_void_func_i32
164 ; GFX908: bb.1 (%ir-block.0):
165 ; GFX908-NEXT: liveins: $sgpr12, $sgpr13, $sgpr14, $sgpr15, $vgpr31, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
166 ; GFX908-NEXT: {{ $}}
167 ; GFX908-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr31
168 ; GFX908-NEXT: [[COPY1:%[0-9]+]]:sgpr_32 = COPY $sgpr15
169 ; GFX908-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr14
170 ; GFX908-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr13
171 ; GFX908-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr12
172 ; GFX908-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
173 ; GFX908-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr8_sgpr9
174 ; GFX908-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
175 ; GFX908-NEXT: [[COPY8:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
176 ; GFX908-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 99
177 ; GFX908-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
178 ; GFX908-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
179 ; GFX908-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY8]]
180 ; GFX908-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY7]]
181 ; GFX908-NEXT: [[COPY11:%[0-9]+]]:_(p4) = COPY [[COPY6]]
182 ; GFX908-NEXT: [[COPY12:%[0-9]+]]:_(s64) = COPY [[COPY5]]
183 ; GFX908-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY4]]
184 ; GFX908-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY3]]
185 ; GFX908-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY2]]
186 ; GFX908-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY [[COPY1]]
187 ; GFX908-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
188 ; GFX908-NEXT: $vgpr0 = COPY [[C]](s32)
189 ; GFX908-NEXT: [[COPY18:%[0-9]+]]:_(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
190 ; GFX908-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY18]](<4 x s32>)
191 ; GFX908-NEXT: $sgpr4_sgpr5 = COPY [[COPY9]](p4)
192 ; GFX908-NEXT: $sgpr6_sgpr7 = COPY [[COPY10]](p4)
193 ; GFX908-NEXT: $sgpr8_sgpr9 = COPY [[COPY11]](p4)
194 ; GFX908-NEXT: $sgpr10_sgpr11 = COPY [[COPY12]](s64)
195 ; GFX908-NEXT: $sgpr12 = COPY [[COPY13]](s32)
196 ; GFX908-NEXT: $sgpr13 = COPY [[COPY14]](s32)
197 ; GFX908-NEXT: $sgpr14 = COPY [[COPY15]](s32)
198 ; GFX908-NEXT: $sgpr15 = COPY [[COPY16]](s32)
199 ; GFX908-NEXT: $vgpr31 = COPY [[COPY17]](s32)
200 ; GFX908-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
201 ; GFX908-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
202 ; GFX908-NEXT: SI_RETURN
203 call void @external_void_func_i32(i32 99)
207 ; Explicit argument is split between registers ad the stack due to v31
208 ; being used for workitem IDs.
209 define amdgpu_kernel void @test_call_external_void_func_v32i32([17 x i8]) #0 {
210 ; GFX900-LABEL: name: test_call_external_void_func_v32i32
211 ; GFX900: bb.1 (%ir-block.1):
212 ; GFX900-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr0, $vgpr1, $vgpr2, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
213 ; GFX900-NEXT: {{ $}}
214 ; GFX900-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr2
215 ; GFX900-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr1
216 ; GFX900-NEXT: [[COPY2:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
217 ; GFX900-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr16
218 ; GFX900-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr15
219 ; GFX900-NEXT: [[COPY5:%[0-9]+]]:sgpr_32 = COPY $sgpr14
220 ; GFX900-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
221 ; GFX900-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
222 ; GFX900-NEXT: [[COPY8:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
223 ; GFX900-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
224 ; GFX900-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
225 ; GFX900-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<32 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
226 ; GFX900-NEXT: [[INT:%[0-9]+]]:_(p4) = G_INTRINSIC intrinsic(@llvm.amdgcn.kernarg.segment.ptr)
227 ; GFX900-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
228 ; GFX900-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_v32i32
229 ; GFX900-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY8]]
230 ; GFX900-NEXT: [[COPY11:%[0-9]+]]:_(p4) = COPY [[COPY7]]
231 ; GFX900-NEXT: [[COPY12:%[0-9]+]]:_(p4) = COPY [[COPY9]](p4)
232 ; GFX900-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 20
233 ; GFX900-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY12]], [[C1]](s64)
234 ; GFX900-NEXT: [[COPY13:%[0-9]+]]:_(s64) = COPY [[COPY6]]
235 ; GFX900-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY5]]
236 ; GFX900-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY4]]
237 ; GFX900-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY [[COPY3]]
238 ; GFX900-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
239 ; GFX900-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY [[COPY2]](s32)
240 ; GFX900-NEXT: [[COPY18:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
241 ; GFX900-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
242 ; GFX900-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY18]], [[C2]](s32)
243 ; GFX900-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY17]], [[SHL]]
244 ; GFX900-NEXT: [[COPY19:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
245 ; GFX900-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
246 ; GFX900-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY19]], [[C3]](s32)
247 ; GFX900-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[OR]], [[SHL1]]
248 ; GFX900-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32), [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32), [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32), [[UV16:%[0-9]+]]:_(s32), [[UV17:%[0-9]+]]:_(s32), [[UV18:%[0-9]+]]:_(s32), [[UV19:%[0-9]+]]:_(s32), [[UV20:%[0-9]+]]:_(s32), [[UV21:%[0-9]+]]:_(s32), [[UV22:%[0-9]+]]:_(s32), [[UV23:%[0-9]+]]:_(s32), [[UV24:%[0-9]+]]:_(s32), [[UV25:%[0-9]+]]:_(s32), [[UV26:%[0-9]+]]:_(s32), [[UV27:%[0-9]+]]:_(s32), [[UV28:%[0-9]+]]:_(s32), [[UV29:%[0-9]+]]:_(s32), [[UV30:%[0-9]+]]:_(s32), [[UV31:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[BUILD_VECTOR]](<32 x s32>)
249 ; GFX900-NEXT: [[AMDGPU_WAVE_ADDRESS:%[0-9]+]]:_(p5) = G_AMDGPU_WAVE_ADDRESS $sp_reg
250 ; GFX900-NEXT: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
251 ; GFX900-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p5) = G_PTR_ADD [[AMDGPU_WAVE_ADDRESS]], [[C4]](s32)
252 ; GFX900-NEXT: G_STORE [[UV31]](s32), [[PTR_ADD1]](p5) :: (store (s32) into stack, align 16, addrspace 5)
253 ; GFX900-NEXT: $vgpr0 = COPY [[UV]](s32)
254 ; GFX900-NEXT: $vgpr1 = COPY [[UV1]](s32)
255 ; GFX900-NEXT: $vgpr2 = COPY [[UV2]](s32)
256 ; GFX900-NEXT: $vgpr3 = COPY [[UV3]](s32)
257 ; GFX900-NEXT: $vgpr4 = COPY [[UV4]](s32)
258 ; GFX900-NEXT: $vgpr5 = COPY [[UV5]](s32)
259 ; GFX900-NEXT: $vgpr6 = COPY [[UV6]](s32)
260 ; GFX900-NEXT: $vgpr7 = COPY [[UV7]](s32)
261 ; GFX900-NEXT: $vgpr8 = COPY [[UV8]](s32)
262 ; GFX900-NEXT: $vgpr9 = COPY [[UV9]](s32)
263 ; GFX900-NEXT: $vgpr10 = COPY [[UV10]](s32)
264 ; GFX900-NEXT: $vgpr11 = COPY [[UV11]](s32)
265 ; GFX900-NEXT: $vgpr12 = COPY [[UV12]](s32)
266 ; GFX900-NEXT: $vgpr13 = COPY [[UV13]](s32)
267 ; GFX900-NEXT: $vgpr14 = COPY [[UV14]](s32)
268 ; GFX900-NEXT: $vgpr15 = COPY [[UV15]](s32)
269 ; GFX900-NEXT: $vgpr16 = COPY [[UV16]](s32)
270 ; GFX900-NEXT: $vgpr17 = COPY [[UV17]](s32)
271 ; GFX900-NEXT: $vgpr18 = COPY [[UV18]](s32)
272 ; GFX900-NEXT: $vgpr19 = COPY [[UV19]](s32)
273 ; GFX900-NEXT: $vgpr20 = COPY [[UV20]](s32)
274 ; GFX900-NEXT: $vgpr21 = COPY [[UV21]](s32)
275 ; GFX900-NEXT: $vgpr22 = COPY [[UV22]](s32)
276 ; GFX900-NEXT: $vgpr23 = COPY [[UV23]](s32)
277 ; GFX900-NEXT: $vgpr24 = COPY [[UV24]](s32)
278 ; GFX900-NEXT: $vgpr25 = COPY [[UV25]](s32)
279 ; GFX900-NEXT: $vgpr26 = COPY [[UV26]](s32)
280 ; GFX900-NEXT: $vgpr27 = COPY [[UV27]](s32)
281 ; GFX900-NEXT: $vgpr28 = COPY [[UV28]](s32)
282 ; GFX900-NEXT: $vgpr29 = COPY [[UV29]](s32)
283 ; GFX900-NEXT: $vgpr30 = COPY [[UV30]](s32)
284 ; GFX900-NEXT: [[COPY20:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
285 ; GFX900-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY20]](<4 x s32>)
286 ; GFX900-NEXT: $sgpr4_sgpr5 = COPY [[COPY10]](p4)
287 ; GFX900-NEXT: $sgpr6_sgpr7 = COPY [[COPY11]](p4)
288 ; GFX900-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
289 ; GFX900-NEXT: $sgpr10_sgpr11 = COPY [[COPY13]](s64)
290 ; GFX900-NEXT: $sgpr12 = COPY [[COPY14]](s32)
291 ; GFX900-NEXT: $sgpr13 = COPY [[COPY15]](s32)
292 ; GFX900-NEXT: $sgpr14 = COPY [[COPY16]](s32)
293 ; GFX900-NEXT: $sgpr15 = COPY [[DEF]](s32)
294 ; GFX900-NEXT: $vgpr31 = COPY [[OR1]](s32)
295 ; GFX900-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_v32i32, csr_amdgpu, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2, implicit $vgpr3, implicit $vgpr4, implicit $vgpr5, implicit $vgpr6, implicit $vgpr7, implicit $vgpr8, implicit $vgpr9, implicit $vgpr10, implicit $vgpr11, implicit $vgpr12, implicit $vgpr13, implicit $vgpr14, implicit $vgpr15, implicit $vgpr16, implicit $vgpr17, implicit $vgpr18, implicit $vgpr19, implicit $vgpr20, implicit $vgpr21, implicit $vgpr22, implicit $vgpr23, implicit $vgpr24, implicit $vgpr25, implicit $vgpr26, implicit $vgpr27, implicit $vgpr28, implicit $vgpr29, implicit $vgpr30, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
296 ; GFX900-NEXT: ADJCALLSTACKDOWN 0, 4, implicit-def $scc
297 ; GFX900-NEXT: S_ENDPGM 0
299 ; GFX908-LABEL: name: test_call_external_void_func_v32i32
300 ; GFX908: bb.1 (%ir-block.1):
301 ; GFX908-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr0, $vgpr1, $vgpr2, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
302 ; GFX908-NEXT: {{ $}}
303 ; GFX908-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr2
304 ; GFX908-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr1
305 ; GFX908-NEXT: [[COPY2:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
306 ; GFX908-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr16
307 ; GFX908-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr15
308 ; GFX908-NEXT: [[COPY5:%[0-9]+]]:sgpr_32 = COPY $sgpr14
309 ; GFX908-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
310 ; GFX908-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
311 ; GFX908-NEXT: [[COPY8:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
312 ; GFX908-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
313 ; GFX908-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
314 ; GFX908-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<32 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
315 ; GFX908-NEXT: [[INT:%[0-9]+]]:_(p4) = G_INTRINSIC intrinsic(@llvm.amdgcn.kernarg.segment.ptr)
316 ; GFX908-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
317 ; GFX908-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_v32i32
318 ; GFX908-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY8]]
319 ; GFX908-NEXT: [[COPY11:%[0-9]+]]:_(p4) = COPY [[COPY7]]
320 ; GFX908-NEXT: [[COPY12:%[0-9]+]]:_(p4) = COPY [[COPY9]](p4)
321 ; GFX908-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 20
322 ; GFX908-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY12]], [[C1]](s64)
323 ; GFX908-NEXT: [[COPY13:%[0-9]+]]:_(s64) = COPY [[COPY6]]
324 ; GFX908-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY5]]
325 ; GFX908-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY4]]
326 ; GFX908-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY [[COPY3]]
327 ; GFX908-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
328 ; GFX908-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY [[COPY2]](s32)
329 ; GFX908-NEXT: [[COPY18:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
330 ; GFX908-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
331 ; GFX908-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY18]], [[C2]](s32)
332 ; GFX908-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY17]], [[SHL]]
333 ; GFX908-NEXT: [[COPY19:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
334 ; GFX908-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
335 ; GFX908-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY19]], [[C3]](s32)
336 ; GFX908-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[OR]], [[SHL1]]
337 ; GFX908-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32), [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32), [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32), [[UV16:%[0-9]+]]:_(s32), [[UV17:%[0-9]+]]:_(s32), [[UV18:%[0-9]+]]:_(s32), [[UV19:%[0-9]+]]:_(s32), [[UV20:%[0-9]+]]:_(s32), [[UV21:%[0-9]+]]:_(s32), [[UV22:%[0-9]+]]:_(s32), [[UV23:%[0-9]+]]:_(s32), [[UV24:%[0-9]+]]:_(s32), [[UV25:%[0-9]+]]:_(s32), [[UV26:%[0-9]+]]:_(s32), [[UV27:%[0-9]+]]:_(s32), [[UV28:%[0-9]+]]:_(s32), [[UV29:%[0-9]+]]:_(s32), [[UV30:%[0-9]+]]:_(s32), [[UV31:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[BUILD_VECTOR]](<32 x s32>)
338 ; GFX908-NEXT: [[AMDGPU_WAVE_ADDRESS:%[0-9]+]]:_(p5) = G_AMDGPU_WAVE_ADDRESS $sp_reg
339 ; GFX908-NEXT: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
340 ; GFX908-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p5) = G_PTR_ADD [[AMDGPU_WAVE_ADDRESS]], [[C4]](s32)
341 ; GFX908-NEXT: G_STORE [[UV31]](s32), [[PTR_ADD1]](p5) :: (store (s32) into stack, align 16, addrspace 5)
342 ; GFX908-NEXT: $vgpr0 = COPY [[UV]](s32)
343 ; GFX908-NEXT: $vgpr1 = COPY [[UV1]](s32)
344 ; GFX908-NEXT: $vgpr2 = COPY [[UV2]](s32)
345 ; GFX908-NEXT: $vgpr3 = COPY [[UV3]](s32)
346 ; GFX908-NEXT: $vgpr4 = COPY [[UV4]](s32)
347 ; GFX908-NEXT: $vgpr5 = COPY [[UV5]](s32)
348 ; GFX908-NEXT: $vgpr6 = COPY [[UV6]](s32)
349 ; GFX908-NEXT: $vgpr7 = COPY [[UV7]](s32)
350 ; GFX908-NEXT: $vgpr8 = COPY [[UV8]](s32)
351 ; GFX908-NEXT: $vgpr9 = COPY [[UV9]](s32)
352 ; GFX908-NEXT: $vgpr10 = COPY [[UV10]](s32)
353 ; GFX908-NEXT: $vgpr11 = COPY [[UV11]](s32)
354 ; GFX908-NEXT: $vgpr12 = COPY [[UV12]](s32)
355 ; GFX908-NEXT: $vgpr13 = COPY [[UV13]](s32)
356 ; GFX908-NEXT: $vgpr14 = COPY [[UV14]](s32)
357 ; GFX908-NEXT: $vgpr15 = COPY [[UV15]](s32)
358 ; GFX908-NEXT: $vgpr16 = COPY [[UV16]](s32)
359 ; GFX908-NEXT: $vgpr17 = COPY [[UV17]](s32)
360 ; GFX908-NEXT: $vgpr18 = COPY [[UV18]](s32)
361 ; GFX908-NEXT: $vgpr19 = COPY [[UV19]](s32)
362 ; GFX908-NEXT: $vgpr20 = COPY [[UV20]](s32)
363 ; GFX908-NEXT: $vgpr21 = COPY [[UV21]](s32)
364 ; GFX908-NEXT: $vgpr22 = COPY [[UV22]](s32)
365 ; GFX908-NEXT: $vgpr23 = COPY [[UV23]](s32)
366 ; GFX908-NEXT: $vgpr24 = COPY [[UV24]](s32)
367 ; GFX908-NEXT: $vgpr25 = COPY [[UV25]](s32)
368 ; GFX908-NEXT: $vgpr26 = COPY [[UV26]](s32)
369 ; GFX908-NEXT: $vgpr27 = COPY [[UV27]](s32)
370 ; GFX908-NEXT: $vgpr28 = COPY [[UV28]](s32)
371 ; GFX908-NEXT: $vgpr29 = COPY [[UV29]](s32)
372 ; GFX908-NEXT: $vgpr30 = COPY [[UV30]](s32)
373 ; GFX908-NEXT: [[COPY20:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
374 ; GFX908-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY20]](<4 x s32>)
375 ; GFX908-NEXT: $sgpr4_sgpr5 = COPY [[COPY10]](p4)
376 ; GFX908-NEXT: $sgpr6_sgpr7 = COPY [[COPY11]](p4)
377 ; GFX908-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
378 ; GFX908-NEXT: $sgpr10_sgpr11 = COPY [[COPY13]](s64)
379 ; GFX908-NEXT: $sgpr12 = COPY [[COPY14]](s32)
380 ; GFX908-NEXT: $sgpr13 = COPY [[COPY15]](s32)
381 ; GFX908-NEXT: $sgpr14 = COPY [[COPY16]](s32)
382 ; GFX908-NEXT: $sgpr15 = COPY [[DEF]](s32)
383 ; GFX908-NEXT: $vgpr31 = COPY [[OR1]](s32)
384 ; GFX908-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_v32i32, csr_amdgpu, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2, implicit $vgpr3, implicit $vgpr4, implicit $vgpr5, implicit $vgpr6, implicit $vgpr7, implicit $vgpr8, implicit $vgpr9, implicit $vgpr10, implicit $vgpr11, implicit $vgpr12, implicit $vgpr13, implicit $vgpr14, implicit $vgpr15, implicit $vgpr16, implicit $vgpr17, implicit $vgpr18, implicit $vgpr19, implicit $vgpr20, implicit $vgpr21, implicit $vgpr22, implicit $vgpr23, implicit $vgpr24, implicit $vgpr25, implicit $vgpr26, implicit $vgpr27, implicit $vgpr28, implicit $vgpr29, implicit $vgpr30, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
385 ; GFX908-NEXT: ADJCALLSTACKDOWN 0, 4, implicit-def $scc
386 ; GFX908-NEXT: S_ENDPGM 0
387 call void @external_void_func_v32i32(<32 x i32> zeroinitializer)
391 define void @test_func_call_external_void_func_v32i32([17 x i8]) #0 {
392 ; GFX900-LABEL: name: test_func_call_external_void_func_v32i32
393 ; GFX900: bb.1 (%ir-block.1):
394 ; GFX900-NEXT: liveins: $sgpr12, $sgpr13, $sgpr14, $sgpr15, $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4, $vgpr5, $vgpr6, $vgpr7, $vgpr8, $vgpr9, $vgpr10, $vgpr11, $vgpr12, $vgpr13, $vgpr14, $vgpr15, $vgpr16, $vgpr31, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
395 ; GFX900-NEXT: {{ $}}
396 ; GFX900-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr31
397 ; GFX900-NEXT: [[COPY1:%[0-9]+]]:sgpr_32 = COPY $sgpr15
398 ; GFX900-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr14
399 ; GFX900-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr13
400 ; GFX900-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr12
401 ; GFX900-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
402 ; GFX900-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr8_sgpr9
403 ; GFX900-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
404 ; GFX900-NEXT: [[COPY8:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
405 ; GFX900-NEXT: [[COPY9:%[0-9]+]]:_(s32) = COPY $vgpr0
406 ; GFX900-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY9]](s32)
407 ; GFX900-NEXT: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC]](s16)
408 ; GFX900-NEXT: [[COPY10:%[0-9]+]]:_(s32) = COPY $vgpr1
409 ; GFX900-NEXT: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[COPY10]](s32)
410 ; GFX900-NEXT: [[TRUNC3:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC2]](s16)
411 ; GFX900-NEXT: [[COPY11:%[0-9]+]]:_(s32) = COPY $vgpr2
412 ; GFX900-NEXT: [[TRUNC4:%[0-9]+]]:_(s16) = G_TRUNC [[COPY11]](s32)
413 ; GFX900-NEXT: [[TRUNC5:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC4]](s16)
414 ; GFX900-NEXT: [[COPY12:%[0-9]+]]:_(s32) = COPY $vgpr3
415 ; GFX900-NEXT: [[TRUNC6:%[0-9]+]]:_(s16) = G_TRUNC [[COPY12]](s32)
416 ; GFX900-NEXT: [[TRUNC7:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC6]](s16)
417 ; GFX900-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY $vgpr4
418 ; GFX900-NEXT: [[TRUNC8:%[0-9]+]]:_(s16) = G_TRUNC [[COPY13]](s32)
419 ; GFX900-NEXT: [[TRUNC9:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC8]](s16)
420 ; GFX900-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY $vgpr5
421 ; GFX900-NEXT: [[TRUNC10:%[0-9]+]]:_(s16) = G_TRUNC [[COPY14]](s32)
422 ; GFX900-NEXT: [[TRUNC11:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC10]](s16)
423 ; GFX900-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY $vgpr6
424 ; GFX900-NEXT: [[TRUNC12:%[0-9]+]]:_(s16) = G_TRUNC [[COPY15]](s32)
425 ; GFX900-NEXT: [[TRUNC13:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC12]](s16)
426 ; GFX900-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY $vgpr7
427 ; GFX900-NEXT: [[TRUNC14:%[0-9]+]]:_(s16) = G_TRUNC [[COPY16]](s32)
428 ; GFX900-NEXT: [[TRUNC15:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC14]](s16)
429 ; GFX900-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY $vgpr8
430 ; GFX900-NEXT: [[TRUNC16:%[0-9]+]]:_(s16) = G_TRUNC [[COPY17]](s32)
431 ; GFX900-NEXT: [[TRUNC17:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC16]](s16)
432 ; GFX900-NEXT: [[COPY18:%[0-9]+]]:_(s32) = COPY $vgpr9
433 ; GFX900-NEXT: [[TRUNC18:%[0-9]+]]:_(s16) = G_TRUNC [[COPY18]](s32)
434 ; GFX900-NEXT: [[TRUNC19:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC18]](s16)
435 ; GFX900-NEXT: [[COPY19:%[0-9]+]]:_(s32) = COPY $vgpr10
436 ; GFX900-NEXT: [[TRUNC20:%[0-9]+]]:_(s16) = G_TRUNC [[COPY19]](s32)
437 ; GFX900-NEXT: [[TRUNC21:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC20]](s16)
438 ; GFX900-NEXT: [[COPY20:%[0-9]+]]:_(s32) = COPY $vgpr11
439 ; GFX900-NEXT: [[TRUNC22:%[0-9]+]]:_(s16) = G_TRUNC [[COPY20]](s32)
440 ; GFX900-NEXT: [[TRUNC23:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC22]](s16)
441 ; GFX900-NEXT: [[COPY21:%[0-9]+]]:_(s32) = COPY $vgpr12
442 ; GFX900-NEXT: [[TRUNC24:%[0-9]+]]:_(s16) = G_TRUNC [[COPY21]](s32)
443 ; GFX900-NEXT: [[TRUNC25:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC24]](s16)
444 ; GFX900-NEXT: [[COPY22:%[0-9]+]]:_(s32) = COPY $vgpr13
445 ; GFX900-NEXT: [[TRUNC26:%[0-9]+]]:_(s16) = G_TRUNC [[COPY22]](s32)
446 ; GFX900-NEXT: [[TRUNC27:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC26]](s16)
447 ; GFX900-NEXT: [[COPY23:%[0-9]+]]:_(s32) = COPY $vgpr14
448 ; GFX900-NEXT: [[TRUNC28:%[0-9]+]]:_(s16) = G_TRUNC [[COPY23]](s32)
449 ; GFX900-NEXT: [[TRUNC29:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC28]](s16)
450 ; GFX900-NEXT: [[COPY24:%[0-9]+]]:_(s32) = COPY $vgpr15
451 ; GFX900-NEXT: [[TRUNC30:%[0-9]+]]:_(s16) = G_TRUNC [[COPY24]](s32)
452 ; GFX900-NEXT: [[TRUNC31:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC30]](s16)
453 ; GFX900-NEXT: [[COPY25:%[0-9]+]]:_(s32) = COPY $vgpr16
454 ; GFX900-NEXT: [[TRUNC32:%[0-9]+]]:_(s16) = G_TRUNC [[COPY25]](s32)
455 ; GFX900-NEXT: [[TRUNC33:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC32]](s16)
456 ; GFX900-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
457 ; GFX900-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<32 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
458 ; GFX900-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
459 ; GFX900-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_v32i32
460 ; GFX900-NEXT: [[COPY26:%[0-9]+]]:_(p4) = COPY [[COPY8]]
461 ; GFX900-NEXT: [[COPY27:%[0-9]+]]:_(p4) = COPY [[COPY7]]
462 ; GFX900-NEXT: [[COPY28:%[0-9]+]]:_(p4) = COPY [[COPY6]]
463 ; GFX900-NEXT: [[COPY29:%[0-9]+]]:_(s64) = COPY [[COPY5]]
464 ; GFX900-NEXT: [[COPY30:%[0-9]+]]:_(s32) = COPY [[COPY4]]
465 ; GFX900-NEXT: [[COPY31:%[0-9]+]]:_(s32) = COPY [[COPY3]]
466 ; GFX900-NEXT: [[COPY32:%[0-9]+]]:_(s32) = COPY [[COPY2]]
467 ; GFX900-NEXT: [[COPY33:%[0-9]+]]:_(s32) = COPY [[COPY1]]
468 ; GFX900-NEXT: [[COPY34:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
469 ; GFX900-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32), [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32), [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32), [[UV16:%[0-9]+]]:_(s32), [[UV17:%[0-9]+]]:_(s32), [[UV18:%[0-9]+]]:_(s32), [[UV19:%[0-9]+]]:_(s32), [[UV20:%[0-9]+]]:_(s32), [[UV21:%[0-9]+]]:_(s32), [[UV22:%[0-9]+]]:_(s32), [[UV23:%[0-9]+]]:_(s32), [[UV24:%[0-9]+]]:_(s32), [[UV25:%[0-9]+]]:_(s32), [[UV26:%[0-9]+]]:_(s32), [[UV27:%[0-9]+]]:_(s32), [[UV28:%[0-9]+]]:_(s32), [[UV29:%[0-9]+]]:_(s32), [[UV30:%[0-9]+]]:_(s32), [[UV31:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[BUILD_VECTOR]](<32 x s32>)
470 ; GFX900-NEXT: [[AMDGPU_WAVE_ADDRESS:%[0-9]+]]:_(p5) = G_AMDGPU_WAVE_ADDRESS $sgpr32
471 ; GFX900-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
472 ; GFX900-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[AMDGPU_WAVE_ADDRESS]], [[C1]](s32)
473 ; GFX900-NEXT: G_STORE [[UV31]](s32), [[PTR_ADD]](p5) :: (store (s32) into stack, align 16, addrspace 5)
474 ; GFX900-NEXT: $vgpr0 = COPY [[UV]](s32)
475 ; GFX900-NEXT: $vgpr1 = COPY [[UV1]](s32)
476 ; GFX900-NEXT: $vgpr2 = COPY [[UV2]](s32)
477 ; GFX900-NEXT: $vgpr3 = COPY [[UV3]](s32)
478 ; GFX900-NEXT: $vgpr4 = COPY [[UV4]](s32)
479 ; GFX900-NEXT: $vgpr5 = COPY [[UV5]](s32)
480 ; GFX900-NEXT: $vgpr6 = COPY [[UV6]](s32)
481 ; GFX900-NEXT: $vgpr7 = COPY [[UV7]](s32)
482 ; GFX900-NEXT: $vgpr8 = COPY [[UV8]](s32)
483 ; GFX900-NEXT: $vgpr9 = COPY [[UV9]](s32)
484 ; GFX900-NEXT: $vgpr10 = COPY [[UV10]](s32)
485 ; GFX900-NEXT: $vgpr11 = COPY [[UV11]](s32)
486 ; GFX900-NEXT: $vgpr12 = COPY [[UV12]](s32)
487 ; GFX900-NEXT: $vgpr13 = COPY [[UV13]](s32)
488 ; GFX900-NEXT: $vgpr14 = COPY [[UV14]](s32)
489 ; GFX900-NEXT: $vgpr15 = COPY [[UV15]](s32)
490 ; GFX900-NEXT: $vgpr16 = COPY [[UV16]](s32)
491 ; GFX900-NEXT: $vgpr17 = COPY [[UV17]](s32)
492 ; GFX900-NEXT: $vgpr18 = COPY [[UV18]](s32)
493 ; GFX900-NEXT: $vgpr19 = COPY [[UV19]](s32)
494 ; GFX900-NEXT: $vgpr20 = COPY [[UV20]](s32)
495 ; GFX900-NEXT: $vgpr21 = COPY [[UV21]](s32)
496 ; GFX900-NEXT: $vgpr22 = COPY [[UV22]](s32)
497 ; GFX900-NEXT: $vgpr23 = COPY [[UV23]](s32)
498 ; GFX900-NEXT: $vgpr24 = COPY [[UV24]](s32)
499 ; GFX900-NEXT: $vgpr25 = COPY [[UV25]](s32)
500 ; GFX900-NEXT: $vgpr26 = COPY [[UV26]](s32)
501 ; GFX900-NEXT: $vgpr27 = COPY [[UV27]](s32)
502 ; GFX900-NEXT: $vgpr28 = COPY [[UV28]](s32)
503 ; GFX900-NEXT: $vgpr29 = COPY [[UV29]](s32)
504 ; GFX900-NEXT: $vgpr30 = COPY [[UV30]](s32)
505 ; GFX900-NEXT: [[COPY35:%[0-9]+]]:_(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
506 ; GFX900-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY35]](<4 x s32>)
507 ; GFX900-NEXT: $sgpr4_sgpr5 = COPY [[COPY26]](p4)
508 ; GFX900-NEXT: $sgpr6_sgpr7 = COPY [[COPY27]](p4)
509 ; GFX900-NEXT: $sgpr8_sgpr9 = COPY [[COPY28]](p4)
510 ; GFX900-NEXT: $sgpr10_sgpr11 = COPY [[COPY29]](s64)
511 ; GFX900-NEXT: $sgpr12 = COPY [[COPY30]](s32)
512 ; GFX900-NEXT: $sgpr13 = COPY [[COPY31]](s32)
513 ; GFX900-NEXT: $sgpr14 = COPY [[COPY32]](s32)
514 ; GFX900-NEXT: $sgpr15 = COPY [[COPY33]](s32)
515 ; GFX900-NEXT: $vgpr31 = COPY [[COPY34]](s32)
516 ; GFX900-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_v32i32, csr_amdgpu, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2, implicit $vgpr3, implicit $vgpr4, implicit $vgpr5, implicit $vgpr6, implicit $vgpr7, implicit $vgpr8, implicit $vgpr9, implicit $vgpr10, implicit $vgpr11, implicit $vgpr12, implicit $vgpr13, implicit $vgpr14, implicit $vgpr15, implicit $vgpr16, implicit $vgpr17, implicit $vgpr18, implicit $vgpr19, implicit $vgpr20, implicit $vgpr21, implicit $vgpr22, implicit $vgpr23, implicit $vgpr24, implicit $vgpr25, implicit $vgpr26, implicit $vgpr27, implicit $vgpr28, implicit $vgpr29, implicit $vgpr30, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
517 ; GFX900-NEXT: ADJCALLSTACKDOWN 0, 4, implicit-def $scc
518 ; GFX900-NEXT: SI_RETURN
520 ; GFX908-LABEL: name: test_func_call_external_void_func_v32i32
521 ; GFX908: bb.1 (%ir-block.1):
522 ; GFX908-NEXT: liveins: $sgpr12, $sgpr13, $sgpr14, $sgpr15, $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4, $vgpr5, $vgpr6, $vgpr7, $vgpr8, $vgpr9, $vgpr10, $vgpr11, $vgpr12, $vgpr13, $vgpr14, $vgpr15, $vgpr16, $vgpr31, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
523 ; GFX908-NEXT: {{ $}}
524 ; GFX908-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr31
525 ; GFX908-NEXT: [[COPY1:%[0-9]+]]:sgpr_32 = COPY $sgpr15
526 ; GFX908-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr14
527 ; GFX908-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr13
528 ; GFX908-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr12
529 ; GFX908-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
530 ; GFX908-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr8_sgpr9
531 ; GFX908-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
532 ; GFX908-NEXT: [[COPY8:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
533 ; GFX908-NEXT: [[COPY9:%[0-9]+]]:_(s32) = COPY $vgpr0
534 ; GFX908-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY9]](s32)
535 ; GFX908-NEXT: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC]](s16)
536 ; GFX908-NEXT: [[COPY10:%[0-9]+]]:_(s32) = COPY $vgpr1
537 ; GFX908-NEXT: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[COPY10]](s32)
538 ; GFX908-NEXT: [[TRUNC3:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC2]](s16)
539 ; GFX908-NEXT: [[COPY11:%[0-9]+]]:_(s32) = COPY $vgpr2
540 ; GFX908-NEXT: [[TRUNC4:%[0-9]+]]:_(s16) = G_TRUNC [[COPY11]](s32)
541 ; GFX908-NEXT: [[TRUNC5:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC4]](s16)
542 ; GFX908-NEXT: [[COPY12:%[0-9]+]]:_(s32) = COPY $vgpr3
543 ; GFX908-NEXT: [[TRUNC6:%[0-9]+]]:_(s16) = G_TRUNC [[COPY12]](s32)
544 ; GFX908-NEXT: [[TRUNC7:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC6]](s16)
545 ; GFX908-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY $vgpr4
546 ; GFX908-NEXT: [[TRUNC8:%[0-9]+]]:_(s16) = G_TRUNC [[COPY13]](s32)
547 ; GFX908-NEXT: [[TRUNC9:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC8]](s16)
548 ; GFX908-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY $vgpr5
549 ; GFX908-NEXT: [[TRUNC10:%[0-9]+]]:_(s16) = G_TRUNC [[COPY14]](s32)
550 ; GFX908-NEXT: [[TRUNC11:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC10]](s16)
551 ; GFX908-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY $vgpr6
552 ; GFX908-NEXT: [[TRUNC12:%[0-9]+]]:_(s16) = G_TRUNC [[COPY15]](s32)
553 ; GFX908-NEXT: [[TRUNC13:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC12]](s16)
554 ; GFX908-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY $vgpr7
555 ; GFX908-NEXT: [[TRUNC14:%[0-9]+]]:_(s16) = G_TRUNC [[COPY16]](s32)
556 ; GFX908-NEXT: [[TRUNC15:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC14]](s16)
557 ; GFX908-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY $vgpr8
558 ; GFX908-NEXT: [[TRUNC16:%[0-9]+]]:_(s16) = G_TRUNC [[COPY17]](s32)
559 ; GFX908-NEXT: [[TRUNC17:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC16]](s16)
560 ; GFX908-NEXT: [[COPY18:%[0-9]+]]:_(s32) = COPY $vgpr9
561 ; GFX908-NEXT: [[TRUNC18:%[0-9]+]]:_(s16) = G_TRUNC [[COPY18]](s32)
562 ; GFX908-NEXT: [[TRUNC19:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC18]](s16)
563 ; GFX908-NEXT: [[COPY19:%[0-9]+]]:_(s32) = COPY $vgpr10
564 ; GFX908-NEXT: [[TRUNC20:%[0-9]+]]:_(s16) = G_TRUNC [[COPY19]](s32)
565 ; GFX908-NEXT: [[TRUNC21:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC20]](s16)
566 ; GFX908-NEXT: [[COPY20:%[0-9]+]]:_(s32) = COPY $vgpr11
567 ; GFX908-NEXT: [[TRUNC22:%[0-9]+]]:_(s16) = G_TRUNC [[COPY20]](s32)
568 ; GFX908-NEXT: [[TRUNC23:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC22]](s16)
569 ; GFX908-NEXT: [[COPY21:%[0-9]+]]:_(s32) = COPY $vgpr12
570 ; GFX908-NEXT: [[TRUNC24:%[0-9]+]]:_(s16) = G_TRUNC [[COPY21]](s32)
571 ; GFX908-NEXT: [[TRUNC25:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC24]](s16)
572 ; GFX908-NEXT: [[COPY22:%[0-9]+]]:_(s32) = COPY $vgpr13
573 ; GFX908-NEXT: [[TRUNC26:%[0-9]+]]:_(s16) = G_TRUNC [[COPY22]](s32)
574 ; GFX908-NEXT: [[TRUNC27:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC26]](s16)
575 ; GFX908-NEXT: [[COPY23:%[0-9]+]]:_(s32) = COPY $vgpr14
576 ; GFX908-NEXT: [[TRUNC28:%[0-9]+]]:_(s16) = G_TRUNC [[COPY23]](s32)
577 ; GFX908-NEXT: [[TRUNC29:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC28]](s16)
578 ; GFX908-NEXT: [[COPY24:%[0-9]+]]:_(s32) = COPY $vgpr15
579 ; GFX908-NEXT: [[TRUNC30:%[0-9]+]]:_(s16) = G_TRUNC [[COPY24]](s32)
580 ; GFX908-NEXT: [[TRUNC31:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC30]](s16)
581 ; GFX908-NEXT: [[COPY25:%[0-9]+]]:_(s32) = COPY $vgpr16
582 ; GFX908-NEXT: [[TRUNC32:%[0-9]+]]:_(s16) = G_TRUNC [[COPY25]](s32)
583 ; GFX908-NEXT: [[TRUNC33:%[0-9]+]]:_(s8) = G_TRUNC [[TRUNC32]](s16)
584 ; GFX908-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
585 ; GFX908-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<32 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
586 ; GFX908-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
587 ; GFX908-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_v32i32
588 ; GFX908-NEXT: [[COPY26:%[0-9]+]]:_(p4) = COPY [[COPY8]]
589 ; GFX908-NEXT: [[COPY27:%[0-9]+]]:_(p4) = COPY [[COPY7]]
590 ; GFX908-NEXT: [[COPY28:%[0-9]+]]:_(p4) = COPY [[COPY6]]
591 ; GFX908-NEXT: [[COPY29:%[0-9]+]]:_(s64) = COPY [[COPY5]]
592 ; GFX908-NEXT: [[COPY30:%[0-9]+]]:_(s32) = COPY [[COPY4]]
593 ; GFX908-NEXT: [[COPY31:%[0-9]+]]:_(s32) = COPY [[COPY3]]
594 ; GFX908-NEXT: [[COPY32:%[0-9]+]]:_(s32) = COPY [[COPY2]]
595 ; GFX908-NEXT: [[COPY33:%[0-9]+]]:_(s32) = COPY [[COPY1]]
596 ; GFX908-NEXT: [[COPY34:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
597 ; GFX908-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32), [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32), [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32), [[UV16:%[0-9]+]]:_(s32), [[UV17:%[0-9]+]]:_(s32), [[UV18:%[0-9]+]]:_(s32), [[UV19:%[0-9]+]]:_(s32), [[UV20:%[0-9]+]]:_(s32), [[UV21:%[0-9]+]]:_(s32), [[UV22:%[0-9]+]]:_(s32), [[UV23:%[0-9]+]]:_(s32), [[UV24:%[0-9]+]]:_(s32), [[UV25:%[0-9]+]]:_(s32), [[UV26:%[0-9]+]]:_(s32), [[UV27:%[0-9]+]]:_(s32), [[UV28:%[0-9]+]]:_(s32), [[UV29:%[0-9]+]]:_(s32), [[UV30:%[0-9]+]]:_(s32), [[UV31:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[BUILD_VECTOR]](<32 x s32>)
598 ; GFX908-NEXT: [[AMDGPU_WAVE_ADDRESS:%[0-9]+]]:_(p5) = G_AMDGPU_WAVE_ADDRESS $sgpr32
599 ; GFX908-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
600 ; GFX908-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[AMDGPU_WAVE_ADDRESS]], [[C1]](s32)
601 ; GFX908-NEXT: G_STORE [[UV31]](s32), [[PTR_ADD]](p5) :: (store (s32) into stack, align 16, addrspace 5)
602 ; GFX908-NEXT: $vgpr0 = COPY [[UV]](s32)
603 ; GFX908-NEXT: $vgpr1 = COPY [[UV1]](s32)
604 ; GFX908-NEXT: $vgpr2 = COPY [[UV2]](s32)
605 ; GFX908-NEXT: $vgpr3 = COPY [[UV3]](s32)
606 ; GFX908-NEXT: $vgpr4 = COPY [[UV4]](s32)
607 ; GFX908-NEXT: $vgpr5 = COPY [[UV5]](s32)
608 ; GFX908-NEXT: $vgpr6 = COPY [[UV6]](s32)
609 ; GFX908-NEXT: $vgpr7 = COPY [[UV7]](s32)
610 ; GFX908-NEXT: $vgpr8 = COPY [[UV8]](s32)
611 ; GFX908-NEXT: $vgpr9 = COPY [[UV9]](s32)
612 ; GFX908-NEXT: $vgpr10 = COPY [[UV10]](s32)
613 ; GFX908-NEXT: $vgpr11 = COPY [[UV11]](s32)
614 ; GFX908-NEXT: $vgpr12 = COPY [[UV12]](s32)
615 ; GFX908-NEXT: $vgpr13 = COPY [[UV13]](s32)
616 ; GFX908-NEXT: $vgpr14 = COPY [[UV14]](s32)
617 ; GFX908-NEXT: $vgpr15 = COPY [[UV15]](s32)
618 ; GFX908-NEXT: $vgpr16 = COPY [[UV16]](s32)
619 ; GFX908-NEXT: $vgpr17 = COPY [[UV17]](s32)
620 ; GFX908-NEXT: $vgpr18 = COPY [[UV18]](s32)
621 ; GFX908-NEXT: $vgpr19 = COPY [[UV19]](s32)
622 ; GFX908-NEXT: $vgpr20 = COPY [[UV20]](s32)
623 ; GFX908-NEXT: $vgpr21 = COPY [[UV21]](s32)
624 ; GFX908-NEXT: $vgpr22 = COPY [[UV22]](s32)
625 ; GFX908-NEXT: $vgpr23 = COPY [[UV23]](s32)
626 ; GFX908-NEXT: $vgpr24 = COPY [[UV24]](s32)
627 ; GFX908-NEXT: $vgpr25 = COPY [[UV25]](s32)
628 ; GFX908-NEXT: $vgpr26 = COPY [[UV26]](s32)
629 ; GFX908-NEXT: $vgpr27 = COPY [[UV27]](s32)
630 ; GFX908-NEXT: $vgpr28 = COPY [[UV28]](s32)
631 ; GFX908-NEXT: $vgpr29 = COPY [[UV29]](s32)
632 ; GFX908-NEXT: $vgpr30 = COPY [[UV30]](s32)
633 ; GFX908-NEXT: [[COPY35:%[0-9]+]]:_(<4 x s32>) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
634 ; GFX908-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY35]](<4 x s32>)
635 ; GFX908-NEXT: $sgpr4_sgpr5 = COPY [[COPY26]](p4)
636 ; GFX908-NEXT: $sgpr6_sgpr7 = COPY [[COPY27]](p4)
637 ; GFX908-NEXT: $sgpr8_sgpr9 = COPY [[COPY28]](p4)
638 ; GFX908-NEXT: $sgpr10_sgpr11 = COPY [[COPY29]](s64)
639 ; GFX908-NEXT: $sgpr12 = COPY [[COPY30]](s32)
640 ; GFX908-NEXT: $sgpr13 = COPY [[COPY31]](s32)
641 ; GFX908-NEXT: $sgpr14 = COPY [[COPY32]](s32)
642 ; GFX908-NEXT: $sgpr15 = COPY [[COPY33]](s32)
643 ; GFX908-NEXT: $vgpr31 = COPY [[COPY34]](s32)
644 ; GFX908-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_v32i32, csr_amdgpu, implicit $vgpr0, implicit $vgpr1, implicit $vgpr2, implicit $vgpr3, implicit $vgpr4, implicit $vgpr5, implicit $vgpr6, implicit $vgpr7, implicit $vgpr8, implicit $vgpr9, implicit $vgpr10, implicit $vgpr11, implicit $vgpr12, implicit $vgpr13, implicit $vgpr14, implicit $vgpr15, implicit $vgpr16, implicit $vgpr17, implicit $vgpr18, implicit $vgpr19, implicit $vgpr20, implicit $vgpr21, implicit $vgpr22, implicit $vgpr23, implicit $vgpr24, implicit $vgpr25, implicit $vgpr26, implicit $vgpr27, implicit $vgpr28, implicit $vgpr29, implicit $vgpr30, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
645 ; GFX908-NEXT: ADJCALLSTACKDOWN 0, 4, implicit-def $scc
646 ; GFX908-NEXT: SI_RETURN
647 call void @external_void_func_v32i32(<32 x i32> zeroinitializer)
651 define amdgpu_kernel void @test_only_workitem_id_x() #0 !reqd_work_group_size !0 {
652 ; GFX900-LABEL: name: test_only_workitem_id_x
653 ; GFX900: bb.1 (%ir-block.0):
654 ; GFX900-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr0, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
655 ; GFX900-NEXT: {{ $}}
656 ; GFX900-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
657 ; GFX900-NEXT: [[COPY1:%[0-9]+]]:sgpr_32 = COPY $sgpr16
658 ; GFX900-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr15
659 ; GFX900-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr14
660 ; GFX900-NEXT: [[COPY4:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
661 ; GFX900-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
662 ; GFX900-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
663 ; GFX900-NEXT: [[COPY7:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
664 ; GFX900-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
665 ; GFX900-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
666 ; GFX900-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
667 ; GFX900-NEXT: [[COPY8:%[0-9]+]]:_(p4) = COPY [[COPY6]]
668 ; GFX900-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY5]]
669 ; GFX900-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY7]](p4)
670 ; GFX900-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
671 ; GFX900-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY10]], [[C1]](s64)
672 ; GFX900-NEXT: [[COPY11:%[0-9]+]]:_(s64) = COPY [[COPY4]]
673 ; GFX900-NEXT: [[COPY12:%[0-9]+]]:_(s32) = COPY [[COPY3]]
674 ; GFX900-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY2]]
675 ; GFX900-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY1]]
676 ; GFX900-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
677 ; GFX900-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
678 ; GFX900-NEXT: $vgpr0 = COPY [[C]](s32)
679 ; GFX900-NEXT: [[COPY16:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
680 ; GFX900-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY16]](<4 x s32>)
681 ; GFX900-NEXT: $sgpr4_sgpr5 = COPY [[COPY8]](p4)
682 ; GFX900-NEXT: $sgpr6_sgpr7 = COPY [[COPY9]](p4)
683 ; GFX900-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
684 ; GFX900-NEXT: $sgpr10_sgpr11 = COPY [[COPY11]](s64)
685 ; GFX900-NEXT: $sgpr12 = COPY [[COPY12]](s32)
686 ; GFX900-NEXT: $sgpr13 = COPY [[COPY13]](s32)
687 ; GFX900-NEXT: $sgpr14 = COPY [[COPY14]](s32)
688 ; GFX900-NEXT: $sgpr15 = COPY [[DEF]](s32)
689 ; GFX900-NEXT: $vgpr31 = COPY [[COPY15]](s32)
690 ; GFX900-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
691 ; GFX900-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
692 ; GFX900-NEXT: S_ENDPGM 0
694 ; GFX908-LABEL: name: test_only_workitem_id_x
695 ; GFX908: bb.1 (%ir-block.0):
696 ; GFX908-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr0, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
697 ; GFX908-NEXT: {{ $}}
698 ; GFX908-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
699 ; GFX908-NEXT: [[COPY1:%[0-9]+]]:sgpr_32 = COPY $sgpr16
700 ; GFX908-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr15
701 ; GFX908-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr14
702 ; GFX908-NEXT: [[COPY4:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
703 ; GFX908-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
704 ; GFX908-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
705 ; GFX908-NEXT: [[COPY7:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
706 ; GFX908-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
707 ; GFX908-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
708 ; GFX908-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
709 ; GFX908-NEXT: [[COPY8:%[0-9]+]]:_(p4) = COPY [[COPY6]]
710 ; GFX908-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY5]]
711 ; GFX908-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY7]](p4)
712 ; GFX908-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
713 ; GFX908-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY10]], [[C1]](s64)
714 ; GFX908-NEXT: [[COPY11:%[0-9]+]]:_(s64) = COPY [[COPY4]]
715 ; GFX908-NEXT: [[COPY12:%[0-9]+]]:_(s32) = COPY [[COPY3]]
716 ; GFX908-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY2]]
717 ; GFX908-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY1]]
718 ; GFX908-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
719 ; GFX908-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
720 ; GFX908-NEXT: $vgpr0 = COPY [[C]](s32)
721 ; GFX908-NEXT: [[COPY16:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
722 ; GFX908-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY16]](<4 x s32>)
723 ; GFX908-NEXT: $sgpr4_sgpr5 = COPY [[COPY8]](p4)
724 ; GFX908-NEXT: $sgpr6_sgpr7 = COPY [[COPY9]](p4)
725 ; GFX908-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
726 ; GFX908-NEXT: $sgpr10_sgpr11 = COPY [[COPY11]](s64)
727 ; GFX908-NEXT: $sgpr12 = COPY [[COPY12]](s32)
728 ; GFX908-NEXT: $sgpr13 = COPY [[COPY13]](s32)
729 ; GFX908-NEXT: $sgpr14 = COPY [[COPY14]](s32)
730 ; GFX908-NEXT: $sgpr15 = COPY [[DEF]](s32)
731 ; GFX908-NEXT: $vgpr31 = COPY [[COPY15]](s32)
732 ; GFX908-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
733 ; GFX908-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
734 ; GFX908-NEXT: S_ENDPGM 0
735 call void @external_void_func_i32(i32 42)
739 define amdgpu_kernel void @test_only_workitem_id_y() #0 !reqd_work_group_size !1 {
740 ; GFX900-LABEL: name: test_only_workitem_id_y
741 ; GFX900: bb.1 (%ir-block.0):
742 ; GFX900-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr1, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
743 ; GFX900-NEXT: {{ $}}
744 ; GFX900-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr1
745 ; GFX900-NEXT: [[COPY1:%[0-9]+]]:sgpr_32 = COPY $sgpr16
746 ; GFX900-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr15
747 ; GFX900-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr14
748 ; GFX900-NEXT: [[COPY4:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
749 ; GFX900-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
750 ; GFX900-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
751 ; GFX900-NEXT: [[COPY7:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
752 ; GFX900-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
753 ; GFX900-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
754 ; GFX900-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
755 ; GFX900-NEXT: [[COPY8:%[0-9]+]]:_(p4) = COPY [[COPY6]]
756 ; GFX900-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY5]]
757 ; GFX900-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY7]](p4)
758 ; GFX900-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
759 ; GFX900-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY10]], [[C1]](s64)
760 ; GFX900-NEXT: [[COPY11:%[0-9]+]]:_(s64) = COPY [[COPY4]]
761 ; GFX900-NEXT: [[COPY12:%[0-9]+]]:_(s32) = COPY [[COPY3]]
762 ; GFX900-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY2]]
763 ; GFX900-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY1]]
764 ; GFX900-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
765 ; GFX900-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
766 ; GFX900-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
767 ; GFX900-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
768 ; GFX900-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY15]], [[C3]](s32)
769 ; GFX900-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[C2]], [[SHL]]
770 ; GFX900-NEXT: $vgpr0 = COPY [[C]](s32)
771 ; GFX900-NEXT: [[COPY16:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
772 ; GFX900-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY16]](<4 x s32>)
773 ; GFX900-NEXT: $sgpr4_sgpr5 = COPY [[COPY8]](p4)
774 ; GFX900-NEXT: $sgpr6_sgpr7 = COPY [[COPY9]](p4)
775 ; GFX900-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
776 ; GFX900-NEXT: $sgpr10_sgpr11 = COPY [[COPY11]](s64)
777 ; GFX900-NEXT: $sgpr12 = COPY [[COPY12]](s32)
778 ; GFX900-NEXT: $sgpr13 = COPY [[COPY13]](s32)
779 ; GFX900-NEXT: $sgpr14 = COPY [[COPY14]](s32)
780 ; GFX900-NEXT: $sgpr15 = COPY [[DEF]](s32)
781 ; GFX900-NEXT: $vgpr31 = COPY [[OR]](s32)
782 ; GFX900-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
783 ; GFX900-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
784 ; GFX900-NEXT: S_ENDPGM 0
786 ; GFX908-LABEL: name: test_only_workitem_id_y
787 ; GFX908: bb.1 (%ir-block.0):
788 ; GFX908-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr1, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
789 ; GFX908-NEXT: {{ $}}
790 ; GFX908-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr1
791 ; GFX908-NEXT: [[COPY1:%[0-9]+]]:sgpr_32 = COPY $sgpr16
792 ; GFX908-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr15
793 ; GFX908-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr14
794 ; GFX908-NEXT: [[COPY4:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
795 ; GFX908-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
796 ; GFX908-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
797 ; GFX908-NEXT: [[COPY7:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
798 ; GFX908-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
799 ; GFX908-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
800 ; GFX908-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
801 ; GFX908-NEXT: [[COPY8:%[0-9]+]]:_(p4) = COPY [[COPY6]]
802 ; GFX908-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY5]]
803 ; GFX908-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY7]](p4)
804 ; GFX908-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
805 ; GFX908-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY10]], [[C1]](s64)
806 ; GFX908-NEXT: [[COPY11:%[0-9]+]]:_(s64) = COPY [[COPY4]]
807 ; GFX908-NEXT: [[COPY12:%[0-9]+]]:_(s32) = COPY [[COPY3]]
808 ; GFX908-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY2]]
809 ; GFX908-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY1]]
810 ; GFX908-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
811 ; GFX908-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
812 ; GFX908-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
813 ; GFX908-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
814 ; GFX908-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY15]], [[C3]](s32)
815 ; GFX908-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[C2]], [[SHL]]
816 ; GFX908-NEXT: $vgpr0 = COPY [[C]](s32)
817 ; GFX908-NEXT: [[COPY16:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
818 ; GFX908-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY16]](<4 x s32>)
819 ; GFX908-NEXT: $sgpr4_sgpr5 = COPY [[COPY8]](p4)
820 ; GFX908-NEXT: $sgpr6_sgpr7 = COPY [[COPY9]](p4)
821 ; GFX908-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
822 ; GFX908-NEXT: $sgpr10_sgpr11 = COPY [[COPY11]](s64)
823 ; GFX908-NEXT: $sgpr12 = COPY [[COPY12]](s32)
824 ; GFX908-NEXT: $sgpr13 = COPY [[COPY13]](s32)
825 ; GFX908-NEXT: $sgpr14 = COPY [[COPY14]](s32)
826 ; GFX908-NEXT: $sgpr15 = COPY [[DEF]](s32)
827 ; GFX908-NEXT: $vgpr31 = COPY [[OR]](s32)
828 ; GFX908-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
829 ; GFX908-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
830 ; GFX908-NEXT: S_ENDPGM 0
831 call void @external_void_func_i32(i32 42)
835 define amdgpu_kernel void @test_only_workitem_id_z() #0 !reqd_work_group_size !2 {
836 ; GFX900-LABEL: name: test_only_workitem_id_z
837 ; GFX900: bb.1 (%ir-block.0):
838 ; GFX900-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr2, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
839 ; GFX900-NEXT: {{ $}}
840 ; GFX900-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr2
841 ; GFX900-NEXT: [[COPY1:%[0-9]+]]:sgpr_32 = COPY $sgpr16
842 ; GFX900-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr15
843 ; GFX900-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr14
844 ; GFX900-NEXT: [[COPY4:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
845 ; GFX900-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
846 ; GFX900-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
847 ; GFX900-NEXT: [[COPY7:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
848 ; GFX900-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
849 ; GFX900-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
850 ; GFX900-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
851 ; GFX900-NEXT: [[COPY8:%[0-9]+]]:_(p4) = COPY [[COPY6]]
852 ; GFX900-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY5]]
853 ; GFX900-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY7]](p4)
854 ; GFX900-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
855 ; GFX900-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY10]], [[C1]](s64)
856 ; GFX900-NEXT: [[COPY11:%[0-9]+]]:_(s64) = COPY [[COPY4]]
857 ; GFX900-NEXT: [[COPY12:%[0-9]+]]:_(s32) = COPY [[COPY3]]
858 ; GFX900-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY2]]
859 ; GFX900-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY1]]
860 ; GFX900-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
861 ; GFX900-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
862 ; GFX900-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
863 ; GFX900-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
864 ; GFX900-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY15]], [[C3]](s32)
865 ; GFX900-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[C2]], [[SHL]]
866 ; GFX900-NEXT: $vgpr0 = COPY [[C]](s32)
867 ; GFX900-NEXT: [[COPY16:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
868 ; GFX900-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY16]](<4 x s32>)
869 ; GFX900-NEXT: $sgpr4_sgpr5 = COPY [[COPY8]](p4)
870 ; GFX900-NEXT: $sgpr6_sgpr7 = COPY [[COPY9]](p4)
871 ; GFX900-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
872 ; GFX900-NEXT: $sgpr10_sgpr11 = COPY [[COPY11]](s64)
873 ; GFX900-NEXT: $sgpr12 = COPY [[COPY12]](s32)
874 ; GFX900-NEXT: $sgpr13 = COPY [[COPY13]](s32)
875 ; GFX900-NEXT: $sgpr14 = COPY [[COPY14]](s32)
876 ; GFX900-NEXT: $sgpr15 = COPY [[DEF]](s32)
877 ; GFX900-NEXT: $vgpr31 = COPY [[OR]](s32)
878 ; GFX900-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
879 ; GFX900-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
880 ; GFX900-NEXT: S_ENDPGM 0
882 ; GFX908-LABEL: name: test_only_workitem_id_z
883 ; GFX908: bb.1 (%ir-block.0):
884 ; GFX908-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr2, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
885 ; GFX908-NEXT: {{ $}}
886 ; GFX908-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr2
887 ; GFX908-NEXT: [[COPY1:%[0-9]+]]:sgpr_32 = COPY $sgpr16
888 ; GFX908-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr15
889 ; GFX908-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr14
890 ; GFX908-NEXT: [[COPY4:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
891 ; GFX908-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
892 ; GFX908-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
893 ; GFX908-NEXT: [[COPY7:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
894 ; GFX908-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
895 ; GFX908-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
896 ; GFX908-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
897 ; GFX908-NEXT: [[COPY8:%[0-9]+]]:_(p4) = COPY [[COPY6]]
898 ; GFX908-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY5]]
899 ; GFX908-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY7]](p4)
900 ; GFX908-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
901 ; GFX908-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY10]], [[C1]](s64)
902 ; GFX908-NEXT: [[COPY11:%[0-9]+]]:_(s64) = COPY [[COPY4]]
903 ; GFX908-NEXT: [[COPY12:%[0-9]+]]:_(s32) = COPY [[COPY3]]
904 ; GFX908-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY2]]
905 ; GFX908-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY1]]
906 ; GFX908-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
907 ; GFX908-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
908 ; GFX908-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
909 ; GFX908-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
910 ; GFX908-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY15]], [[C3]](s32)
911 ; GFX908-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[C2]], [[SHL]]
912 ; GFX908-NEXT: $vgpr0 = COPY [[C]](s32)
913 ; GFX908-NEXT: [[COPY16:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
914 ; GFX908-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY16]](<4 x s32>)
915 ; GFX908-NEXT: $sgpr4_sgpr5 = COPY [[COPY8]](p4)
916 ; GFX908-NEXT: $sgpr6_sgpr7 = COPY [[COPY9]](p4)
917 ; GFX908-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
918 ; GFX908-NEXT: $sgpr10_sgpr11 = COPY [[COPY11]](s64)
919 ; GFX908-NEXT: $sgpr12 = COPY [[COPY12]](s32)
920 ; GFX908-NEXT: $sgpr13 = COPY [[COPY13]](s32)
921 ; GFX908-NEXT: $sgpr14 = COPY [[COPY14]](s32)
922 ; GFX908-NEXT: $sgpr15 = COPY [[DEF]](s32)
923 ; GFX908-NEXT: $vgpr31 = COPY [[OR]](s32)
924 ; GFX908-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
925 ; GFX908-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
926 ; GFX908-NEXT: S_ENDPGM 0
927 call void @external_void_func_i32(i32 42)
931 define amdgpu_kernel void @test_only_workitem_id_xy() #0 !reqd_work_group_size !3 {
932 ; GFX900-LABEL: name: test_only_workitem_id_xy
933 ; GFX900: bb.1 (%ir-block.0):
934 ; GFX900-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr0, $vgpr1, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
935 ; GFX900-NEXT: {{ $}}
936 ; GFX900-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr1
937 ; GFX900-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
938 ; GFX900-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr16
939 ; GFX900-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr15
940 ; GFX900-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr14
941 ; GFX900-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
942 ; GFX900-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
943 ; GFX900-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
944 ; GFX900-NEXT: [[COPY8:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
945 ; GFX900-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
946 ; GFX900-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
947 ; GFX900-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
948 ; GFX900-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY7]]
949 ; GFX900-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY6]]
950 ; GFX900-NEXT: [[COPY11:%[0-9]+]]:_(p4) = COPY [[COPY8]](p4)
951 ; GFX900-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
952 ; GFX900-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY11]], [[C1]](s64)
953 ; GFX900-NEXT: [[COPY12:%[0-9]+]]:_(s64) = COPY [[COPY5]]
954 ; GFX900-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY4]]
955 ; GFX900-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY3]]
956 ; GFX900-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY2]]
957 ; GFX900-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
958 ; GFX900-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
959 ; GFX900-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
960 ; GFX900-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
961 ; GFX900-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY17]], [[C2]](s32)
962 ; GFX900-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY16]], [[SHL]]
963 ; GFX900-NEXT: $vgpr0 = COPY [[C]](s32)
964 ; GFX900-NEXT: [[COPY18:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
965 ; GFX900-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY18]](<4 x s32>)
966 ; GFX900-NEXT: $sgpr4_sgpr5 = COPY [[COPY9]](p4)
967 ; GFX900-NEXT: $sgpr6_sgpr7 = COPY [[COPY10]](p4)
968 ; GFX900-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
969 ; GFX900-NEXT: $sgpr10_sgpr11 = COPY [[COPY12]](s64)
970 ; GFX900-NEXT: $sgpr12 = COPY [[COPY13]](s32)
971 ; GFX900-NEXT: $sgpr13 = COPY [[COPY14]](s32)
972 ; GFX900-NEXT: $sgpr14 = COPY [[COPY15]](s32)
973 ; GFX900-NEXT: $sgpr15 = COPY [[DEF]](s32)
974 ; GFX900-NEXT: $vgpr31 = COPY [[OR]](s32)
975 ; GFX900-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
976 ; GFX900-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
977 ; GFX900-NEXT: S_ENDPGM 0
979 ; GFX908-LABEL: name: test_only_workitem_id_xy
980 ; GFX908: bb.1 (%ir-block.0):
981 ; GFX908-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr0, $vgpr1, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
982 ; GFX908-NEXT: {{ $}}
983 ; GFX908-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr1
984 ; GFX908-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
985 ; GFX908-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr16
986 ; GFX908-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr15
987 ; GFX908-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr14
988 ; GFX908-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
989 ; GFX908-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
990 ; GFX908-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
991 ; GFX908-NEXT: [[COPY8:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
992 ; GFX908-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
993 ; GFX908-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
994 ; GFX908-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
995 ; GFX908-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY7]]
996 ; GFX908-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY6]]
997 ; GFX908-NEXT: [[COPY11:%[0-9]+]]:_(p4) = COPY [[COPY8]](p4)
998 ; GFX908-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
999 ; GFX908-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY11]], [[C1]](s64)
1000 ; GFX908-NEXT: [[COPY12:%[0-9]+]]:_(s64) = COPY [[COPY5]]
1001 ; GFX908-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY4]]
1002 ; GFX908-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY3]]
1003 ; GFX908-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY2]]
1004 ; GFX908-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
1005 ; GFX908-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
1006 ; GFX908-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
1007 ; GFX908-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
1008 ; GFX908-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY17]], [[C2]](s32)
1009 ; GFX908-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY16]], [[SHL]]
1010 ; GFX908-NEXT: $vgpr0 = COPY [[C]](s32)
1011 ; GFX908-NEXT: [[COPY18:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
1012 ; GFX908-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY18]](<4 x s32>)
1013 ; GFX908-NEXT: $sgpr4_sgpr5 = COPY [[COPY9]](p4)
1014 ; GFX908-NEXT: $sgpr6_sgpr7 = COPY [[COPY10]](p4)
1015 ; GFX908-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
1016 ; GFX908-NEXT: $sgpr10_sgpr11 = COPY [[COPY12]](s64)
1017 ; GFX908-NEXT: $sgpr12 = COPY [[COPY13]](s32)
1018 ; GFX908-NEXT: $sgpr13 = COPY [[COPY14]](s32)
1019 ; GFX908-NEXT: $sgpr14 = COPY [[COPY15]](s32)
1020 ; GFX908-NEXT: $sgpr15 = COPY [[DEF]](s32)
1021 ; GFX908-NEXT: $vgpr31 = COPY [[OR]](s32)
1022 ; GFX908-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
1023 ; GFX908-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
1024 ; GFX908-NEXT: S_ENDPGM 0
1025 call void @external_void_func_i32(i32 42)
1029 define amdgpu_kernel void @test_only_workitem_id_yz() #0 !reqd_work_group_size !4 {
1030 ; GFX900-LABEL: name: test_only_workitem_id_yz
1031 ; GFX900: bb.1 (%ir-block.0):
1032 ; GFX900-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr1, $vgpr2, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
1033 ; GFX900-NEXT: {{ $}}
1034 ; GFX900-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr2
1035 ; GFX900-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr1
1036 ; GFX900-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr16
1037 ; GFX900-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr15
1038 ; GFX900-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr14
1039 ; GFX900-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
1040 ; GFX900-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
1041 ; GFX900-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
1042 ; GFX900-NEXT: [[COPY8:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
1043 ; GFX900-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
1044 ; GFX900-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
1045 ; GFX900-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
1046 ; GFX900-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY7]]
1047 ; GFX900-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY6]]
1048 ; GFX900-NEXT: [[COPY11:%[0-9]+]]:_(p4) = COPY [[COPY8]](p4)
1049 ; GFX900-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
1050 ; GFX900-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY11]], [[C1]](s64)
1051 ; GFX900-NEXT: [[COPY12:%[0-9]+]]:_(s64) = COPY [[COPY5]]
1052 ; GFX900-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY4]]
1053 ; GFX900-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY3]]
1054 ; GFX900-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY2]]
1055 ; GFX900-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
1056 ; GFX900-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1057 ; GFX900-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
1058 ; GFX900-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
1059 ; GFX900-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY16]], [[C3]](s32)
1060 ; GFX900-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[C2]], [[SHL]]
1061 ; GFX900-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
1062 ; GFX900-NEXT: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
1063 ; GFX900-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY17]], [[C4]](s32)
1064 ; GFX900-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[OR]], [[SHL1]]
1065 ; GFX900-NEXT: $vgpr0 = COPY [[C]](s32)
1066 ; GFX900-NEXT: [[COPY18:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
1067 ; GFX900-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY18]](<4 x s32>)
1068 ; GFX900-NEXT: $sgpr4_sgpr5 = COPY [[COPY9]](p4)
1069 ; GFX900-NEXT: $sgpr6_sgpr7 = COPY [[COPY10]](p4)
1070 ; GFX900-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
1071 ; GFX900-NEXT: $sgpr10_sgpr11 = COPY [[COPY12]](s64)
1072 ; GFX900-NEXT: $sgpr12 = COPY [[COPY13]](s32)
1073 ; GFX900-NEXT: $sgpr13 = COPY [[COPY14]](s32)
1074 ; GFX900-NEXT: $sgpr14 = COPY [[COPY15]](s32)
1075 ; GFX900-NEXT: $sgpr15 = COPY [[DEF]](s32)
1076 ; GFX900-NEXT: $vgpr31 = COPY [[OR1]](s32)
1077 ; GFX900-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
1078 ; GFX900-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
1079 ; GFX900-NEXT: S_ENDPGM 0
1081 ; GFX908-LABEL: name: test_only_workitem_id_yz
1082 ; GFX908: bb.1 (%ir-block.0):
1083 ; GFX908-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr1, $vgpr2, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
1084 ; GFX908-NEXT: {{ $}}
1085 ; GFX908-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr2
1086 ; GFX908-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr1
1087 ; GFX908-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr16
1088 ; GFX908-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr15
1089 ; GFX908-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr14
1090 ; GFX908-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
1091 ; GFX908-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
1092 ; GFX908-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
1093 ; GFX908-NEXT: [[COPY8:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
1094 ; GFX908-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
1095 ; GFX908-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
1096 ; GFX908-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
1097 ; GFX908-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY7]]
1098 ; GFX908-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY6]]
1099 ; GFX908-NEXT: [[COPY11:%[0-9]+]]:_(p4) = COPY [[COPY8]](p4)
1100 ; GFX908-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
1101 ; GFX908-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY11]], [[C1]](s64)
1102 ; GFX908-NEXT: [[COPY12:%[0-9]+]]:_(s64) = COPY [[COPY5]]
1103 ; GFX908-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY4]]
1104 ; GFX908-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY3]]
1105 ; GFX908-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY2]]
1106 ; GFX908-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
1107 ; GFX908-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1108 ; GFX908-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
1109 ; GFX908-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
1110 ; GFX908-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY16]], [[C3]](s32)
1111 ; GFX908-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[C2]], [[SHL]]
1112 ; GFX908-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
1113 ; GFX908-NEXT: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
1114 ; GFX908-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY17]], [[C4]](s32)
1115 ; GFX908-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[OR]], [[SHL1]]
1116 ; GFX908-NEXT: $vgpr0 = COPY [[C]](s32)
1117 ; GFX908-NEXT: [[COPY18:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
1118 ; GFX908-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY18]](<4 x s32>)
1119 ; GFX908-NEXT: $sgpr4_sgpr5 = COPY [[COPY9]](p4)
1120 ; GFX908-NEXT: $sgpr6_sgpr7 = COPY [[COPY10]](p4)
1121 ; GFX908-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
1122 ; GFX908-NEXT: $sgpr10_sgpr11 = COPY [[COPY12]](s64)
1123 ; GFX908-NEXT: $sgpr12 = COPY [[COPY13]](s32)
1124 ; GFX908-NEXT: $sgpr13 = COPY [[COPY14]](s32)
1125 ; GFX908-NEXT: $sgpr14 = COPY [[COPY15]](s32)
1126 ; GFX908-NEXT: $sgpr15 = COPY [[DEF]](s32)
1127 ; GFX908-NEXT: $vgpr31 = COPY [[OR1]](s32)
1128 ; GFX908-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
1129 ; GFX908-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
1130 ; GFX908-NEXT: S_ENDPGM 0
1131 call void @external_void_func_i32(i32 42)
1135 define amdgpu_kernel void @test_only_workitem_id_xz() #0 !reqd_work_group_size !5 {
1136 ; GFX900-LABEL: name: test_only_workitem_id_xz
1137 ; GFX900: bb.1 (%ir-block.0):
1138 ; GFX900-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr0, $vgpr2, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
1139 ; GFX900-NEXT: {{ $}}
1140 ; GFX900-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr2
1141 ; GFX900-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
1142 ; GFX900-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr16
1143 ; GFX900-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr15
1144 ; GFX900-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr14
1145 ; GFX900-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
1146 ; GFX900-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
1147 ; GFX900-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
1148 ; GFX900-NEXT: [[COPY8:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
1149 ; GFX900-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
1150 ; GFX900-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
1151 ; GFX900-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
1152 ; GFX900-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY7]]
1153 ; GFX900-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY6]]
1154 ; GFX900-NEXT: [[COPY11:%[0-9]+]]:_(p4) = COPY [[COPY8]](p4)
1155 ; GFX900-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
1156 ; GFX900-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY11]], [[C1]](s64)
1157 ; GFX900-NEXT: [[COPY12:%[0-9]+]]:_(s64) = COPY [[COPY5]]
1158 ; GFX900-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY4]]
1159 ; GFX900-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY3]]
1160 ; GFX900-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY2]]
1161 ; GFX900-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
1162 ; GFX900-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
1163 ; GFX900-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
1164 ; GFX900-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
1165 ; GFX900-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY17]], [[C2]](s32)
1166 ; GFX900-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY16]], [[SHL]]
1167 ; GFX900-NEXT: $vgpr0 = COPY [[C]](s32)
1168 ; GFX900-NEXT: [[COPY18:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
1169 ; GFX900-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY18]](<4 x s32>)
1170 ; GFX900-NEXT: $sgpr4_sgpr5 = COPY [[COPY9]](p4)
1171 ; GFX900-NEXT: $sgpr6_sgpr7 = COPY [[COPY10]](p4)
1172 ; GFX900-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
1173 ; GFX900-NEXT: $sgpr10_sgpr11 = COPY [[COPY12]](s64)
1174 ; GFX900-NEXT: $sgpr12 = COPY [[COPY13]](s32)
1175 ; GFX900-NEXT: $sgpr13 = COPY [[COPY14]](s32)
1176 ; GFX900-NEXT: $sgpr14 = COPY [[COPY15]](s32)
1177 ; GFX900-NEXT: $sgpr15 = COPY [[DEF]](s32)
1178 ; GFX900-NEXT: $vgpr31 = COPY [[OR]](s32)
1179 ; GFX900-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
1180 ; GFX900-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
1181 ; GFX900-NEXT: S_ENDPGM 0
1183 ; GFX908-LABEL: name: test_only_workitem_id_xz
1184 ; GFX908: bb.1 (%ir-block.0):
1185 ; GFX908-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr0, $vgpr2, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
1186 ; GFX908-NEXT: {{ $}}
1187 ; GFX908-NEXT: [[COPY:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr2
1188 ; GFX908-NEXT: [[COPY1:%[0-9]+]]:vgpr_32(s32) = COPY $vgpr0
1189 ; GFX908-NEXT: [[COPY2:%[0-9]+]]:sgpr_32 = COPY $sgpr16
1190 ; GFX908-NEXT: [[COPY3:%[0-9]+]]:sgpr_32 = COPY $sgpr15
1191 ; GFX908-NEXT: [[COPY4:%[0-9]+]]:sgpr_32 = COPY $sgpr14
1192 ; GFX908-NEXT: [[COPY5:%[0-9]+]]:sgpr_64 = COPY $sgpr10_sgpr11
1193 ; GFX908-NEXT: [[COPY6:%[0-9]+]]:sgpr_64 = COPY $sgpr6_sgpr7
1194 ; GFX908-NEXT: [[COPY7:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
1195 ; GFX908-NEXT: [[COPY8:%[0-9]+]]:_(p4) = COPY $sgpr8_sgpr9
1196 ; GFX908-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 42
1197 ; GFX908-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $scc
1198 ; GFX908-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @external_void_func_i32
1199 ; GFX908-NEXT: [[COPY9:%[0-9]+]]:_(p4) = COPY [[COPY7]]
1200 ; GFX908-NEXT: [[COPY10:%[0-9]+]]:_(p4) = COPY [[COPY6]]
1201 ; GFX908-NEXT: [[COPY11:%[0-9]+]]:_(p4) = COPY [[COPY8]](p4)
1202 ; GFX908-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
1203 ; GFX908-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY11]], [[C1]](s64)
1204 ; GFX908-NEXT: [[COPY12:%[0-9]+]]:_(s64) = COPY [[COPY5]]
1205 ; GFX908-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY4]]
1206 ; GFX908-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY3]]
1207 ; GFX908-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY2]]
1208 ; GFX908-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
1209 ; GFX908-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
1210 ; GFX908-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
1211 ; GFX908-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
1212 ; GFX908-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY17]], [[C2]](s32)
1213 ; GFX908-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY16]], [[SHL]]
1214 ; GFX908-NEXT: $vgpr0 = COPY [[C]](s32)
1215 ; GFX908-NEXT: [[COPY18:%[0-9]+]]:_(<4 x s32>) = COPY $private_rsrc_reg
1216 ; GFX908-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[COPY18]](<4 x s32>)
1217 ; GFX908-NEXT: $sgpr4_sgpr5 = COPY [[COPY9]](p4)
1218 ; GFX908-NEXT: $sgpr6_sgpr7 = COPY [[COPY10]](p4)
1219 ; GFX908-NEXT: $sgpr8_sgpr9 = COPY [[PTR_ADD]](p4)
1220 ; GFX908-NEXT: $sgpr10_sgpr11 = COPY [[COPY12]](s64)
1221 ; GFX908-NEXT: $sgpr12 = COPY [[COPY13]](s32)
1222 ; GFX908-NEXT: $sgpr13 = COPY [[COPY14]](s32)
1223 ; GFX908-NEXT: $sgpr14 = COPY [[COPY15]](s32)
1224 ; GFX908-NEXT: $sgpr15 = COPY [[DEF]](s32)
1225 ; GFX908-NEXT: $vgpr31 = COPY [[OR]](s32)
1226 ; GFX908-NEXT: $sgpr30_sgpr31 = noconvergent G_SI_CALL [[GV]](p0), @external_void_func_i32, csr_amdgpu, implicit $vgpr0, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr8_sgpr9, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14, implicit $sgpr15, implicit $vgpr31
1227 ; GFX908-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $scc
1228 ; GFX908-NEXT: S_ENDPGM 0
1229 call void @external_void_func_i32(i32 42)
1233 declare i32 @llvm.amdgcn.workitem.id.x() #1
1234 declare i32 @llvm.amdgcn.workitem.id.y() #1
1235 declare i32 @llvm.amdgcn.workitem.id.z() #1
1237 attributes #0 = { nounwind }
1238 attributes #1 = { nounwind readnone speculatable willreturn }
1240 !0 = !{i32 64, i32 1, i32 1}
1241 !1 = !{i32 1, i32 64, i32 1}
1242 !2 = !{i32 1, i32 1, i32 64}
1243 !3 = !{i32 32, i32 2, i32 1}
1244 !4 = !{i32 1, i32 32, i32 2}
1245 !5 = !{i32 32, i32 1, i32 2}