File: sink-after-control-flow-postra.mir

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (487 lines) | stat: -rw-r--r-- 17,796 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass=postra-machine-sink -mattr=-wavefrontsize32,+wavefrontsize64 -o - %s | FileCheck -check-prefixes=GFX10 %s

# Ensure that PostRA Machine Sink does not sink instructions
# past block prologues which would overwrite their uses.

---
# Make sure COPY to $sgpr9 is not sunk after S_AND_SAVEEXEC_B64.
name:            _amdgpu_ps_main
alignment:       1
tracksRegLiveness: true
registers:       []
liveins:
  - { reg: '$sgpr4', virtual-reg: '' }
body:             |
  ; GFX10-LABEL: name: _amdgpu_ps_main
  ; GFX10: bb.0:
  ; GFX10-NEXT:   successors: %bb.1(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr4
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   renamable $sgpr9 = COPY $sgpr4
  ; GFX10-NEXT:   renamable $vgpr5 = IMPLICIT_DEF
  ; GFX10-NEXT:   renamable $sgpr0_sgpr1 = nofpexcept V_CMP_NGT_F32_e64 0, 0, 0, $vgpr5, 0, implicit $mode, implicit $exec
  ; GFX10-NEXT:   S_BRANCH %bb.1
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.1:
  ; GFX10-NEXT:   successors: %bb.2(0x40000000), %bb.3(0x40000000)
  ; GFX10-NEXT:   liveins: $sgpr6, $sgpr9, $sgpr0_sgpr1
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $sgpr4_sgpr5 = S_AND_SAVEEXEC_B64 $sgpr0_sgpr1, implicit-def $exec, implicit-def $scc, implicit $exec
  ; GFX10-NEXT:   renamable $sgpr14_sgpr15 = S_XOR_B64 $exec, killed renamable $sgpr4_sgpr5, implicit-def dead $scc
  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.3, implicit $exec
  ; GFX10-NEXT:   S_BRANCH %bb.2
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.2:
  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr6
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $m0 = COPY killed renamable $sgpr6
  ; GFX10-NEXT:   S_BRANCH %bb.3
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.3:
  ; GFX10-NEXT:   S_ENDPGM 0
  bb.0:
    successors: %bb.1(0x80000000)
    liveins: $sgpr4

    renamable $sgpr9 = COPY $sgpr4
    renamable $vgpr5 = IMPLICIT_DEF
    renamable $sgpr0_sgpr1 = nofpexcept V_CMP_NGT_F32_e64 0, 0, 0, $vgpr5, 0, implicit $mode, implicit $exec
    S_BRANCH %bb.1

  bb.1:
    successors: %bb.2(0x40000000), %bb.8(0x40000000)
    liveins: $sgpr6, $sgpr9, $sgpr0_sgpr1

    $sgpr4_sgpr5 = S_AND_SAVEEXEC_B64 $sgpr0_sgpr1, implicit-def $exec, implicit-def $scc, implicit $exec
    renamable $sgpr14_sgpr15 = S_XOR_B64 $exec, killed renamable $sgpr4_sgpr5, implicit-def dead $scc
    S_CBRANCH_EXECZ %bb.8, implicit $exec
    S_BRANCH %bb.2

  bb.2:
    successors: %bb.8(0x40000000)
    liveins: $sgpr6

    $m0 = COPY killed renamable $sgpr6
    S_BRANCH %bb.8

  bb.8:

    S_ENDPGM 0

...
---
# Make sure COPY to $sgpr0_sgpr1 is not sunk after S_AND_SAVEEXEC_B64.
name:            _amdgpu_ps_main2
alignment:       1
tracksRegLiveness: true
registers:       []
liveins:
  - { reg: '$sgpr4', virtual-reg: '' }
  - { reg: '$sgpr6_sgpr7', virtual-reg: '' }
body:             |
  ; GFX10-LABEL: name: _amdgpu_ps_main2
  ; GFX10: bb.0:
  ; GFX10-NEXT:   successors: %bb.1(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr6_sgpr7
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   renamable $sgpr9 = COPY $sgpr4
  ; GFX10-NEXT:   renamable $vgpr5 = IMPLICIT_DEF
  ; GFX10-NEXT:   renamable $sgpr0_sgpr1 = COPY $sgpr6_sgpr7
  ; GFX10-NEXT:   S_BRANCH %bb.1
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.1:
  ; GFX10-NEXT:   successors: %bb.2(0x40000000), %bb.3(0x40000000)
  ; GFX10-NEXT:   liveins: $sgpr6, $sgpr9, $sgpr0_sgpr1
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $sgpr4_sgpr5 = S_AND_SAVEEXEC_B64 $sgpr0_sgpr1, implicit-def $exec, implicit-def $scc, implicit $exec
  ; GFX10-NEXT:   renamable $sgpr14_sgpr15 = S_XOR_B64 $exec, killed renamable $sgpr4_sgpr5, implicit-def dead $scc
  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.3, implicit $exec
  ; GFX10-NEXT:   S_BRANCH %bb.2
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.2:
  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr6
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $m0 = COPY killed renamable $sgpr6
  ; GFX10-NEXT:   S_BRANCH %bb.3
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.3:
  ; GFX10-NEXT:   S_ENDPGM 0
  bb.0:
    successors: %bb.1(0x80000000)
    liveins: $sgpr4, $sgpr6_sgpr7

    renamable $sgpr9 = COPY $sgpr4
    renamable $vgpr5 = IMPLICIT_DEF
    renamable $sgpr0_sgpr1 = COPY $sgpr6_sgpr7
    S_BRANCH %bb.1

  bb.1:
    successors: %bb.2(0x40000000), %bb.8(0x40000000)
    liveins: $sgpr6, $sgpr9, $sgpr0_sgpr1

    $sgpr4_sgpr5 = S_AND_SAVEEXEC_B64 $sgpr0_sgpr1, implicit-def $exec, implicit-def $scc, implicit $exec
    renamable $sgpr14_sgpr15 = S_XOR_B64 $exec, killed renamable $sgpr4_sgpr5, implicit-def dead $scc
    S_CBRANCH_EXECZ %bb.8, implicit $exec
    S_BRANCH %bb.2

  bb.2:
    successors: %bb.8(0x40000000)
    liveins: $sgpr6

    $m0 = COPY killed renamable $sgpr6
    S_BRANCH %bb.8

  bb.8:

    S_ENDPGM 0

...
---
# Make sure COPY to $sgpr2_sgpr3 is not sunk after S_AND_SAVEEXEC_B32.
name:            _amdgpu_ps_main3
alignment:       1
tracksRegLiveness: true
registers:       []
liveins:
  - { reg: '$sgpr6_sgpr7', virtual-reg: '' }
  - { reg: '$sgpr8', virtual-reg: '' }
body:             |
  ; GFX10-LABEL: name: _amdgpu_ps_main3
  ; GFX10: bb.0:
  ; GFX10-NEXT:   successors: %bb.1(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr6_sgpr7, $sgpr8
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   renamable $vgpr5 = IMPLICIT_DEF
  ; GFX10-NEXT:   renamable $sgpr0_sgpr1 = IMPLICIT_DEF
  ; GFX10-NEXT:   renamable $sgpr2_sgpr3 = COPY $sgpr6_sgpr7
  ; GFX10-NEXT:   S_BRANCH %bb.1
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.1:
  ; GFX10-NEXT:   successors: %bb.2(0x40000000), %bb.3(0x40000000)
  ; GFX10-NEXT:   liveins: $sgpr6, $sgpr8, $sgpr0_sgpr1, $sgpr2_sgpr3
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $sgpr2 = S_AND_SAVEEXEC_B32 $sgpr8, implicit-def $exec, implicit-def $scc, implicit $exec
  ; GFX10-NEXT:   $sgpr4_sgpr5 = S_AND_SAVEEXEC_B64 $sgpr0_sgpr1, implicit-def $exec, implicit-def $scc, implicit $exec
  ; GFX10-NEXT:   renamable $sgpr14_sgpr15 = S_XOR_B64 $exec, killed renamable $sgpr4_sgpr5, implicit-def dead $scc
  ; GFX10-NEXT:   S_NOP 0, implicit $sgpr2_sgpr3
  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.3, implicit $exec
  ; GFX10-NEXT:   S_BRANCH %bb.2
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.2:
  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr6
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $m0 = COPY killed renamable $sgpr6
  ; GFX10-NEXT:   S_BRANCH %bb.3
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.3:
  ; GFX10-NEXT:   S_ENDPGM 0
  bb.0:
    successors: %bb.1(0x80000000)
    liveins: $sgpr6_sgpr7, $sgpr8

    renamable $vgpr5 = IMPLICIT_DEF
    renamable $sgpr0_sgpr1 = IMPLICIT_DEF
    renamable $sgpr2_sgpr3 = COPY $sgpr6_sgpr7
    S_BRANCH %bb.1

  bb.1:
    successors: %bb.2(0x40000000), %bb.8(0x40000000)
    liveins: $sgpr6, $sgpr8, $sgpr0_sgpr1, $sgpr2_sgpr3

    $sgpr2 = S_AND_SAVEEXEC_B32 $sgpr8, implicit-def $exec, implicit-def $scc, implicit $exec
    $sgpr4_sgpr5 = S_AND_SAVEEXEC_B64 $sgpr0_sgpr1, implicit-def $exec, implicit-def $scc, implicit $exec
    renamable $sgpr14_sgpr15 = S_XOR_B64 $exec, killed renamable $sgpr4_sgpr5, implicit-def dead $scc
    S_NOP 0, implicit $sgpr2_sgpr3
    S_CBRANCH_EXECZ %bb.8, implicit $exec
    S_BRANCH %bb.2

  bb.2:
    successors: %bb.8(0x40000000)
    liveins: $sgpr6

    $m0 = COPY killed renamable $sgpr6
    S_BRANCH %bb.8

  bb.8:

    S_ENDPGM 0

...

---
name:            machinesink_loop_vgpr_out_of_divergent_loop_postra
tracksRegLiveness: true
body:             |
  ; GFX10-LABEL: name: machinesink_loop_vgpr_out_of_divergent_loop_postra
  ; GFX10: bb.0:
  ; GFX10-NEXT:   successors: %bb.1(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr8, $vgpr0, $vgpr1
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.1:
  ; GFX10-NEXT:   successors: %bb.7(0x40000000), %bb.2(0x40000000)
  ; GFX10-NEXT:   liveins: $sgpr8, $vgpr0
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $sgpr4 = S_AND_SAVEEXEC_B32 $sgpr8, implicit-def $exec, implicit-def $scc, implicit $exec
  ; GFX10-NEXT:   renamable $sgpr4 = S_XOR_B32 $exec_lo, killed renamable $sgpr4, implicit-def dead $scc
  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.7, implicit $exec
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.2:
  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr8, $vgpr0
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.3:
  ; GFX10-NEXT:   successors: %bb.5(0x40000000), %bb.4(0x40000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr8, $vgpr0
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $sgpr5 = S_AND_SAVEEXEC_B32 $sgpr8, implicit-def $exec, implicit-def $scc, implicit $exec
  ; GFX10-NEXT:   renamable $sgpr5 = S_XOR_B32 $exec_lo, killed renamable $sgpr5, implicit-def dead $scc
  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.5, implicit $exec
  ; GFX10-NEXT:   S_BRANCH %bb.4
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.4:
  ; GFX10-NEXT:   successors: %bb.5(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr5, $sgpr8, $vgpr0
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.5:
  ; GFX10-NEXT:   successors: %bb.3(0x40000000), %bb.6(0x40000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr5, $sgpr8, $vgpr0
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   renamable $vgpr1 = V_ADD_U32_e64 $sgpr8, $vgpr0, 0, implicit $exec
  ; GFX10-NEXT:   renamable $sgpr5 = S_AND_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
  ; GFX10-NEXT:   renamable $sgpr5 = S_OR_B32 killed renamable $sgpr5, renamable $sgpr4, implicit-def $scc
  ; GFX10-NEXT:   $exec_lo = S_ANDN2_B32 $exec_lo, renamable $sgpr5, implicit-def $scc
  ; GFX10-NEXT:   S_CBRANCH_EXECNZ %bb.3, implicit $exec
  ; GFX10-NEXT:   S_BRANCH %bb.6
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.6:
  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr5, $sgpr8, $vgpr0, $vgpr1
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $exec_lo = S_OR_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
  ; GFX10-NEXT:   INLINEASM &"", 1 /* sideeffect attdialect */, implicit killed renamable $vgpr1
  ; GFX10-NEXT:   S_BRANCH %bb.3
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.7:
  ; GFX10-NEXT:   successors: %bb.1(0x40000000), %bb.8(0x40000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr8, $vgpr0
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $exec_lo = S_ANDN2_B32 $exec_lo, killed renamable $sgpr4, implicit-def $scc
  ; GFX10-NEXT:   S_CBRANCH_EXECNZ %bb.1, implicit $exec
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.8:
  ; GFX10-NEXT:   successors: %bb.9(0x80000000)
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.9:
  ; GFX10-NEXT:   successors: %bb.9(0x40000000), %bb.10(0x40000000)
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   S_CBRANCH_VCCNZ %bb.9, implicit undef $vcc
  ; GFX10-NEXT:   S_BRANCH %bb.10
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.10:
  ; GFX10-NEXT:   SI_RETURN
  bb.0:
    liveins: $sgpr8, $vgpr0, $vgpr1

  bb.1:
    liveins: $sgpr8, $vgpr0

    $sgpr4 = S_AND_SAVEEXEC_B32 $sgpr8, implicit-def $exec, implicit-def $scc, implicit $exec
    renamable $sgpr4 = S_XOR_B32 $exec_lo, killed renamable $sgpr4, implicit-def dead $scc
    S_CBRANCH_EXECZ %bb.6, implicit $exec

  bb.9:
    liveins: $sgpr4, $sgpr8, $vgpr0


  bb.2:
    liveins: $sgpr4, $sgpr8, $vgpr0

    $sgpr5 = S_AND_SAVEEXEC_B32 $sgpr8, implicit-def $exec, implicit-def $scc, implicit $exec
    renamable $sgpr5 = S_XOR_B32 $exec_lo, killed renamable $sgpr5, implicit-def dead $scc
    S_CBRANCH_EXECZ %bb.4, implicit $exec
    S_BRANCH %bb.3

  bb.3:
    liveins: $sgpr4, $sgpr5, $sgpr8, $vgpr0


  bb.4:
    liveins: $sgpr4, $sgpr5, $sgpr8, $vgpr0

    renamable $vgpr1 = V_ADD_U32_e64 $sgpr8, $vgpr0, 0, implicit $exec
    renamable $sgpr5 = S_AND_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
    renamable $sgpr5 = S_OR_B32 killed renamable $sgpr5, renamable $sgpr4, implicit-def $scc

    $exec_lo = S_ANDN2_B32 $exec_lo, renamable $sgpr5, implicit-def $scc
    S_CBRANCH_EXECNZ %bb.2, implicit $exec
    S_BRANCH %bb.5

  bb.5:
    liveins: $sgpr4, $sgpr5, $sgpr8, $vgpr0, $vgpr1

    $exec_lo = S_OR_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
    INLINEASM &"", 1 /* sideeffect attdialect */, implicit killed renamable $vgpr1
    S_BRANCH %bb.2

  bb.6:
    liveins: $sgpr4, $sgpr8, $vgpr0

    $exec_lo = S_ANDN2_B32 $exec_lo, killed renamable $sgpr4, implicit-def $scc
    S_CBRANCH_EXECNZ %bb.1, implicit $exec

  bb.10:

  bb.7:
    S_CBRANCH_VCCNZ %bb.7, implicit undef $vcc
    S_BRANCH %bb.8

  bb.8:
    SI_RETURN

...

---
name:            machinesink_loop_sgpr_out_of_divergent_loop_postra
tracksRegLiveness: true
body:             |
  ; GFX10-LABEL: name: machinesink_loop_sgpr_out_of_divergent_loop_postra
  ; GFX10: bb.0:
  ; GFX10-NEXT:   successors: %bb.1(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr8, $sgpr9, $sgpr10
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.1:
  ; GFX10-NEXT:   successors: %bb.7(0x40000000), %bb.2(0x40000000)
  ; GFX10-NEXT:   liveins: $sgpr8, $sgpr9
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $sgpr4 = S_AND_SAVEEXEC_B32 $sgpr9, implicit-def $exec, implicit-def $scc, implicit $exec
  ; GFX10-NEXT:   renamable $sgpr4 = S_XOR_B32 $exec_lo, killed renamable $sgpr4, implicit-def dead $scc
  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.7, implicit $exec
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.2:
  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr8, $sgpr9
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.3:
  ; GFX10-NEXT:   successors: %bb.5(0x40000000), %bb.4(0x40000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr8, $sgpr9
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $sgpr5 = S_AND_SAVEEXEC_B32 $sgpr9, implicit-def $exec, implicit-def $scc, implicit $exec
  ; GFX10-NEXT:   renamable $sgpr5 = S_XOR_B32 $exec_lo, killed renamable $sgpr5, implicit-def dead $scc
  ; GFX10-NEXT:   S_CBRANCH_EXECZ %bb.5, implicit $exec
  ; GFX10-NEXT:   S_BRANCH %bb.4
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.4:
  ; GFX10-NEXT:   successors: %bb.5(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr5, $sgpr8, $sgpr9
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.5:
  ; GFX10-NEXT:   successors: %bb.3(0x40000000), %bb.6(0x40000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr5, $sgpr8, $sgpr9
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   renamable $sgpr6 = S_ADD_I32 renamable $sgpr8, renamable $sgpr9, implicit-def dead $scc
  ; GFX10-NEXT:   renamable $sgpr5 = S_AND_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
  ; GFX10-NEXT:   renamable $sgpr5 = S_OR_B32 killed renamable $sgpr5, renamable $sgpr4, implicit-def $scc
  ; GFX10-NEXT:   INLINEASM &"", 1 /* sideeffect attdialect */
  ; GFX10-NEXT:   $exec_lo = S_ANDN2_B32 $exec_lo, renamable $sgpr5, implicit-def $scc
  ; GFX10-NEXT:   S_CBRANCH_EXECNZ %bb.3, implicit $exec
  ; GFX10-NEXT:   S_BRANCH %bb.6
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.6:
  ; GFX10-NEXT:   successors: %bb.3(0x80000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr5, $sgpr6, $sgpr8, $sgpr9
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $exec_lo = S_OR_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
  ; GFX10-NEXT:   INLINEASM &"", 1 /* sideeffect attdialect */, implicit killed renamable $sgpr6
  ; GFX10-NEXT:   S_BRANCH %bb.3
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.7:
  ; GFX10-NEXT:   successors: %bb.1(0x40000000), %bb.8(0x40000000)
  ; GFX10-NEXT:   liveins: $sgpr4, $sgpr8, $sgpr9
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   $exec_lo = S_ANDN2_B32 $exec_lo, killed renamable $sgpr4, implicit-def $scc
  ; GFX10-NEXT:   S_CBRANCH_EXECNZ %bb.1, implicit $exec
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.8:
  ; GFX10-NEXT:   successors: %bb.9(0x80000000)
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.9:
  ; GFX10-NEXT:   successors: %bb.9(0x40000000), %bb.10(0x40000000)
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT:   S_CBRANCH_VCCNZ %bb.9, implicit undef $vcc
  ; GFX10-NEXT:   S_BRANCH %bb.10
  ; GFX10-NEXT: {{  $}}
  ; GFX10-NEXT: bb.10:
  ; GFX10-NEXT:   SI_RETURN
  bb.0:
    liveins: $sgpr8, $sgpr9, $sgpr10


  bb.1:
    liveins: $sgpr8, $sgpr9

    $sgpr4 = S_AND_SAVEEXEC_B32 $sgpr9, implicit-def $exec, implicit-def $scc, implicit $exec
    renamable $sgpr4 = S_XOR_B32 $exec_lo, killed renamable $sgpr4, implicit-def dead $scc
    S_CBRANCH_EXECZ %bb.6, implicit $exec

  bb.9:
    liveins: $sgpr4, $sgpr8, $sgpr9


  bb.2:
    liveins: $sgpr4, $sgpr8, $sgpr9

    $sgpr5 = S_AND_SAVEEXEC_B32 $sgpr9, implicit-def $exec, implicit-def $scc, implicit $exec
    renamable $sgpr5 = S_XOR_B32 $exec_lo, killed renamable $sgpr5, implicit-def dead $scc
    S_CBRANCH_EXECZ %bb.4, implicit $exec
    S_BRANCH %bb.3

  bb.3:
    liveins: $sgpr4, $sgpr5, $sgpr8, $sgpr9


  bb.4:
    liveins: $sgpr4, $sgpr5, $sgpr8, $sgpr9

    renamable $sgpr6 = S_ADD_I32 renamable $sgpr8, renamable $sgpr9, implicit-def dead $scc
    renamable $sgpr5 = S_AND_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
    renamable $sgpr5 = S_OR_B32 killed renamable $sgpr5, renamable $sgpr4, implicit-def $scc
    INLINEASM &"", 1 /* sideeffect attdialect */
    $exec_lo = S_ANDN2_B32 $exec_lo, renamable $sgpr5, implicit-def $scc
    S_CBRANCH_EXECNZ %bb.2, implicit $exec
    S_BRANCH %bb.5

  bb.5:
    liveins: $sgpr4, $sgpr5, $sgpr6, $sgpr8, $sgpr9

    $exec_lo = S_OR_B32 $exec_lo, killed renamable $sgpr5, implicit-def $scc
    INLINEASM &"", 1 /* sideeffect attdialect */, implicit killed renamable $sgpr6
    S_BRANCH %bb.2

  bb.6:
    liveins: $sgpr4, $sgpr8, $sgpr9

    $exec_lo = S_ANDN2_B32 $exec_lo, killed renamable $sgpr4, implicit-def $scc
    S_CBRANCH_EXECNZ %bb.1, implicit $exec

  bb.10:

  bb.7:
    S_CBRANCH_VCCNZ %bb.7, implicit undef $vcc
    S_BRANCH %bb.8

  bb.8:
    SI_RETURN

...