xref: /llvm-project/llvm/test/CodeGen/AMDGPU/si-lower-control-flow.mir (revision e7900e695e7dfb36be8651d914a31f42a5d6c634)
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -mtriple=amdgcn-amd-amdhsa -run-pass=liveintervals,si-lower-control-flow,si-lower-control-flow -verify-machineinstrs %s -o - | FileCheck -check-prefixes=GCN %s
3
4# Check that assert is not triggered
5
6---
7name: si-lower-control-flow
8body: |
9  bb.0:
10    ; GCN-LABEL: name: si-lower-control-flow
11    ; GCN: [[COPY:%[0-9]+]]:sgpr_64 = COPY $sgpr4_sgpr5
12    ; GCN-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 16, 0
13    ; GCN-NEXT: [[S_AND_B32_:%[0-9]+]]:sreg_32_xm0 = S_AND_B32 [[S_LOAD_DWORD_IMM]], 255, implicit-def $scc
14    ; GCN-NEXT: dead [[S_AND_B32_1:%[0-9]+]]:sreg_32_xm0 = S_AND_B32 65535, [[S_AND_B32_]], implicit-def $scc
15    ; GCN-NEXT: S_ENDPGM 0
16    %0:sgpr_64 = COPY $sgpr4_sgpr5
17    %1:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM %0, 16, 0
18    %2:sreg_32_xm0 = S_AND_B32 %1, 255, implicit-def $scc
19    %3:sreg_32_xm0 = S_AND_B32 65535, %2, implicit-def $scc
20    S_ENDPGM 0
21...
22
23---
24name: preserve_undef_flag_si_if_src
25tracksRegLiveness: true
26body:             |
27  ; GCN-LABEL: name: preserve_undef_flag_si_if_src
28  ; GCN: bb.0:
29  ; GCN-NEXT:   successors: %bb.1(0x40000000), %bb.2(0x40000000)
30  ; GCN-NEXT: {{  $}}
31  ; GCN-NEXT:   [[COPY:%[0-9]+]]:sreg_64 = COPY $exec, implicit-def $exec
32  ; GCN-NEXT:   [[S_AND_B64_:%[0-9]+]]:sreg_64 = S_AND_B64 [[COPY]], undef %1:sreg_64, implicit-def dead $scc
33  ; GCN-NEXT:   dead [[S_XOR_B64_:%[0-9]+]]:sreg_64 = S_XOR_B64 [[S_AND_B64_]], [[COPY]], implicit-def dead $scc
34  ; GCN-NEXT:   $exec = S_MOV_B64_term [[S_AND_B64_]]
35  ; GCN-NEXT:   S_CBRANCH_EXECZ %bb.2, implicit $exec
36  ; GCN-NEXT:   S_BRANCH %bb.1
37  ; GCN-NEXT: {{  $}}
38  ; GCN-NEXT: bb.1:
39  ; GCN-NEXT:   successors: %bb.2(0x80000000)
40  ; GCN-NEXT: {{  $}}
41  ; GCN-NEXT: bb.2:
42  ; GCN-NEXT:   S_ENDPGM 0
43  bb.0:
44    successors: %bb.1, %bb.2
45
46    %1:sreg_64 = SI_IF undef %0:sreg_64, %bb.2, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
47    S_BRANCH %bb.1
48
49  bb.1:
50    successors: %bb.2
51
52  bb.2:
53    S_ENDPGM 0
54
55...
56
57# We need to split the block for SI_END_CF, but
58---
59name: end_cf_split_block_end
60tracksRegLiveness: true
61body:             |
62  ; GCN-LABEL: name: end_cf_split_block_end
63  ; GCN: bb.0:
64  ; GCN-NEXT:   successors: %bb.1(0x40000000), %bb.2(0x40000000)
65  ; GCN-NEXT:   liveins: $vgpr0, $vgpr1, $sgpr30_sgpr31
66  ; GCN-NEXT: {{  $}}
67  ; GCN-NEXT:   [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
68  ; GCN-NEXT:   [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
69  ; GCN-NEXT:   [[V_CMP_EQ_U32_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U32_e64 [[COPY]], [[COPY1]], implicit $exec
70  ; GCN-NEXT:   [[COPY2:%[0-9]+]]:sreg_64 = COPY $exec, implicit-def $exec
71  ; GCN-NEXT:   [[S_AND_B64_:%[0-9]+]]:sreg_64 = S_AND_B64 [[COPY2]], [[V_CMP_EQ_U32_e64_]], implicit-def dead $scc
72  ; GCN-NEXT:   [[S_XOR_B64_:%[0-9]+]]:sreg_64_xexec = S_XOR_B64 [[S_AND_B64_]], [[COPY2]], implicit-def dead $scc
73  ; GCN-NEXT:   $exec = S_MOV_B64_term [[S_AND_B64_]]
74  ; GCN-NEXT:   [[S_MOV_B64_term:%[0-9]+]]:sreg_64_xexec = S_MOV_B64_term [[S_XOR_B64_]], implicit $exec
75  ; GCN-NEXT:   S_CBRANCH_EXECZ %bb.1, implicit $exec
76  ; GCN-NEXT:   S_BRANCH %bb.2
77  ; GCN-NEXT: {{  $}}
78  ; GCN-NEXT: bb.1:
79  ; GCN-NEXT:   successors: %bb.2(0x80000000)
80  ; GCN-NEXT: {{  $}}
81  ; GCN-NEXT:   [[COPY3:%[0-9]+]]:sreg_64_xexec = COPY [[S_MOV_B64_term]]
82  ; GCN-NEXT:   $exec = S_OR_B64_term $exec, [[COPY3]], implicit-def $scc
83  ; GCN-NEXT: {{  $}}
84  ; GCN-NEXT: bb.2:
85  ; GCN-NEXT:   S_ENDPGM 0
86  bb.0:
87    liveins: $vgpr0, $vgpr1, $sgpr30_sgpr31
88
89    %0:vgpr_32 = COPY killed $vgpr0
90    %1:vgpr_32 = COPY killed $vgpr1
91    %3:sreg_64_xexec = V_CMP_EQ_U32_e64 killed %0, killed %1, implicit $exec
92    %4:sreg_64_xexec = SI_IF %3, %bb.1, implicit-def $exec, implicit-def dead $scc, implicit $exec
93    %5:sreg_64_xexec = S_MOV_B64_term %4, implicit $exec
94    S_BRANCH %bb.2
95
96  bb.1:
97    successors: %bb.2
98
99    %6:sreg_64_xexec = COPY %5
100    SI_END_CF killed %6, implicit-def $exec, implicit-def dead $scc, implicit $exec
101
102  bb.2:
103    S_ENDPGM 0
104
105...
106
107---
108name: end_cf_split_block_physreg_livein
109tracksRegLiveness: true
110body:             |
111  ; GCN-LABEL: name: end_cf_split_block_physreg_livein
112  ; GCN: bb.0:
113  ; GCN-NEXT:   successors: %bb.1(0x40000000), %bb.2(0x40000000)
114  ; GCN-NEXT:   liveins: $vgpr0, $vgpr1, $sgpr30_sgpr31, $sgpr4_sgpr5
115  ; GCN-NEXT: {{  $}}
116  ; GCN-NEXT:   [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
117  ; GCN-NEXT:   [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
118  ; GCN-NEXT:   [[V_CMP_EQ_U32_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U32_e64 [[COPY]], [[COPY1]], implicit $exec
119  ; GCN-NEXT:   [[COPY2:%[0-9]+]]:sreg_64 = COPY $exec, implicit-def $exec
120  ; GCN-NEXT:   [[S_AND_B64_:%[0-9]+]]:sreg_64 = S_AND_B64 [[COPY2]], [[V_CMP_EQ_U32_e64_]], implicit-def dead $scc
121  ; GCN-NEXT:   [[S_XOR_B64_:%[0-9]+]]:sreg_64_xexec = S_XOR_B64 [[S_AND_B64_]], [[COPY2]], implicit-def dead $scc
122  ; GCN-NEXT:   $exec = S_MOV_B64_term [[S_AND_B64_]]
123  ; GCN-NEXT:   [[S_MOV_B64_term:%[0-9]+]]:sreg_64_xexec = S_MOV_B64_term [[S_XOR_B64_]], implicit $exec
124  ; GCN-NEXT:   S_CBRANCH_EXECZ %bb.1, implicit $exec
125  ; GCN-NEXT:   S_BRANCH %bb.2
126  ; GCN-NEXT: {{  $}}
127  ; GCN-NEXT: bb.1:
128  ; GCN-NEXT:   successors: %bb.3(0x80000000)
129  ; GCN-NEXT:   liveins: $vgpr0, $sgpr4_sgpr5
130  ; GCN-NEXT: {{  $}}
131  ; GCN-NEXT:   [[COPY3:%[0-9]+]]:sreg_64_xexec = COPY [[S_MOV_B64_term]]
132  ; GCN-NEXT:   S_NOP 0
133  ; GCN-NEXT:   $exec = S_OR_B64_term $exec, [[COPY3]], implicit-def $scc
134  ; GCN-NEXT: {{  $}}
135  ; GCN-NEXT: bb.3:
136  ; GCN-NEXT:   successors: %bb.2(0x80000000)
137  ; GCN-NEXT:   liveins: $vgpr0, $sgpr4_sgpr5
138  ; GCN-NEXT: {{  $}}
139  ; GCN-NEXT:   S_SLEEP 3
140  ; GCN-NEXT:   S_NOP 0, implicit $vgpr0, implicit $sgpr4_sgpr5
141  ; GCN-NEXT: {{  $}}
142  ; GCN-NEXT: bb.2:
143  ; GCN-NEXT:   S_ENDPGM 0
144  bb.0:
145    liveins: $vgpr0, $vgpr1, $sgpr30_sgpr31, $sgpr4_sgpr5
146
147    %0:vgpr_32 = COPY killed $vgpr0
148    %1:vgpr_32 = COPY killed $vgpr1
149    %3:sreg_64_xexec = V_CMP_EQ_U32_e64 killed %0, killed %1, implicit $exec
150    %4:sreg_64_xexec = SI_IF %3, %bb.1, implicit-def $exec, implicit-def dead $scc, implicit $exec
151    %5:sreg_64_xexec = S_MOV_B64_term %4, implicit $exec
152    S_BRANCH %bb.2
153
154  bb.1:
155    successors: %bb.2
156    liveins: $vgpr0, $sgpr4_sgpr5
157
158    %6:sreg_64_xexec = COPY %5
159    S_NOP 0
160    SI_END_CF killed %6, implicit-def $exec, implicit-def dead $scc, implicit $exec
161    S_SLEEP 3
162    S_NOP 0, implicit $vgpr0, implicit $sgpr4_sgpr5
163
164  bb.2:
165    S_ENDPGM 0
166
167...
168
169---
170name: end_cf_split_block_physreg_livein_liveout
171tracksRegLiveness: true
172body:             |
173  ; GCN-LABEL: name: end_cf_split_block_physreg_livein_liveout
174  ; GCN: bb.0:
175  ; GCN-NEXT:   successors: %bb.1(0x40000000), %bb.2(0x40000000)
176  ; GCN-NEXT:   liveins: $vgpr0, $vgpr1, $sgpr30_sgpr31, $sgpr4_sgpr5, $sgpr8_sgpr9_sgpr10_sgpr11:0x0000000000000003
177  ; GCN-NEXT: {{  $}}
178  ; GCN-NEXT:   [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
179  ; GCN-NEXT:   [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
180  ; GCN-NEXT:   [[V_CMP_EQ_U32_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U32_e64 [[COPY]], [[COPY1]], implicit $exec
181  ; GCN-NEXT:   [[COPY2:%[0-9]+]]:sreg_64 = COPY $exec, implicit-def $exec
182  ; GCN-NEXT:   [[S_AND_B64_:%[0-9]+]]:sreg_64 = S_AND_B64 [[COPY2]], [[V_CMP_EQ_U32_e64_]], implicit-def dead $scc
183  ; GCN-NEXT:   [[S_XOR_B64_:%[0-9]+]]:sreg_64_xexec = S_XOR_B64 [[S_AND_B64_]], [[COPY2]], implicit-def dead $scc
184  ; GCN-NEXT:   $exec = S_MOV_B64_term [[S_AND_B64_]]
185  ; GCN-NEXT:   [[S_MOV_B64_term:%[0-9]+]]:sreg_64_xexec = S_MOV_B64_term [[S_XOR_B64_]], implicit $exec
186  ; GCN-NEXT:   S_CBRANCH_EXECZ %bb.1, implicit $exec
187  ; GCN-NEXT:   S_BRANCH %bb.2
188  ; GCN-NEXT: {{  $}}
189  ; GCN-NEXT: bb.1:
190  ; GCN-NEXT:   successors: %bb.3(0x80000000)
191  ; GCN-NEXT:   liveins: $vgpr0, $sgpr4_sgpr5, $sgpr8_sgpr9_sgpr10_sgpr11:0x0000000000000003
192  ; GCN-NEXT: {{  $}}
193  ; GCN-NEXT:   [[COPY3:%[0-9]+]]:sreg_64_xexec = COPY [[S_MOV_B64_term]]
194  ; GCN-NEXT:   $exec = S_OR_B64_term $exec, [[COPY3]], implicit-def $scc
195  ; GCN-NEXT: {{  $}}
196  ; GCN-NEXT: bb.3:
197  ; GCN-NEXT:   successors: %bb.2(0x80000000)
198  ; GCN-NEXT:   liveins: $vgpr0, $sgpr4_sgpr5, $sgpr8_sgpr9_sgpr10
199  ; GCN-NEXT: {{  $}}
200  ; GCN-NEXT:   S_SLEEP 3
201  ; GCN-NEXT:   S_NOP 0
202  ; GCN-NEXT: {{  $}}
203  ; GCN-NEXT: bb.2:
204  ; GCN-NEXT:   liveins: $vgpr0, $sgpr4_sgpr5, $sgpr8_sgpr9_sgpr10_sgpr11:0x0000000000000003
205  ; GCN-NEXT: {{  $}}
206  ; GCN-NEXT:   S_ENDPGM 0, implicit $vgpr0, implicit $sgpr4_sgpr5, implicit $sgpr8_sgpr9_sgpr10_sgpr11
207  bb.0:
208    liveins: $vgpr0, $vgpr1, $sgpr30_sgpr31, $sgpr4_sgpr5, $sgpr8_sgpr9_sgpr10_sgpr11:0x00000003
209
210    %0:vgpr_32 = COPY killed $vgpr0
211    %1:vgpr_32 = COPY killed $vgpr1
212    %3:sreg_64_xexec = V_CMP_EQ_U32_e64 killed %0, killed %1, implicit $exec
213    %4:sreg_64_xexec = SI_IF %3, %bb.1, implicit-def $exec, implicit-def dead $scc, implicit $exec
214    %5:sreg_64_xexec = S_MOV_B64_term %4, implicit $exec
215    S_BRANCH %bb.2
216
217  bb.1:
218    successors: %bb.2
219    liveins: $vgpr0, $sgpr4_sgpr5, $sgpr8_sgpr9_sgpr10_sgpr11:0x00000003
220
221    %6:sreg_64_xexec = COPY %5
222    SI_END_CF killed %6, implicit-def $exec, implicit-def dead $scc, implicit $exec
223    S_SLEEP 3
224    S_NOP 0
225
226  bb.2:
227    liveins: $vgpr0, $sgpr4_sgpr5, $sgpr8_sgpr9_sgpr10_sgpr11:0x00000003
228    S_ENDPGM 0, implicit $vgpr0, implicit $sgpr4_sgpr5, implicit $sgpr8_sgpr9_sgpr10_sgpr11
229
230...
231
232---
233name: end_cf_split_block_physreg_liveout
234tracksRegLiveness: true
235body:             |
236  ; GCN-LABEL: name: end_cf_split_block_physreg_liveout
237  ; GCN: bb.0:
238  ; GCN-NEXT:   successors: %bb.1(0x40000000), %bb.2(0x40000000)
239  ; GCN-NEXT:   liveins: $vgpr0, $vgpr1, $sgpr30_sgpr31
240  ; GCN-NEXT: {{  $}}
241  ; GCN-NEXT:   [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
242  ; GCN-NEXT:   [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
243  ; GCN-NEXT:   [[V_CMP_EQ_U32_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U32_e64 [[COPY]], [[COPY1]], implicit $exec
244  ; GCN-NEXT:   [[COPY2:%[0-9]+]]:sreg_64 = COPY $exec, implicit-def $exec
245  ; GCN-NEXT:   [[S_AND_B64_:%[0-9]+]]:sreg_64 = S_AND_B64 [[COPY2]], [[V_CMP_EQ_U32_e64_]], implicit-def dead $scc
246  ; GCN-NEXT:   [[S_XOR_B64_:%[0-9]+]]:sreg_64_xexec = S_XOR_B64 [[S_AND_B64_]], [[COPY2]], implicit-def dead $scc
247  ; GCN-NEXT:   $exec = S_MOV_B64_term [[S_AND_B64_]]
248  ; GCN-NEXT:   [[S_MOV_B64_term:%[0-9]+]]:sreg_64_xexec = S_MOV_B64_term [[S_XOR_B64_]], implicit $exec
249  ; GCN-NEXT:   S_CBRANCH_EXECZ %bb.1, implicit $exec
250  ; GCN-NEXT:   S_BRANCH %bb.2
251  ; GCN-NEXT: {{  $}}
252  ; GCN-NEXT: bb.1:
253  ; GCN-NEXT:   successors: %bb.3(0x80000000)
254  ; GCN-NEXT: {{  $}}
255  ; GCN-NEXT:   [[COPY3:%[0-9]+]]:sreg_64_xexec = COPY [[S_MOV_B64_term]]
256  ; GCN-NEXT:   $exec = S_OR_B64_term $exec, [[COPY3]], implicit-def $scc
257  ; GCN-NEXT: {{  $}}
258  ; GCN-NEXT: bb.3:
259  ; GCN-NEXT:   successors: %bb.2(0x80000000)
260  ; GCN-NEXT: {{  $}}
261  ; GCN-NEXT:   $vgpr3 = V_MOV_B32_e32 0, implicit $exec
262  ; GCN-NEXT:   $sgpr4_sgpr5 = S_MOV_B64 32
263  ; GCN-NEXT: {{  $}}
264  ; GCN-NEXT: bb.2:
265  ; GCN-NEXT:   liveins: $vgpr3, $sgpr4_sgpr5
266  ; GCN-NEXT: {{  $}}
267  ; GCN-NEXT:   S_ENDPGM 0, implicit $vgpr3, implicit $sgpr4_sgpr5
268  bb.0:
269    liveins: $vgpr0, $vgpr1, $sgpr30_sgpr31
270
271    %0:vgpr_32 = COPY killed $vgpr0
272    %1:vgpr_32 = COPY killed $vgpr1
273    %3:sreg_64_xexec = V_CMP_EQ_U32_e64 killed %0, killed %1, implicit $exec
274    %4:sreg_64_xexec = SI_IF %3, %bb.1, implicit-def $exec, implicit-def dead $scc, implicit $exec
275    %5:sreg_64_xexec = S_MOV_B64_term %4, implicit $exec
276    S_BRANCH %bb.2
277
278  bb.1:
279    successors: %bb.2
280
281    %6:sreg_64_xexec = COPY %5
282    SI_END_CF killed %6, implicit-def $exec, implicit-def dead $scc, implicit $exec
283    $vgpr3 = V_MOV_B32_e32 0, implicit $exec
284    $sgpr4_sgpr5 = S_MOV_B64 32
285
286  bb.2:
287    liveins: $vgpr3, $sgpr4_sgpr5
288    S_ENDPGM 0, implicit $vgpr3, implicit $sgpr4_sgpr5
289
290...
291
292---
293name: end_cf_split_block_physreg_live_across_split
294tracksRegLiveness: true
295body:             |
296  ; GCN-LABEL: name: end_cf_split_block_physreg_live_across_split
297  ; GCN: bb.0:
298  ; GCN-NEXT:   successors: %bb.1(0x40000000), %bb.2(0x40000000)
299  ; GCN-NEXT:   liveins: $vgpr0, $vgpr1, $sgpr30_sgpr31, $sgpr4_sgpr5
300  ; GCN-NEXT: {{  $}}
301  ; GCN-NEXT:   [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
302  ; GCN-NEXT:   [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
303  ; GCN-NEXT:   [[V_CMP_EQ_U32_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U32_e64 [[COPY]], [[COPY1]], implicit $exec
304  ; GCN-NEXT:   [[COPY2:%[0-9]+]]:sreg_64 = COPY $exec, implicit-def $exec
305  ; GCN-NEXT:   [[S_AND_B64_:%[0-9]+]]:sreg_64 = S_AND_B64 [[COPY2]], [[V_CMP_EQ_U32_e64_]], implicit-def dead $scc
306  ; GCN-NEXT:   [[S_XOR_B64_:%[0-9]+]]:sreg_64_xexec = S_XOR_B64 [[S_AND_B64_]], [[COPY2]], implicit-def dead $scc
307  ; GCN-NEXT:   $exec = S_MOV_B64_term [[S_AND_B64_]]
308  ; GCN-NEXT:   [[S_MOV_B64_term:%[0-9]+]]:sreg_64_xexec = S_MOV_B64_term [[S_XOR_B64_]], implicit $exec
309  ; GCN-NEXT:   S_CBRANCH_EXECZ %bb.1, implicit $exec
310  ; GCN-NEXT:   S_BRANCH %bb.2
311  ; GCN-NEXT: {{  $}}
312  ; GCN-NEXT: bb.1:
313  ; GCN-NEXT:   successors: %bb.3(0x80000000)
314  ; GCN-NEXT:   liveins: $vgpr0, $sgpr4_sgpr5
315  ; GCN-NEXT: {{  $}}
316  ; GCN-NEXT:   [[COPY3:%[0-9]+]]:sreg_64_xexec = COPY [[S_MOV_B64_term]]
317  ; GCN-NEXT:   $sgpr4_sgpr5 = S_MOV_B64 32
318  ; GCN-NEXT:   $exec = S_OR_B64_term $exec, [[COPY3]], implicit-def $scc
319  ; GCN-NEXT: {{  $}}
320  ; GCN-NEXT: bb.3:
321  ; GCN-NEXT:   successors: %bb.2(0x80000000)
322  ; GCN-NEXT:   liveins: $vgpr0, $sgpr4_sgpr5
323  ; GCN-NEXT: {{  $}}
324  ; GCN-NEXT:   S_SLEEP 3, implicit $sgpr4_sgpr5
325  ; GCN-NEXT:   S_NOP 0
326  ; GCN-NEXT: {{  $}}
327  ; GCN-NEXT: bb.2:
328  ; GCN-NEXT:   liveins: $vgpr0, $sgpr4_sgpr5
329  ; GCN-NEXT: {{  $}}
330  ; GCN-NEXT:   S_ENDPGM 0, implicit $vgpr0, implicit $sgpr4_sgpr5
331  bb.0:
332    liveins: $vgpr0, $vgpr1, $sgpr30_sgpr31, $sgpr4_sgpr5
333
334    %0:vgpr_32 = COPY killed $vgpr0
335    %1:vgpr_32 = COPY killed $vgpr1
336    %3:sreg_64_xexec = V_CMP_EQ_U32_e64 killed %0, killed %1, implicit $exec
337    %4:sreg_64_xexec = SI_IF %3, %bb.1, implicit-def $exec, implicit-def dead $scc, implicit $exec
338    %5:sreg_64_xexec = S_MOV_B64_term %4, implicit $exec
339    S_BRANCH %bb.2
340
341  bb.1:
342    successors: %bb.2
343    liveins: $vgpr0, $sgpr4_sgpr5
344
345    %6:sreg_64_xexec = COPY %5
346    $sgpr4_sgpr5 = S_MOV_B64 32
347    SI_END_CF killed %6, implicit-def $exec, implicit-def dead $scc, implicit $exec
348    S_SLEEP 3, implicit $sgpr4_sgpr5
349    S_NOP 0
350
351  bb.2:
352    liveins: $vgpr0, $sgpr4_sgpr5
353    S_ENDPGM 0, implicit $vgpr0, implicit $sgpr4_sgpr5
354
355...
356
357---
358name: end_cf_split_block_process_next_inst
359tracksRegLiveness: true
360body:             |
361  ; GCN-LABEL: name: end_cf_split_block_process_next_inst
362  ; GCN: bb.0:
363  ; GCN-NEXT:   successors: %bb.1(0x80000000)
364  ; GCN-NEXT:   liveins: $vgpr0, $vgpr1, $vgpr2
365  ; GCN-NEXT: {{  $}}
366  ; GCN-NEXT:   [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
367  ; GCN-NEXT:   [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
368  ; GCN-NEXT:   [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
369  ; GCN-NEXT:   [[V_CMP_EQ_U32_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U32_e64 [[COPY]], [[COPY1]], implicit $exec
370  ; GCN-NEXT:   [[V_CMP_EQ_U32_e64_1:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U32_e64 [[COPY]], [[COPY2]], implicit $exec
371  ; GCN-NEXT:   dead [[S_MOV_B64_:%[0-9]+]]:sreg_64_xexec = S_MOV_B64 0
372  ; GCN-NEXT: {{  $}}
373  ; GCN-NEXT: bb.1:
374  ; GCN-NEXT:   successors: %bb.3(0x80000000)
375  ; GCN-NEXT: {{  $}}
376  ; GCN-NEXT:   [[COPY3:%[0-9]+]]:sreg_64_xexec = COPY [[V_CMP_EQ_U32_e64_]]
377  ; GCN-NEXT:   $exec = S_OR_B64_term $exec, [[COPY3]], implicit-def $scc
378  ; GCN-NEXT: {{  $}}
379  ; GCN-NEXT: bb.3:
380  ; GCN-NEXT:   successors: %bb.2(0x80000000)
381  ; GCN-NEXT: {{  $}}
382  ; GCN-NEXT:   [[COPY4:%[0-9]+]]:sreg_64 = COPY $exec, implicit-def $exec
383  ; GCN-NEXT:   [[S_AND_B64_:%[0-9]+]]:sreg_64 = S_AND_B64 [[COPY4]], [[V_CMP_EQ_U32_e64_1]], implicit-def dead $scc
384  ; GCN-NEXT:   [[S_XOR_B64_:%[0-9]+]]:sreg_64_xexec = S_XOR_B64 [[S_AND_B64_]], [[COPY4]], implicit-def dead $scc
385  ; GCN-NEXT:   $exec = S_MOV_B64_term [[S_AND_B64_]]
386  ; GCN-NEXT:   dead [[S_MOV_B64_term:%[0-9]+]]:sreg_64_xexec = S_MOV_B64_term [[S_XOR_B64_]], implicit $exec
387  ; GCN-NEXT:   S_CBRANCH_EXECZ %bb.2, implicit $exec
388  ; GCN-NEXT: {{  $}}
389  ; GCN-NEXT: bb.2:
390  ; GCN-NEXT:   S_ENDPGM 0
391  bb.0:
392    liveins: $vgpr0, $vgpr1, $vgpr2
393
394    %0:vgpr_32 = COPY killed $vgpr0
395    %1:vgpr_32 = COPY killed $vgpr1
396    %2:vgpr_32 = COPY killed $vgpr2
397    %3:sreg_64_xexec = V_CMP_EQ_U32_e64 %0, killed %1, implicit $exec
398    %4:sreg_64_xexec = V_CMP_EQ_U32_e64 killed %0, killed %2, implicit $exec
399    %5:sreg_64_xexec = S_MOV_B64 0
400
401  bb.1:
402    successors: %bb.2
403
404    %6:sreg_64_xexec = COPY %3
405    SI_END_CF killed %6, implicit-def $exec, implicit-def dead $scc, implicit $exec
406    %7:sreg_64_xexec = SI_IF %4, %bb.2, implicit-def $exec, implicit-def dead $scc, implicit $exec
407    %8:sreg_64_xexec = S_MOV_B64_term %7, implicit $exec
408
409  bb.2:
410    S_ENDPGM 0
411
412...
413