1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -run-pass si-fix-sgpr-copies,si-fold-operands,dead-mi-elimination -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
4 # Check that constant is in SGPR registers
7 define amdgpu_kernel void @const_to_sgpr(i32 addrspace(1)* nocapture %arg, i64 %id) {
9 br i1 undef, label %bb1, label %bb2
14 bb2: ; preds = %bb1, %bb
18 define amdgpu_kernel void @const_to_sgpr_multiple_use(i32 addrspace(1)* nocapture %arg, i64 %id1, i64 %id2) {
20 br i1 undef, label %bb1, label %bb2
25 bb2: ; preds = %bb1, %bb
29 define amdgpu_kernel void @const_to_sgpr_subreg(i32 addrspace(1)* nocapture %arg, i64 %id) {
31 br i1 undef, label %bb1, label %bb2
36 bb2: ; preds = %bb1, %bb
44 exposesReturnsTwice: false
46 regBankSelected: false
48 tracksRegLiveness: true
50 - { id: 0, class: sreg_64 }
51 - { id: 1, class: sreg_64 }
52 - { id: 2, class: vgpr_32 }
53 - { id: 3, class: sgpr_64 }
54 - { id: 4, class: sreg_32_xm0 }
55 - { id: 5, class: sgpr_32 }
56 - { id: 6, class: sreg_64 }
57 - { id: 7, class: sreg_64_xexec }
58 - { id: 8, class: sreg_64_xexec }
59 - { id: 9, class: sreg_32 }
60 - { id: 10, class: sreg_64 }
61 - { id: 11, class: sreg_32_xm0 }
62 - { id: 12, class: sreg_32_xm0 }
63 - { id: 13, class: sreg_32_xm0 }
64 - { id: 14, class: sreg_32_xm0 }
65 - { id: 15, class: sreg_32_xm0 }
66 - { id: 16, class: sreg_32_xm0 }
67 - { id: 17, class: sreg_64 }
68 - { id: 18, class: sreg_32_xm0 }
69 - { id: 19, class: sreg_32_xm0 }
70 - { id: 20, class: sreg_64 }
71 - { id: 21, class: sreg_64 }
72 - { id: 22, class: vreg_64 }
73 - { id: 23, class: sreg_32_xm0 }
74 - { id: 24, class: sreg_64 }
75 - { id: 25, class: sreg_32_xm0 }
76 - { id: 26, class: sreg_32_xm0 }
77 - { id: 27, class: sgpr_64 }
78 - { id: 28, class: sgpr_128 }
79 - { id: 29, class: vgpr_32 }
80 - { id: 30, class: vreg_64 }
82 - { reg: '$vgpr0', virtual-reg: '%2' }
83 - { reg: '$sgpr0_sgpr1', virtual-reg: '%3' }
85 ; GCN-LABEL: name: const_to_sgpr
87 ; GCN-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
88 ; GCN-NEXT: liveins: $vgpr0, $sgpr0_sgpr1
90 ; GCN-NEXT: [[COPY:%[0-9]+]]:sgpr_64 = COPY $sgpr0_sgpr1
91 ; GCN-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
92 ; GCN-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 9, 0
93 ; GCN-NEXT: [[S_LOAD_DWORDX2_IMM1:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 11, 0
94 ; GCN-NEXT: [[COPY2:%[0-9]+]]:sreg_64 = COPY [[S_LOAD_DWORDX2_IMM]]
95 ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
96 ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, killed [[V_MOV_B32_e32_]], %subreg.sub1
97 ; GCN-NEXT: [[V_ADD_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_CO_U32_e32 [[S_LOAD_DWORDX2_IMM1]].sub0, [[REG_SEQUENCE]].sub0, implicit-def $vcc, implicit $exec
98 ; GCN-NEXT: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[S_LOAD_DWORDX2_IMM1]].sub1
99 ; GCN-NEXT: [[V_ADDC_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADDC_U32_e32 0, [[COPY3]], implicit-def $vcc, implicit $vcc, implicit $exec
100 ; GCN-NEXT: [[COPY4:%[0-9]+]]:vgpr_32 = COPY killed [[V_ADD_CO_U32_e32_]], implicit $exec
101 ; GCN-NEXT: [[REG_SEQUENCE1:%[0-9]+]]:vreg_64 = REG_SEQUENCE killed [[COPY4]], %subreg.sub0, killed [[V_ADDC_U32_e32_]], %subreg.sub1
102 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 0
103 ; GCN-NEXT: [[S_MOV_B32_1:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 1048576
104 ; GCN-NEXT: [[REG_SEQUENCE2:%[0-9]+]]:sreg_64 = REG_SEQUENCE killed [[S_MOV_B32_1]], %subreg.sub0, killed [[S_MOV_B32_]], %subreg.sub1
105 ; GCN-NEXT: [[V_CMP_LT_U64_e64_:%[0-9]+]]:sreg_64 = V_CMP_LT_U64_e64 killed [[REG_SEQUENCE1]], [[REG_SEQUENCE2]], implicit $exec
106 ; GCN-NEXT: [[SI_IF:%[0-9]+]]:sreg_64 = SI_IF killed [[V_CMP_LT_U64_e64_]], %bb.2, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
107 ; GCN-NEXT: S_BRANCH %bb.1
109 ; GCN-NEXT: bb.1.bb1:
110 ; GCN-NEXT: successors: %bb.2(0x80000000)
112 ; GCN-NEXT: [[V_LSHL_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHL_B64_e64 [[REG_SEQUENCE]], 2, implicit $exec
113 ; GCN-NEXT: [[S_MOV_B32_2:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 61440
114 ; GCN-NEXT: [[S_MOV_B32_3:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 0
115 ; GCN-NEXT: [[REG_SEQUENCE3:%[0-9]+]]:sgpr_64 = REG_SEQUENCE killed [[S_MOV_B32_3]], %subreg.sub0, killed [[S_MOV_B32_2]], %subreg.sub1
116 ; GCN-NEXT: [[REG_SEQUENCE4:%[0-9]+]]:sgpr_128 = REG_SEQUENCE [[COPY2]], %subreg.sub1_sub2_sub3_sub4_sub5, killed [[REG_SEQUENCE3]], %subreg.sub1_sub2_sub3_sub4_sub5_sub6
117 ; GCN-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
118 ; GCN-NEXT: BUFFER_STORE_DWORD_ADDR64 killed [[V_MOV_B32_e32_1]], [[V_LSHL_B64_e64_]], killed [[REG_SEQUENCE4]], 0, 0, 0, 0, 0, implicit $exec
120 ; GCN-NEXT: bb.2.bb2:
121 ; GCN-NEXT: SI_END_CF [[SI_IF]], implicit-def dead $exec, implicit-def dead $scc, implicit $exec
122 ; GCN-NEXT: S_ENDPGM 0
124 successors: %bb.1.bb1(0x40000000), %bb.2.bb2(0x40000000)
125 liveins: $vgpr0, $sgpr0_sgpr1
127 %3 = COPY $sgpr0_sgpr1
129 %7 = S_LOAD_DWORDX2_IMM %3, 9, 0
130 %8 = S_LOAD_DWORDX2_IMM %3, 11, 0
133 %10 = REG_SEQUENCE %2, %subreg.sub0, killed %9, %subreg.sub1
139 %15 = S_ADD_U32 killed %11, killed %13, implicit-def $scc
140 %16 = S_ADDC_U32 killed %12, killed %14, implicit-def dead $scc, implicit $scc
141 %17 = REG_SEQUENCE killed %15, %subreg.sub0, killed %16, %subreg.sub1
143 %19 = S_MOV_B32 1048576
144 %20 = REG_SEQUENCE killed %19, %subreg.sub0, killed %18, %subreg.sub1
145 %22 = COPY killed %20
146 %21 = V_CMP_LT_U64_e64 killed %17, %22, implicit $exec
147 %1 = SI_IF killed %21, %bb.2.bb2, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
151 successors: %bb.2.bb2(0x80000000)
154 %24 = S_LSHL_B64 %0, killed %23, implicit-def dead $scc
155 %25 = S_MOV_B32 61440
157 %27 = REG_SEQUENCE killed %26, %subreg.sub0, killed %25, %subreg.sub1
158 %28 = REG_SEQUENCE %6, 17, killed %27, 18
159 %29 = V_MOV_B32_e32 0, implicit $exec
161 BUFFER_STORE_DWORD_ADDR64 killed %29, killed %30, killed %28, 0, 0, 0, 0, 0, implicit $exec
164 SI_END_CF %1, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
169 name: const_to_sgpr_multiple_use
171 exposesReturnsTwice: false
173 regBankSelected: false
175 tracksRegLiveness: true
177 - { id: 0, class: sreg_64 }
178 - { id: 1, class: sreg_64 }
179 - { id: 2, class: vgpr_32 }
180 - { id: 3, class: sgpr_64 }
181 - { id: 4, class: sreg_32_xm0 }
182 - { id: 5, class: sgpr_32 }
183 - { id: 6, class: sreg_64 }
184 - { id: 7, class: sreg_64_xexec }
185 - { id: 8, class: sreg_64_xexec }
186 - { id: 9, class: sreg_64_xexec }
187 - { id: 10, class: sreg_32 }
188 - { id: 11, class: sreg_64 }
189 - { id: 12, class: sreg_32_xm0 }
190 - { id: 13, class: sreg_32_xm0 }
191 - { id: 14, class: sreg_32_xm0 }
192 - { id: 15, class: sreg_32_xm0 }
193 - { id: 16, class: sreg_32_xm0 }
194 - { id: 17, class: sreg_32_xm0 }
195 - { id: 18, class: sreg_64 }
196 - { id: 19, class: sreg_32_xm0 }
197 - { id: 20, class: sreg_32_xm0 }
198 - { id: 21, class: sreg_32_xm0 }
199 - { id: 22, class: sreg_32_xm0 }
200 - { id: 23, class: sreg_64 }
201 - { id: 24, class: sreg_32_xm0 }
202 - { id: 25, class: sreg_32_xm0 }
203 - { id: 26, class: sreg_64 }
204 - { id: 27, class: sreg_64 }
205 - { id: 28, class: vreg_64 }
206 - { id: 29, class: sreg_64 }
207 - { id: 30, class: vreg_64 }
208 - { id: 31, class: sreg_64 }
209 - { id: 32, class: sreg_32_xm0 }
210 - { id: 33, class: sreg_64 }
211 - { id: 34, class: sreg_32_xm0 }
212 - { id: 35, class: sreg_32_xm0 }
213 - { id: 36, class: sgpr_64 }
214 - { id: 37, class: sgpr_128 }
215 - { id: 38, class: vgpr_32 }
216 - { id: 39, class: vreg_64 }
218 - { reg: '$vgpr0', virtual-reg: '%2' }
219 - { reg: '$sgpr0_sgpr1', virtual-reg: '%3' }
221 ; GCN-LABEL: name: const_to_sgpr_multiple_use
223 ; GCN-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
224 ; GCN-NEXT: liveins: $vgpr0, $sgpr0_sgpr1
226 ; GCN-NEXT: [[COPY:%[0-9]+]]:sgpr_64 = COPY $sgpr0_sgpr1
227 ; GCN-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
228 ; GCN-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 9, 0
229 ; GCN-NEXT: [[S_LOAD_DWORDX2_IMM1:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 11, 0
230 ; GCN-NEXT: [[S_LOAD_DWORDX2_IMM2:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 13, 0
231 ; GCN-NEXT: [[COPY2:%[0-9]+]]:sreg_64 = COPY [[S_LOAD_DWORDX2_IMM]]
232 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 0
233 ; GCN-NEXT: [[V_READFIRSTLANE_B32_:%[0-9]+]]:sgpr_32 = V_READFIRSTLANE_B32 [[COPY1]], implicit $exec
234 ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[V_READFIRSTLANE_B32_]], %subreg.sub0, killed [[S_MOV_B32_]], %subreg.sub1
235 ; GCN-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32_xm0 = S_ADD_U32 [[REG_SEQUENCE]].sub0, [[S_LOAD_DWORDX2_IMM1]].sub0, implicit-def $scc
236 ; GCN-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32_xm0 = S_ADDC_U32 0, [[S_LOAD_DWORDX2_IMM1]].sub1, implicit-def dead $scc, implicit $scc
237 ; GCN-NEXT: [[REG_SEQUENCE1:%[0-9]+]]:sreg_64 = REG_SEQUENCE killed [[S_ADD_U32_]], %subreg.sub0, killed [[S_ADDC_U32_]], %subreg.sub1
238 ; GCN-NEXT: [[S_ADD_U32_1:%[0-9]+]]:sreg_32_xm0 = S_ADD_U32 [[REG_SEQUENCE]].sub0, [[S_LOAD_DWORDX2_IMM2]].sub0, implicit-def $scc
239 ; GCN-NEXT: [[S_ADDC_U32_1:%[0-9]+]]:sreg_32_xm0 = S_ADDC_U32 0, [[S_LOAD_DWORDX2_IMM2]].sub1, implicit-def dead $scc, implicit $scc
240 ; GCN-NEXT: [[REG_SEQUENCE2:%[0-9]+]]:sreg_64 = REG_SEQUENCE killed [[S_ADD_U32_1]], %subreg.sub0, killed [[S_ADDC_U32_1]], %subreg.sub1
241 ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 1048576, implicit $exec
242 ; GCN-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
243 ; GCN-NEXT: [[REG_SEQUENCE3:%[0-9]+]]:vreg_64 = REG_SEQUENCE killed [[V_MOV_B32_e32_]], %subreg.sub0, killed [[V_MOV_B32_e32_1]], %subreg.sub1
244 ; GCN-NEXT: [[V_CMP_LT_U64_e64_:%[0-9]+]]:sreg_64 = V_CMP_LT_U64_e64 killed [[REG_SEQUENCE1]], [[REG_SEQUENCE3]], implicit $exec
245 ; GCN-NEXT: [[V_CMP_LT_U64_e64_1:%[0-9]+]]:sreg_64 = V_CMP_LT_U64_e64 killed [[REG_SEQUENCE2]], [[REG_SEQUENCE3]], implicit $exec
246 ; GCN-NEXT: [[S_AND_B64_:%[0-9]+]]:sreg_64 = S_AND_B64 killed [[V_CMP_LT_U64_e64_]], killed [[V_CMP_LT_U64_e64_1]], implicit-def dead $scc
247 ; GCN-NEXT: [[SI_IF:%[0-9]+]]:sreg_64 = SI_IF killed [[S_AND_B64_]], %bb.2, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
248 ; GCN-NEXT: S_BRANCH %bb.1
250 ; GCN-NEXT: bb.1.bb1:
251 ; GCN-NEXT: successors: %bb.2(0x80000000)
253 ; GCN-NEXT: [[S_LSHL_B64_:%[0-9]+]]:sreg_64 = S_LSHL_B64 [[REG_SEQUENCE]], 2, implicit-def dead $scc
254 ; GCN-NEXT: [[S_MOV_B32_1:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 61440
255 ; GCN-NEXT: [[S_MOV_B32_2:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 0
256 ; GCN-NEXT: [[REG_SEQUENCE4:%[0-9]+]]:sgpr_64 = REG_SEQUENCE killed [[S_MOV_B32_2]], %subreg.sub0, killed [[S_MOV_B32_1]], %subreg.sub1
257 ; GCN-NEXT: [[REG_SEQUENCE5:%[0-9]+]]:sgpr_128 = REG_SEQUENCE [[COPY2]], %subreg.sub1_sub2_sub3_sub4_sub5, killed [[REG_SEQUENCE4]], %subreg.sub1_sub2_sub3_sub4_sub5_sub6
258 ; GCN-NEXT: [[V_MOV_B32_e32_2:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
259 ; GCN-NEXT: [[COPY3:%[0-9]+]]:vreg_64 = COPY [[S_LSHL_B64_]]
260 ; GCN-NEXT: BUFFER_STORE_DWORD_ADDR64 killed [[V_MOV_B32_e32_2]], killed [[COPY3]], killed [[REG_SEQUENCE5]], 0, 0, 0, 0, 0, implicit $exec
262 ; GCN-NEXT: bb.2.bb2:
263 ; GCN-NEXT: SI_END_CF [[SI_IF]], implicit-def dead $exec, implicit-def dead $scc, implicit $exec
264 ; GCN-NEXT: S_ENDPGM 0
266 successors: %bb.1.bb1(0x40000000), %bb.2.bb2(0x40000000)
267 liveins: $vgpr0, $sgpr0_sgpr1
269 %3 = COPY $sgpr0_sgpr1
271 %7 = S_LOAD_DWORDX2_IMM %3, 9, 0
272 %8 = S_LOAD_DWORDX2_IMM %3, 11, 0
273 %9 = S_LOAD_DWORDX2_IMM %3, 13, 0
276 %11 = REG_SEQUENCE %2, %subreg.sub0, killed %10, %subreg.sub1
282 %16 = S_ADD_U32 %12, killed %14, implicit-def $scc
283 %17 = S_ADDC_U32 %13, killed %15, implicit-def dead $scc, implicit $scc
284 %18 = REG_SEQUENCE killed %16, %subreg.sub0, killed %17, %subreg.sub1
287 %21 = S_ADD_U32 %12, killed %19, implicit-def $scc
288 %22 = S_ADDC_U32 %13, killed %20, implicit-def dead $scc, implicit $scc
289 %23 = REG_SEQUENCE killed %21, %subreg.sub0, killed %22, %subreg.sub1
291 %25 = S_MOV_B32 1048576
292 %26 = REG_SEQUENCE killed %25, %subreg.sub0, killed %24, %subreg.sub1
294 %27 = V_CMP_LT_U64_e64 killed %18, %28, implicit $exec
295 %29 = V_CMP_LT_U64_e64 killed %23, %28, implicit $exec
296 %31 = S_AND_B64 killed %27, killed %29, implicit-def dead $scc
297 %1 = SI_IF killed %31, %bb.2.bb2, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
301 successors: %bb.2.bb2(0x80000000)
304 %33 = S_LSHL_B64 %0, killed %32, implicit-def dead $scc
305 %34 = S_MOV_B32 61440
307 %36 = REG_SEQUENCE killed %35, %subreg.sub0, killed %34, %subreg.sub1
308 %37 = REG_SEQUENCE %6, 17, killed %36, 18
309 %38 = V_MOV_B32_e32 0, implicit $exec
311 BUFFER_STORE_DWORD_ADDR64 killed %38, killed %39, killed %37, 0, 0, 0, 0, 0, implicit $exec
314 SI_END_CF %1, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
319 name: const_to_sgpr_subreg
321 exposesReturnsTwice: false
323 regBankSelected: false
325 tracksRegLiveness: true
327 - { id: 0, class: sreg_64 }
328 - { id: 1, class: sreg_64 }
329 - { id: 2, class: vgpr_32 }
330 - { id: 3, class: sgpr_64 }
331 - { id: 4, class: sreg_32_xm0 }
332 - { id: 5, class: sgpr_32 }
333 - { id: 6, class: sreg_64 }
334 - { id: 7, class: sreg_64_xexec }
335 - { id: 8, class: sreg_64_xexec }
336 - { id: 9, class: sreg_32 }
337 - { id: 10, class: sreg_64 }
338 - { id: 11, class: sreg_32_xm0 }
339 - { id: 12, class: sreg_32_xm0 }
340 - { id: 13, class: sreg_32_xm0 }
341 - { id: 14, class: sreg_32_xm0 }
342 - { id: 15, class: sreg_32_xm0 }
343 - { id: 16, class: sreg_32_xm0 }
344 - { id: 17, class: sreg_64 }
345 - { id: 18, class: sreg_32_xm0 }
346 - { id: 19, class: sreg_32_xm0 }
347 - { id: 20, class: sreg_64 }
348 - { id: 21, class: sreg_64 }
349 - { id: 22, class: vgpr_32 }
350 - { id: 23, class: sreg_32_xm0 }
351 - { id: 24, class: sreg_64 }
352 - { id: 25, class: sreg_32_xm0 }
353 - { id: 26, class: sreg_32_xm0 }
354 - { id: 27, class: sgpr_64 }
355 - { id: 28, class: sgpr_128 }
356 - { id: 29, class: vgpr_32 }
357 - { id: 30, class: vreg_64 }
359 - { reg: '$vgpr0', virtual-reg: '%2' }
360 - { reg: '$sgpr0_sgpr1', virtual-reg: '%3' }
362 ; GCN-LABEL: name: const_to_sgpr_subreg
364 ; GCN-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
365 ; GCN-NEXT: liveins: $vgpr0, $sgpr0_sgpr1
367 ; GCN-NEXT: [[COPY:%[0-9]+]]:sgpr_64 = COPY $sgpr0_sgpr1
368 ; GCN-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
369 ; GCN-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 9, 0
370 ; GCN-NEXT: [[S_LOAD_DWORDX2_IMM1:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 11, 0
371 ; GCN-NEXT: [[COPY2:%[0-9]+]]:sreg_64 = COPY [[S_LOAD_DWORDX2_IMM]]
372 ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
373 ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, killed [[V_MOV_B32_e32_]], %subreg.sub1
374 ; GCN-NEXT: [[V_ADD_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_CO_U32_e32 [[S_LOAD_DWORDX2_IMM1]].sub0, [[REG_SEQUENCE]].sub0, implicit-def $vcc, implicit $exec
375 ; GCN-NEXT: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[S_LOAD_DWORDX2_IMM1]].sub1
376 ; GCN-NEXT: [[V_ADDC_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADDC_U32_e32 0, [[COPY3]], implicit-def $vcc, implicit $vcc, implicit $exec
377 ; GCN-NEXT: [[COPY4:%[0-9]+]]:vgpr_32 = COPY killed [[V_ADD_CO_U32_e32_]], implicit $exec
378 ; GCN-NEXT: [[REG_SEQUENCE1:%[0-9]+]]:vreg_64 = REG_SEQUENCE killed [[COPY4]], %subreg.sub0, killed [[V_ADDC_U32_e32_]], %subreg.sub1
379 ; GCN-NEXT: [[V_CMP_LT_U32_e64_:%[0-9]+]]:sreg_64 = V_CMP_LT_U32_e64 killed [[REG_SEQUENCE1]].sub0, 12, implicit $exec
380 ; GCN-NEXT: [[SI_IF:%[0-9]+]]:sreg_64 = SI_IF killed [[V_CMP_LT_U32_e64_]], %bb.2, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
381 ; GCN-NEXT: S_BRANCH %bb.1
383 ; GCN-NEXT: bb.1.bb1:
384 ; GCN-NEXT: successors: %bb.2(0x80000000)
386 ; GCN-NEXT: [[V_LSHL_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHL_B64_e64 [[REG_SEQUENCE]], 2, implicit $exec
387 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 61440
388 ; GCN-NEXT: [[S_MOV_B32_1:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 0
389 ; GCN-NEXT: [[REG_SEQUENCE2:%[0-9]+]]:sgpr_64 = REG_SEQUENCE killed [[S_MOV_B32_1]], %subreg.sub0, killed [[S_MOV_B32_]], %subreg.sub1
390 ; GCN-NEXT: [[REG_SEQUENCE3:%[0-9]+]]:sgpr_128 = REG_SEQUENCE [[COPY2]], %subreg.sub1_sub2_sub3_sub4_sub5, killed [[REG_SEQUENCE2]], %subreg.sub1_sub2_sub3_sub4_sub5_sub6
391 ; GCN-NEXT: [[V_MOV_B32_e32_1:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
392 ; GCN-NEXT: BUFFER_STORE_DWORD_ADDR64 killed [[V_MOV_B32_e32_1]], [[V_LSHL_B64_e64_]], killed [[REG_SEQUENCE3]], 0, 0, 0, 0, 0, implicit $exec
394 ; GCN-NEXT: bb.2.bb2:
395 ; GCN-NEXT: SI_END_CF [[SI_IF]], implicit-def dead $exec, implicit-def dead $scc, implicit $exec
396 ; GCN-NEXT: S_ENDPGM 0
398 successors: %bb.1.bb1(0x40000000), %bb.2.bb2(0x40000000)
399 liveins: $vgpr0, $sgpr0_sgpr1
401 %3 = COPY $sgpr0_sgpr1
403 %7 = S_LOAD_DWORDX2_IMM %3, 9, 0
404 %8 = S_LOAD_DWORDX2_IMM %3, 11, 0
407 %10 = REG_SEQUENCE %2, %subreg.sub0, killed %9, %subreg.sub1
413 %15 = S_ADD_U32 killed %11, killed %13, implicit-def $scc
414 %16 = S_ADDC_U32 killed %12, killed %14, implicit-def dead $scc, implicit $scc
415 %17 = REG_SEQUENCE killed %15, %subreg.sub0, killed %16, %subreg.sub1
417 %19 = S_MOV_B32 1048576
418 %20 = REG_SEQUENCE killed %19, %subreg.sub0, killed %18, %subreg.sub1
419 %22 = COPY killed %20.sub1
420 %21 = V_CMP_LT_U32_e64 killed %17.sub0, %22, implicit $exec
421 %1 = SI_IF killed %21, %bb.2.bb2, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
425 successors: %bb.2.bb2(0x80000000)
428 %24 = S_LSHL_B64 %0, killed %23, implicit-def dead $scc
429 %25 = S_MOV_B32 61440
431 %27 = REG_SEQUENCE killed %26, %subreg.sub0, killed %25, %subreg.sub1
432 %28 = REG_SEQUENCE %6, 17, killed %27, 18
433 %29 = V_MOV_B32_e32 0, implicit $exec
435 BUFFER_STORE_DWORD_ADDR64 killed %29, killed %30, killed %28, 0, 0, 0, 0, 0, implicit $exec
438 SI_END_CF %1, implicit-def dead $exec, implicit-def dead $scc, implicit $exec