xref: /llvm-project/llvm/test/CodeGen/AMDGPU/sink-after-control-flow-postra.mir (revision a82032918cd445e5750e171f57d4f3d7096c021a)
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass=postra-machine-sink -mattr=+wavefrontsize64 -o - %s | FileCheck -check-prefixes=GFX10 %s
3
4# Ensure that PostRA Machine Sink does not sink instructions
5# past block prologues which would overwrite their uses.
6
7---
8# Make sure COPY to $sgpr9 is not sunk after S_AND_SAVEEXEC_B64.
9name:            _amdgpu_ps_main
10alignment:       1
11tracksRegLiveness: true
12registers:       []
13liveins:
14  - { reg: '$sgpr4', virtual-reg: '' }
15body:             |
16  ; GFX10-LABEL: name: _amdgpu_ps_main
17  ; GFX10: bb.0:
18  ; GFX10-NEXT:   successors: %bb.1(0x80000000)
19  ; GFX10-NEXT:   liveins: $sgpr4
20  ; GFX10-NEXT: {{  $}}
21  ; GFX10-NEXT:   renamable $sgpr9 = COPY $sgpr4
22  ; GFX10-NEXT:   renamable $vgpr5 = IMPLICIT_DEF
23  ; GFX10-NEXT:   renamable $sgpr0_sgpr1 = nofpexcept V_CMP_NGT_F32_e64 0, 0, 0, $vgpr5, 0, implicit $mode, implicit $exec
24  ; GFX10-NEXT:   S_BRANCH %bb.1
25  ; GFX10-NEXT: {{  $}}
26  ; GFX10-NEXT: bb.1:
27  ; GFX10-NEXT:   successors: %bb.2(0x40000000), %bb.3(0x40000000)
28  ; GFX10-NEXT:   liveins: $sgpr6, $sgpr9, $sgpr0_sgpr1
29  ; GFX10-NEXT: {{  $}}
30  ; GFX10-NEXT:   $sgpr4_sgpr5 = S_AND_SAVEEXEC_B64 $sgpr0_sgpr1, implicit-def $exec, implicit-def $scc, implicit $exec
31  ; GFX10-NEXT:   renamable $sgpr14_sgpr15 = S_XOR_B64 $exec, killed renamable $sgpr4_sgpr5, implicit-def dead $scc
32  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.3, implicit $exec
33  ; GFX10-NEXT:   S_BRANCH %bb.2
34  ; GFX10-NEXT: {{  $}}
35  ; GFX10-NEXT: bb.2:
36  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
37  ; GFX10-NEXT:   liveins: $sgpr6
38  ; GFX10-NEXT: {{  $}}
39  ; GFX10-NEXT:   $m0 = COPY killed renamable $sgpr6
40  ; GFX10-NEXT:   S_BRANCH %bb.3
41  ; GFX10-NEXT: {{  $}}
42  ; GFX10-NEXT: bb.3:
43  ; GFX10-NEXT:   S_ENDPGM 0
44  bb.0:
45    successors: %bb.1(0x80000000)
46    liveins: $sgpr4
47
48    renamable $sgpr9 = COPY $sgpr4
49    renamable $vgpr5 = IMPLICIT_DEF
50    renamable $sgpr0_sgpr1 = nofpexcept V_CMP_NGT_F32_e64 0, 0, 0, $vgpr5, 0, implicit $mode, implicit $exec
51    S_BRANCH %bb.1
52
53  bb.1:
54    successors: %bb.2(0x40000000), %bb.8(0x40000000)
55    liveins: $sgpr6, $sgpr9, $sgpr0_sgpr1
56
57    $sgpr4_sgpr5 = S_AND_SAVEEXEC_B64 $sgpr0_sgpr1, implicit-def $exec, implicit-def $scc, implicit $exec
58    renamable $sgpr14_sgpr15 = S_XOR_B64 $exec, killed renamable $sgpr4_sgpr5, implicit-def dead $scc
59    S_CBRANCH_EXECZ %bb.8, implicit $exec
60    S_BRANCH %bb.2
61
62  bb.2:
63    successors: %bb.8(0x40000000)
64    liveins: $sgpr6
65
66    $m0 = COPY killed renamable $sgpr6
67    S_BRANCH %bb.8
68
69  bb.8:
70
71    S_ENDPGM 0
72
73...
74---
75# Make sure COPY to $sgpr0_sgpr1 is not sunk after S_AND_SAVEEXEC_B64.
76name:            _amdgpu_ps_main2
77alignment:       1
78tracksRegLiveness: true
79registers:       []
80liveins:
81  - { reg: '$sgpr4', virtual-reg: '' }
82  - { reg: '$sgpr6_sgpr7', virtual-reg: '' }
83body:             |
84  ; GFX10-LABEL: name: _amdgpu_ps_main2
85  ; GFX10: bb.0:
86  ; GFX10-NEXT:   successors: %bb.1(0x80000000)
87  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr6_sgpr7
88  ; GFX10-NEXT: {{  $}}
89  ; GFX10-NEXT:   renamable $sgpr9 = COPY $sgpr4
90  ; GFX10-NEXT:   renamable $vgpr5 = IMPLICIT_DEF
91  ; GFX10-NEXT:   renamable $sgpr0_sgpr1 = COPY $sgpr6_sgpr7
92  ; GFX10-NEXT:   S_BRANCH %bb.1
93  ; GFX10-NEXT: {{  $}}
94  ; GFX10-NEXT: bb.1:
95  ; GFX10-NEXT:   successors: %bb.2(0x40000000), %bb.3(0x40000000)
96  ; GFX10-NEXT:   liveins: $sgpr6, $sgpr9, $sgpr0_sgpr1
97  ; GFX10-NEXT: {{  $}}
98  ; GFX10-NEXT:   $sgpr4_sgpr5 = S_AND_SAVEEXEC_B64 $sgpr0_sgpr1, implicit-def $exec, implicit-def $scc, implicit $exec
99  ; GFX10-NEXT:   renamable $sgpr14_sgpr15 = S_XOR_B64 $exec, killed renamable $sgpr4_sgpr5, implicit-def dead $scc
100  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.3, implicit $exec
101  ; GFX10-NEXT:   S_BRANCH %bb.2
102  ; GFX10-NEXT: {{  $}}
103  ; GFX10-NEXT: bb.2:
104  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
105  ; GFX10-NEXT:   liveins: $sgpr6
106  ; GFX10-NEXT: {{  $}}
107  ; GFX10-NEXT:   $m0 = COPY killed renamable $sgpr6
108  ; GFX10-NEXT:   S_BRANCH %bb.3
109  ; GFX10-NEXT: {{  $}}
110  ; GFX10-NEXT: bb.3:
111  ; GFX10-NEXT:   S_ENDPGM 0
112  bb.0:
113    successors: %bb.1(0x80000000)
114    liveins: $sgpr4, $sgpr6_sgpr7
115
116    renamable $sgpr9 = COPY $sgpr4
117    renamable $vgpr5 = IMPLICIT_DEF
118    renamable $sgpr0_sgpr1 = COPY $sgpr6_sgpr7
119    S_BRANCH %bb.1
120
121  bb.1:
122    successors: %bb.2(0x40000000), %bb.8(0x40000000)
123    liveins: $sgpr6, $sgpr9, $sgpr0_sgpr1
124
125    $sgpr4_sgpr5 = S_AND_SAVEEXEC_B64 $sgpr0_sgpr1, implicit-def $exec, implicit-def $scc, implicit $exec
126    renamable $sgpr14_sgpr15 = S_XOR_B64 $exec, killed renamable $sgpr4_sgpr5, implicit-def dead $scc
127    S_CBRANCH_EXECZ %bb.8, implicit $exec
128    S_BRANCH %bb.2
129
130  bb.2:
131    successors: %bb.8(0x40000000)
132    liveins: $sgpr6
133
134    $m0 = COPY killed renamable $sgpr6
135    S_BRANCH %bb.8
136
137  bb.8:
138
139    S_ENDPGM 0
140
141...
142---
143# Make sure COPY to $sgpr2_sgpr3 is not sunk after S_AND_SAVEEXEC_B32.
144name:            _amdgpu_ps_main3
145alignment:       1
146tracksRegLiveness: true
147registers:       []
148liveins:
149  - { reg: '$sgpr6_sgpr7', virtual-reg: '' }
150  - { reg: '$sgpr8', virtual-reg: '' }
151body:             |
152  ; GFX10-LABEL: name: _amdgpu_ps_main3
153  ; GFX10: bb.0:
154  ; GFX10-NEXT:   successors: %bb.1(0x80000000)
155  ; GFX10-NEXT:   liveins: $sgpr6_sgpr7, $sgpr8
156  ; GFX10-NEXT: {{  $}}
157  ; GFX10-NEXT:   renamable $vgpr5 = IMPLICIT_DEF
158  ; GFX10-NEXT:   renamable $sgpr0_sgpr1 = IMPLICIT_DEF
159  ; GFX10-NEXT:   renamable $sgpr2_sgpr3 = COPY $sgpr6_sgpr7
160  ; GFX10-NEXT:   S_BRANCH %bb.1
161  ; GFX10-NEXT: {{  $}}
162  ; GFX10-NEXT: bb.1:
163  ; GFX10-NEXT:   successors: %bb.2(0x40000000), %bb.3(0x40000000)
164  ; GFX10-NEXT:   liveins: $sgpr6, $sgpr8, $sgpr0_sgpr1, $sgpr2_sgpr3
165  ; GFX10-NEXT: {{  $}}
166  ; GFX10-NEXT:   $sgpr2 = S_AND_SAVEEXEC_B32 $sgpr8, implicit-def $exec, implicit-def $scc, implicit $exec
167  ; GFX10-NEXT:   $sgpr4_sgpr5 = S_AND_SAVEEXEC_B64 $sgpr0_sgpr1, implicit-def $exec, implicit-def $scc, implicit $exec
168  ; GFX10-NEXT:   renamable $sgpr14_sgpr15 = S_XOR_B64 $exec, killed renamable $sgpr4_sgpr5, implicit-def dead $scc
169  ; GFX10-NEXT:   S_NOP 0, implicit $sgpr2_sgpr3
170  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.3, implicit $exec
171  ; GFX10-NEXT:   S_BRANCH %bb.2
172  ; GFX10-NEXT: {{  $}}
173  ; GFX10-NEXT: bb.2:
174  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
175  ; GFX10-NEXT:   liveins: $sgpr6
176  ; GFX10-NEXT: {{  $}}
177  ; GFX10-NEXT:   $m0 = COPY killed renamable $sgpr6
178  ; GFX10-NEXT:   S_BRANCH %bb.3
179  ; GFX10-NEXT: {{  $}}
180  ; GFX10-NEXT: bb.3:
181  ; GFX10-NEXT:   S_ENDPGM 0
182  bb.0:
183    successors: %bb.1(0x80000000)
184    liveins: $sgpr6_sgpr7, $sgpr8
185
186    renamable $vgpr5 = IMPLICIT_DEF
187    renamable $sgpr0_sgpr1 = IMPLICIT_DEF
188    renamable $sgpr2_sgpr3 = COPY $sgpr6_sgpr7
189    S_BRANCH %bb.1
190
191  bb.1:
192    successors: %bb.2(0x40000000), %bb.8(0x40000000)
193    liveins: $sgpr6, $sgpr8, $sgpr0_sgpr1, $sgpr2_sgpr3
194
195    $sgpr2 = S_AND_SAVEEXEC_B32 $sgpr8, implicit-def $exec, implicit-def $scc, implicit $exec
196    $sgpr4_sgpr5 = S_AND_SAVEEXEC_B64 $sgpr0_sgpr1, implicit-def $exec, implicit-def $scc, implicit $exec
197    renamable $sgpr14_sgpr15 = S_XOR_B64 $exec, killed renamable $sgpr4_sgpr5, implicit-def dead $scc
198    S_NOP 0, implicit $sgpr2_sgpr3
199    S_CBRANCH_EXECZ %bb.8, implicit $exec
200    S_BRANCH %bb.2
201
202  bb.2:
203    successors: %bb.8(0x40000000)
204    liveins: $sgpr6
205
206    $m0 = COPY killed renamable $sgpr6
207    S_BRANCH %bb.8
208
209  bb.8:
210
211    S_ENDPGM 0
212
213...
214
215---
216name:            machinesink_loop_vgpr_out_of_divergent_loop_postra
217tracksRegLiveness: true
218body:             |
219  ; GFX10-LABEL: name: machinesink_loop_vgpr_out_of_divergent_loop_postra
220  ; GFX10: bb.0:
221  ; GFX10-NEXT:   successors: %bb.1(0x80000000)
222  ; GFX10-NEXT:   liveins: $sgpr8, $vgpr0, $vgpr1
223  ; GFX10-NEXT: {{  $}}
224  ; GFX10-NEXT: bb.1:
225  ; GFX10-NEXT:   successors: %bb.7(0x40000000), %bb.2(0x40000000)
226  ; GFX10-NEXT:   liveins: $sgpr8, $vgpr0
227  ; GFX10-NEXT: {{  $}}
228  ; GFX10-NEXT:   $sgpr4 = S_AND_SAVEEXEC_B32 $sgpr8, implicit-def $exec, implicit-def $scc, implicit $exec
229  ; GFX10-NEXT:   renamable $sgpr4 = S_XOR_B32 $exec_lo, killed renamable $sgpr4, implicit-def dead $scc
230  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.7, implicit $exec
231  ; GFX10-NEXT: {{  $}}
232  ; GFX10-NEXT: bb.2:
233  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
234  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr8, $vgpr0
235  ; GFX10-NEXT: {{  $}}
236  ; GFX10-NEXT: bb.3:
237  ; GFX10-NEXT:   successors: %bb.5(0x40000000), %bb.4(0x40000000)
238  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr8, $vgpr0
239  ; GFX10-NEXT: {{  $}}
240  ; GFX10-NEXT:   $sgpr5 = S_AND_SAVEEXEC_B32 $sgpr8, implicit-def $exec, implicit-def $scc, implicit $exec
241  ; GFX10-NEXT:   renamable $sgpr5 = S_XOR_B32 $exec_lo, killed renamable $sgpr5, implicit-def dead $scc
242  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.5, implicit $exec
243  ; GFX10-NEXT:   S_BRANCH %bb.4
244  ; GFX10-NEXT: {{  $}}
245  ; GFX10-NEXT: bb.4:
246  ; GFX10-NEXT:   successors: %bb.5(0x80000000)
247  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr5, $sgpr8, $vgpr0
248  ; GFX10-NEXT: {{  $}}
249  ; GFX10-NEXT: bb.5:
250  ; GFX10-NEXT:   successors: %bb.3(0x40000000), %bb.6(0x40000000)
251  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr5, $sgpr8, $vgpr0
252  ; GFX10-NEXT: {{  $}}
253  ; GFX10-NEXT:   renamable $vgpr1 = V_ADD_U32_e64 $sgpr8, $vgpr0, 0, implicit $exec
254  ; GFX10-NEXT:   renamable $sgpr5 = S_AND_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
255  ; GFX10-NEXT:   renamable $sgpr5 = S_OR_B32 killed renamable $sgpr5, renamable $sgpr4, implicit-def $scc
256  ; GFX10-NEXT:   $exec_lo = S_ANDN2_B32 $exec_lo, renamable $sgpr5, implicit-def $scc
257  ; GFX10-NEXT:   S_CBRANCH_EXECNZ %bb.3, implicit $exec
258  ; GFX10-NEXT:   S_BRANCH %bb.6
259  ; GFX10-NEXT: {{  $}}
260  ; GFX10-NEXT: bb.6:
261  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
262  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr5, $sgpr8, $vgpr0, $vgpr1
263  ; GFX10-NEXT: {{  $}}
264  ; GFX10-NEXT:   $exec_lo = S_OR_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
265  ; GFX10-NEXT:   INLINEASM &"", 1 /* sideeffect attdialect */, implicit killed renamable $vgpr1
266  ; GFX10-NEXT:   S_BRANCH %bb.3
267  ; GFX10-NEXT: {{  $}}
268  ; GFX10-NEXT: bb.7:
269  ; GFX10-NEXT:   successors: %bb.1(0x40000000), %bb.8(0x40000000)
270  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr8, $vgpr0
271  ; GFX10-NEXT: {{  $}}
272  ; GFX10-NEXT:   $exec_lo = S_ANDN2_B32 $exec_lo, killed renamable $sgpr4, implicit-def $scc
273  ; GFX10-NEXT:   S_CBRANCH_EXECNZ %bb.1, implicit $exec
274  ; GFX10-NEXT: {{  $}}
275  ; GFX10-NEXT: bb.8:
276  ; GFX10-NEXT:   successors: %bb.9(0x80000000)
277  ; GFX10-NEXT: {{  $}}
278  ; GFX10-NEXT: bb.9:
279  ; GFX10-NEXT:   successors: %bb.9(0x40000000), %bb.10(0x40000000)
280  ; GFX10-NEXT: {{  $}}
281  ; GFX10-NEXT:   S_CBRANCH_VCCNZ %bb.9, implicit undef $vcc
282  ; GFX10-NEXT:   S_BRANCH %bb.10
283  ; GFX10-NEXT: {{  $}}
284  ; GFX10-NEXT: bb.10:
285  ; GFX10-NEXT:   SI_RETURN
286  bb.0:
287    liveins: $sgpr8, $vgpr0, $vgpr1
288
289  bb.1:
290    liveins: $sgpr8, $vgpr0
291
292    $sgpr4 = S_AND_SAVEEXEC_B32 $sgpr8, implicit-def $exec, implicit-def $scc, implicit $exec
293    renamable $sgpr4 = S_XOR_B32 $exec_lo, killed renamable $sgpr4, implicit-def dead $scc
294    S_CBRANCH_EXECZ %bb.6, implicit $exec
295
296  bb.9:
297    liveins: $sgpr4, $sgpr8, $vgpr0
298
299
300  bb.2:
301    liveins: $sgpr4, $sgpr8, $vgpr0
302
303    $sgpr5 = S_AND_SAVEEXEC_B32 $sgpr8, implicit-def $exec, implicit-def $scc, implicit $exec
304    renamable $sgpr5 = S_XOR_B32 $exec_lo, killed renamable $sgpr5, implicit-def dead $scc
305    S_CBRANCH_EXECZ %bb.4, implicit $exec
306    S_BRANCH %bb.3
307
308  bb.3:
309    liveins: $sgpr4, $sgpr5, $sgpr8, $vgpr0
310
311
312  bb.4:
313    liveins: $sgpr4, $sgpr5, $sgpr8, $vgpr0
314
315    renamable $vgpr1 = V_ADD_U32_e64 $sgpr8, $vgpr0, 0, implicit $exec
316    renamable $sgpr5 = S_AND_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
317    renamable $sgpr5 = S_OR_B32 killed renamable $sgpr5, renamable $sgpr4, implicit-def $scc
318
319    $exec_lo = S_ANDN2_B32 $exec_lo, renamable $sgpr5, implicit-def $scc
320    S_CBRANCH_EXECNZ %bb.2, implicit $exec
321    S_BRANCH %bb.5
322
323  bb.5:
324    liveins: $sgpr4, $sgpr5, $sgpr8, $vgpr0, $vgpr1
325
326    $exec_lo = S_OR_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
327    INLINEASM &"", 1 /* sideeffect attdialect */, implicit killed renamable $vgpr1
328    S_BRANCH %bb.2
329
330  bb.6:
331    liveins: $sgpr4, $sgpr8, $vgpr0
332
333    $exec_lo = S_ANDN2_B32 $exec_lo, killed renamable $sgpr4, implicit-def $scc
334    S_CBRANCH_EXECNZ %bb.1, implicit $exec
335
336  bb.10:
337
338  bb.7:
339    S_CBRANCH_VCCNZ %bb.7, implicit undef $vcc
340    S_BRANCH %bb.8
341
342  bb.8:
343    SI_RETURN
344
345...
346
347---
348name:            machinesink_loop_sgpr_out_of_divergent_loop_postra
349tracksRegLiveness: true
350body:             |
351  ; GFX10-LABEL: name: machinesink_loop_sgpr_out_of_divergent_loop_postra
352  ; GFX10: bb.0:
353  ; GFX10-NEXT:   successors: %bb.1(0x80000000)
354  ; GFX10-NEXT:   liveins: $sgpr8, $sgpr9, $sgpr10
355  ; GFX10-NEXT: {{  $}}
356  ; GFX10-NEXT: bb.1:
357  ; GFX10-NEXT:   successors: %bb.7(0x40000000), %bb.2(0x40000000)
358  ; GFX10-NEXT:   liveins: $sgpr8, $sgpr9
359  ; GFX10-NEXT: {{  $}}
360  ; GFX10-NEXT:   $sgpr4 = S_AND_SAVEEXEC_B32 $sgpr9, implicit-def $exec, implicit-def $scc, implicit $exec
361  ; GFX10-NEXT:   renamable $sgpr4 = S_XOR_B32 $exec_lo, killed renamable $sgpr4, implicit-def dead $scc
362  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.7, implicit $exec
363  ; GFX10-NEXT: {{  $}}
364  ; GFX10-NEXT: bb.2:
365  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
366  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr8, $sgpr9
367  ; GFX10-NEXT: {{  $}}
368  ; GFX10-NEXT: bb.3:
369  ; GFX10-NEXT:   successors: %bb.5(0x40000000), %bb.4(0x40000000)
370  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr8, $sgpr9
371  ; GFX10-NEXT: {{  $}}
372  ; GFX10-NEXT:   $sgpr5 = S_AND_SAVEEXEC_B32 $sgpr9, implicit-def $exec, implicit-def $scc, implicit $exec
373  ; GFX10-NEXT:   renamable $sgpr5 = S_XOR_B32 $exec_lo, killed renamable $sgpr5, implicit-def dead $scc
374  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.5, implicit $exec
375  ; GFX10-NEXT:   S_BRANCH %bb.4
376  ; GFX10-NEXT: {{  $}}
377  ; GFX10-NEXT: bb.4:
378  ; GFX10-NEXT:   successors: %bb.5(0x80000000)
379  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr5, $sgpr8, $sgpr9
380  ; GFX10-NEXT: {{  $}}
381  ; GFX10-NEXT: bb.5:
382  ; GFX10-NEXT:   successors: %bb.3(0x40000000), %bb.6(0x40000000)
383  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr5, $sgpr8, $sgpr9
384  ; GFX10-NEXT: {{  $}}
385  ; GFX10-NEXT:   renamable $sgpr6 = S_ADD_I32 renamable $sgpr8, renamable $sgpr9, implicit-def dead $scc
386  ; GFX10-NEXT:   renamable $sgpr5 = S_AND_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
387  ; GFX10-NEXT:   renamable $sgpr5 = S_OR_B32 killed renamable $sgpr5, renamable $sgpr4, implicit-def $scc
388  ; GFX10-NEXT:   INLINEASM &"", 1 /* sideeffect attdialect */
389  ; GFX10-NEXT:   $exec_lo = S_ANDN2_B32 $exec_lo, renamable $sgpr5, implicit-def $scc
390  ; GFX10-NEXT:   S_CBRANCH_EXECNZ %bb.3, implicit $exec
391  ; GFX10-NEXT:   S_BRANCH %bb.6
392  ; GFX10-NEXT: {{  $}}
393  ; GFX10-NEXT: bb.6:
394  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
395  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr5, $sgpr6, $sgpr8, $sgpr9
396  ; GFX10-NEXT: {{  $}}
397  ; GFX10-NEXT:   $exec_lo = S_OR_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
398  ; GFX10-NEXT:   INLINEASM &"", 1 /* sideeffect attdialect */, implicit killed renamable $sgpr6
399  ; GFX10-NEXT:   S_BRANCH %bb.3
400  ; GFX10-NEXT: {{  $}}
401  ; GFX10-NEXT: bb.7:
402  ; GFX10-NEXT:   successors: %bb.1(0x40000000), %bb.8(0x40000000)
403  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr8, $sgpr9
404  ; GFX10-NEXT: {{  $}}
405  ; GFX10-NEXT:   $exec_lo = S_ANDN2_B32 $exec_lo, killed renamable $sgpr4, implicit-def $scc
406  ; GFX10-NEXT:   S_CBRANCH_EXECNZ %bb.1, implicit $exec
407  ; GFX10-NEXT: {{  $}}
408  ; GFX10-NEXT: bb.8:
409  ; GFX10-NEXT:   successors: %bb.9(0x80000000)
410  ; GFX10-NEXT: {{  $}}
411  ; GFX10-NEXT: bb.9:
412  ; GFX10-NEXT:   successors: %bb.9(0x40000000), %bb.10(0x40000000)
413  ; GFX10-NEXT: {{  $}}
414  ; GFX10-NEXT:   S_CBRANCH_VCCNZ %bb.9, implicit undef $vcc
415  ; GFX10-NEXT:   S_BRANCH %bb.10
416  ; GFX10-NEXT: {{  $}}
417  ; GFX10-NEXT: bb.10:
418  ; GFX10-NEXT:   SI_RETURN
419  bb.0:
420    liveins: $sgpr8, $sgpr9, $sgpr10
421
422
423  bb.1:
424    liveins: $sgpr8, $sgpr9
425
426    $sgpr4 = S_AND_SAVEEXEC_B32 $sgpr9, implicit-def $exec, implicit-def $scc, implicit $exec
427    renamable $sgpr4 = S_XOR_B32 $exec_lo, killed renamable $sgpr4, implicit-def dead $scc
428    S_CBRANCH_EXECZ %bb.6, implicit $exec
429
430  bb.9:
431    liveins: $sgpr4, $sgpr8, $sgpr9
432
433
434  bb.2:
435    liveins: $sgpr4, $sgpr8, $sgpr9
436
437    $sgpr5 = S_AND_SAVEEXEC_B32 $sgpr9, implicit-def $exec, implicit-def $scc, implicit $exec
438    renamable $sgpr5 = S_XOR_B32 $exec_lo, killed renamable $sgpr5, implicit-def dead $scc
439    S_CBRANCH_EXECZ %bb.4, implicit $exec
440    S_BRANCH %bb.3
441
442  bb.3:
443    liveins: $sgpr4, $sgpr5, $sgpr8, $sgpr9
444
445
446  bb.4:
447    liveins: $sgpr4, $sgpr5, $sgpr8, $sgpr9
448
449    renamable $sgpr6 = S_ADD_I32 renamable $sgpr8, renamable $sgpr9, implicit-def dead $scc
450    renamable $sgpr5 = S_AND_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
451    renamable $sgpr5 = S_OR_B32 killed renamable $sgpr5, renamable $sgpr4, implicit-def $scc
452    INLINEASM &"", 1 /* sideeffect attdialect */
453    $exec_lo = S_ANDN2_B32 $exec_lo, renamable $sgpr5, implicit-def $scc
454    S_CBRANCH_EXECNZ %bb.2, implicit $exec
455    S_BRANCH %bb.5
456
457  bb.5:
458    liveins: $sgpr4, $sgpr5, $sgpr6, $sgpr8, $sgpr9
459
460    $exec_lo = S_OR_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
461    INLINEASM &"", 1 /* sideeffect attdialect */, implicit killed renamable $sgpr6
462    S_BRANCH %bb.2
463
464  bb.6:
465    liveins: $sgpr4, $sgpr8, $sgpr9
466
467    $exec_lo = S_ANDN2_B32 $exec_lo, killed renamable $sgpr4, implicit-def $scc
468    S_CBRANCH_EXECNZ %bb.1, implicit $exec
469
470  bb.10:
471
472  bb.7:
473    S_CBRANCH_VCCNZ %bb.7, implicit undef $vcc
474    S_BRANCH %bb.8
475
476  bb.8:
477    SI_RETURN
478
479...
480