1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=thumbv8.1m.main-none-eabi -mattr=+mve -run-pass=arm-block-placement -verify-machineinstrs %s -o - | FileCheck %s
5 ; Checks that Predecessor gets moved (to before the LoopExit) if it contains a backward WLS.
6 define void @backwards_branch(i32 %N, i32* nocapture %a, i32* nocapture readonly %b) {
11 ; Checks that Predecessor (containing a backwards WLS) does not get moved to before the loopExit if it is the entry block.
12 define void @backwards_branch_entry_block(i32 %N, i32* nocapture %a, i32* nocapture readonly %b) {
17 ; Checks that Predecessor (to which a forward WLS exists) is not moved if moving it would cause the WLS to become backwards branching.
18 define void @backwards_branch_backwards_wls(i32 %N, i32 %M, i32* nocapture %a, i32* nocapture %b, i32* nocapture %c) {
23 ; Checks that a MachineFunction is unaffected if it doesn't contain any WLS (pseudo) instruction.
24 define void @no_predecessor(i32 %N, i32 %M, i32* nocapture %a, i32* nocapture %b, i32* nocapture %c) {
29 ; Within a nested (Both the WLS and loopExit are at depth=3 here) loop, checks that Predecessor
30 ; gets moved (in backward direction) if there exists a backdwards WLS from it to the LoopExit.
31 define void @nested_loops(i32 %n, i32 %m, i32 %l, i8* noalias %X, i8* noalias %Y) {
36 ; Checks that Predecessor (to which a forward WLS exists) is moved if moving it would NOT cause the WLS
37 ; to become backwards branching.
38 define void @backwards_branch_forwards_wls(i32 %N, i32 %M, i32* nocapture %a, i32* nocapture %b, i32* nocapture %c) {
43 ; Checks that multiple predecessor case is handled appropriately
44 define void @multiple_predecessors(i32 %d, i32 %e, i32 %f) {
49 declare dso_local i32 @g(...)
51 declare dso_local i32 @h(...)
55 name: backwards_branch
56 tracksRegLiveness: true
58 ; CHECK-LABEL: name: backwards_branch
60 ; CHECK: successors: %bb.1(0x80000000)
61 ; CHECK: liveins: $r0, $r1, $r2, $lr
62 ; CHECK: tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
63 ; CHECK: t2IT 11, 8, implicit-def $itstate
64 ; CHECK: frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
66 ; CHECK: successors: %bb.3(0x80000000)
67 ; CHECK: liveins: $r0, $r1, $r2
68 ; CHECK: $lr = t2WhileLoopStartLR killed renamable $r0, %bb.2, implicit-def dead $cpsr
69 ; CHECK: t2B %bb.3, 14 /* CC::al */, $noreg
71 ; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
73 ; CHECK: successors: %bb.3(0x7c000000), %bb.2(0x04000000)
74 ; CHECK: liveins: $lr, $r1, $r2
75 ; CHECK: renamable $r0 = tLDRi renamable $r2, 0, 14 /* CC::al */, $noreg
76 ; CHECK: tSTRi killed renamable $r0, renamable $r1, 0, 14 /* CC::al */, $noreg
77 ; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.3, implicit-def dead $cpsr
78 ; CHECK: t2B %bb.2, 14 /* CC::al */, $noreg
80 successors: %bb.2(0x80000000)
81 liveins: $r0, $r1, $r2, $lr
83 tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
84 t2IT 11, 8, implicit-def $itstate
85 frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
88 frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
91 successors: %bb.3(0x80000000)
92 liveins: $r0, $r1, $r2
94 $lr = t2WhileLoopStartLR killed renamable $r0, %bb.1, implicit-def dead $cpsr
97 successors: %bb.3(0x7c000000), %bb.1(0x04000000)
98 liveins: $lr, $r1, $r2
100 renamable $r0 = tLDRi renamable $r2, 0, 14 /* CC::al */, $noreg
101 tSTRi killed renamable $r0, renamable $r1, 0, 14 /* CC::al */, $noreg
102 renamable $lr = t2LoopEndDec killed renamable $lr, %bb.3, implicit-def dead $cpsr
103 t2B %bb.1, 14 /* CC::al */, $noreg
107 name: backwards_branch_entry_block
108 tracksRegLiveness: true
110 ; CHECK-LABEL: name: backwards_branch_entry_block
112 ; CHECK: successors: %bb.2(0x80000000)
113 ; CHECK: liveins: $r0, $r1, $r2, $lr
114 ; CHECK: tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
115 ; CHECK: t2IT 11, 8, implicit-def $itstate
116 ; CHECK: frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
118 ; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
120 ; CHECK: successors: %bb.3(0x80000000)
121 ; CHECK: liveins: $r0, $r1, $r2
122 ; CHECK: $lr = t2WhileLoopStartLR killed renamable $r0, %bb.0, implicit-def dead $cpsr
124 ; CHECK: successors: %bb.3(0x7c000000), %bb.1(0x04000000)
125 ; CHECK: liveins: $lr, $r1, $r2
126 ; CHECK: renamable $r0 = tLDRi renamable $r2, 0, 14 /* CC::al */, $noreg
127 ; CHECK: tSTRi killed renamable $r0, renamable $r1, 0, 14 /* CC::al */, $noreg
128 ; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.3, implicit-def dead $cpsr
129 ; CHECK: t2B %bb.1, 14 /* CC::al */, $noreg
131 successors: %bb.2(0x80000000)
132 liveins: $r0, $r1, $r2, $lr
134 tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
135 t2IT 11, 8, implicit-def $itstate
136 frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
139 frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
142 successors: %bb.3(0x80000000)
143 liveins: $r0, $r1, $r2
145 $lr = t2WhileLoopStartLR killed renamable $r0, %bb.0, implicit-def dead $cpsr
148 successors: %bb.3(0x7c000000), %bb.1(0x04000000)
149 liveins: $lr, $r1, $r2
151 renamable $r0 = tLDRi renamable $r2, 0, 14 /* CC::al */, $noreg
152 tSTRi killed renamable $r0, renamable $r1, 0, 14 /* CC::al */, $noreg
153 renamable $lr = t2LoopEndDec killed renamable $lr, %bb.3, implicit-def dead $cpsr
154 t2B %bb.1, 14 /* CC::al */, $noreg
158 name: backwards_branch_backwards_wls
159 tracksRegLiveness: true
161 ; CHECK-LABEL: name: backwards_branch_backwards_wls
163 ; CHECK: successors: %bb.2(0x80000000)
164 ; CHECK: liveins: $r0, $r1, $r2, $lr
165 ; CHECK: tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
166 ; CHECK: t2IT 11, 8, implicit-def $itstate
167 ; CHECK: frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
169 ; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
171 ; CHECK: successors: %bb.3(0x40000000), %bb.6(0x40000000)
172 ; CHECK: liveins: $r0, $r1, $r2
173 ; CHECK: $lr = t2WhileLoopStartLR killed renamable $r0, %bb.3, implicit-def dead $cpsr
174 ; CHECK: t2B %bb.6, 14 /* CC::al */, $noreg
176 ; CHECK: successors: %bb.1(0x7c000000), %bb.4(0x04000000)
177 ; CHECK: liveins: $lr, $r0, $r1, $r2
178 ; CHECK: t2CMPri renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
179 ; CHECK: t2Bcc %bb.1, 0 /* CC::eq */, $cpsr
181 ; CHECK: successors: %bb.5(0x80000000)
182 ; CHECK: liveins: $r2, $r1, $r0
183 ; CHECK: $lr = t2DoLoopStart renamable $r0
184 ; CHECK: t2B %bb.5, 14 /* CC::al */, $noreg
186 ; CHECK: successors: %bb.1(0x40000000), %bb.5(0x40000000)
187 ; CHECK: liveins: $lr, $r1, $r2
188 ; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.5, implicit-def dead $cpsr
189 ; CHECK: t2B %bb.1, 14 /* CC::al */, $noreg
191 ; CHECK: successors: %bb.6(0x40000000), %bb.3(0x40000000)
192 ; CHECK: liveins: $lr, $r1, $r2
193 ; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.6, implicit-def dead $cpsr
194 ; CHECK: t2B %bb.3, 14 /* CC::al */, $noreg
196 successors: %bb.2(0x80000000)
197 liveins: $r0, $r1, $r2, $lr
199 tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
200 t2IT 11, 8, implicit-def $itstate
201 frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
204 frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
207 successors: %bb.3(0x80000000), %bb.5(0x80000000)
208 liveins: $r0, $r1, $r2
210 $lr = t2WhileLoopStartLR killed renamable $r0, %bb.3, implicit-def dead $cpsr
211 t2B %bb.5, 14 /* CC::al */, $noreg
214 successors: %bb.1(0x7c000000), %bb.4(0x04000000)
215 liveins: $lr, $r0, $r1, $r2
217 $lr = t2WhileLoopStartLR killed renamable $r0, %bb.1, implicit-def dead $cpsr
218 t2B %bb.4, 14 /* CC::al */, $noreg
221 successors: %bb.1, %bb.4
222 liveins: $lr, $r1, $r2
224 renamable $lr = t2LoopEndDec killed renamable $lr, %bb.4, implicit-def dead $cpsr
225 t2B %bb.1, 14 /* CC::al */, $noreg
228 successors: %bb.5, %bb.3
229 liveins: $lr, $r1, $r2
231 renamable $lr = t2LoopEndDec killed renamable $lr, %bb.5, implicit-def dead $cpsr
232 t2B %bb.3, 14 /* CC::al */, $noreg
236 tracksRegLiveness: true
238 ; CHECK-LABEL: name: no_predecessor
240 ; CHECK: successors: %bb.2(0x30000000), %bb.1(0x50000000)
241 ; CHECK: liveins: $r0, $r4, $r5, $r7, $lr
242 ; CHECK: frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r4, killed $r5, $r7, killed $lr, implicit-def $sp, implicit $sp
243 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 16
244 ; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
245 ; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -8
246 ; CHECK: frame-setup CFI_INSTRUCTION offset $r5, -12
247 ; CHECK: frame-setup CFI_INSTRUCTION offset $r4, -16
248 ; CHECK: $r7 = frame-setup tADDrSPi $sp, 2, 14 /* CC::al */, $noreg
249 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa $r7, 8
250 ; CHECK: $r4 = tMOVr killed $r0, 14 /* CC::al */, $noreg
251 ; CHECK: tBL 14 /* CC::al */, $noreg, @g, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0
252 ; CHECK: tCMPi8 killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
253 ; CHECK: t2Bcc %bb.2, 0 /* CC::eq */, killed $cpsr
255 ; CHECK: successors: %bb.4(0x80000000)
256 ; CHECK: liveins: $r4
257 ; CHECK: renamable $r0, dead $cpsr = tMOVi8 4, 14 /* CC::al */, $noreg
258 ; CHECK: renamable $r5 = t2LDRSHi12 killed renamable $r0, 0, 14 /* CC::al */, $noreg
259 ; CHECK: t2B %bb.4, 14 /* CC::al */, $noreg
261 ; CHECK: successors: %bb.4(0x80000000)
262 ; CHECK: liveins: $r4
263 ; CHECK: renamable $r5, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
264 ; CHECK: t2B %bb.4, 14 /* CC::al */, $noreg
266 ; CHECK: successors: %bb.4(0x80000000)
267 ; CHECK: liveins: $r4, $r5
268 ; CHECK: $r0 = tMOVr $r5, 14 /* CC::al */, $noreg
269 ; CHECK: tBL 14 /* CC::al */, $noreg, @h, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit-def $sp, implicit-def dead $r0
271 ; CHECK: successors: %bb.5(0x04000000), %bb.3(0x7c000000)
272 ; CHECK: liveins: $r4, $r5
273 ; CHECK: renamable $r0 = tLDRi renamable $r4, 0, 14 /* CC::al */, $noreg
274 ; CHECK: tCMPi8 killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
275 ; CHECK: t2Bcc %bb.3, 1 /* CC::ne */, killed $cpsr
277 ; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r4, def $r5, def $r7, def $pc
279 successors: %bb.1(0x30000000), %bb.2(0x50000000)
280 liveins: $r0, $r4, $r5, $r7, $lr
282 frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r4, killed $r5, $r7, killed $lr, implicit-def $sp, implicit $sp
283 frame-setup CFI_INSTRUCTION def_cfa_offset 16
284 frame-setup CFI_INSTRUCTION offset $lr, -4
285 frame-setup CFI_INSTRUCTION offset $r7, -8
286 frame-setup CFI_INSTRUCTION offset $r5, -12
287 frame-setup CFI_INSTRUCTION offset $r4, -16
288 $r7 = frame-setup tADDrSPi $sp, 2, 14 /* CC::al */, $noreg
289 frame-setup CFI_INSTRUCTION def_cfa $r7, 8
290 $r4 = tMOVr killed $r0, 14 /* CC::al */, $noreg
291 tBL 14 /* CC::al */, $noreg, @g, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0
292 tCMPi8 killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
293 t2Bcc %bb.1, 0 /* CC::eq */, killed $cpsr
296 successors: %bb.3(0x80000000)
299 renamable $r0, dead $cpsr = tMOVi8 4, 14 /* CC::al */, $noreg
300 renamable $r5 = t2LDRSHi12 killed renamable $r0, 0, 14 /* CC::al */, $noreg
301 t2B %bb.3, 14 /* CC::al */, $noreg
304 successors: %bb.3(0x80000000)
307 renamable $r5, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
308 t2B %bb.3, 14 /* CC::al */, $noreg
311 successors: %bb.3(0x80000000)
314 $r0 = tMOVr $r5, 14 /* CC::al */, $noreg
315 tBL 14 /* CC::al */, $noreg, @h, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit-def $sp, implicit-def dead $r0
318 successors: %bb.5(0x04000000), %bb.4(0x7c000000)
321 renamable $r0 = tLDRi renamable $r4, 0, 14 /* CC::al */, $noreg
322 tCMPi8 killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
323 t2Bcc %bb.4, 1 /* CC::ne */, killed $cpsr
326 frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r4, def $r5, def $r7, def $pc
330 tracksRegLiveness: true
341 - { id: 0, size: 4, alignment: 8, isImmutable: true }
343 - { id: 0, type: spill-slot, offset: -4, size: 4, alignment: 4, callee-saved-register: '$lr',
344 callee-saved-restored: false }
345 - { id: 1, type: spill-slot, offset: -8, size: 4, alignment: 4, callee-saved-register: '$r10' }
346 - { id: 2, type: spill-slot, offset: -12, size: 4, alignment: 4, callee-saved-register: '$r9' }
347 - { id: 3, type: spill-slot, offset: -16, size: 4, alignment: 4, callee-saved-register: '$r8' }
348 - { id: 4, type: spill-slot, offset: -20, size: 4, alignment: 4, callee-saved-register: '$r7' }
349 - { id: 5, type: spill-slot, offset: -24, size: 4, alignment: 4, callee-saved-register: '$r6' }
350 - { id: 6, type: spill-slot, offset: -28, size: 4, alignment: 4, callee-saved-register: '$r5' }
351 - { id: 7, type: spill-slot, offset: -32, size: 4, alignment: 4, callee-saved-register: '$r4' }
352 machineFunctionInfo: {}
354 ; CHECK-LABEL: name: nested_loops
356 ; CHECK: successors: %bb.1(0x80000000)
357 ; CHECK: liveins: $r0, $r1, $r2, $r3, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $lr
358 ; CHECK: $sp = frame-setup t2STMDB_UPD $sp, 14 /* CC::al */, $noreg, killed $r4, killed $r5, killed $r6, killed $r7, killed $r8, killed $r9, killed $r10, killed $lr
359 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 32
360 ; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
361 ; CHECK: frame-setup CFI_INSTRUCTION offset $r10, -8
362 ; CHECK: frame-setup CFI_INSTRUCTION offset $r9, -12
363 ; CHECK: frame-setup CFI_INSTRUCTION offset $r8, -16
364 ; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -20
365 ; CHECK: frame-setup CFI_INSTRUCTION offset $r6, -24
366 ; CHECK: frame-setup CFI_INSTRUCTION offset $r5, -28
367 ; CHECK: frame-setup CFI_INSTRUCTION offset $r4, -32
368 ; CHECK: tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
369 ; CHECK: t2IT 11, 8, implicit-def $itstate
370 ; CHECK: $sp = frame-destroy t2LDMIA_RET $sp, 11 /* CC::lt */, killed $cpsr, def $r4, def $r5, def $r6, def $r7, def $r8, def $r9, def $r10, def $pc, implicit killed $itstate
372 ; CHECK: successors: %bb.3(0x80000000)
373 ; CHECK: liveins: $r0, $r1, $r2, $r3
374 ; CHECK: renamable $r12 = t2LDRi12 $sp, 32, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.0, align 8)
375 ; CHECK: $r9 = tMOVr killed $r2, 14 /* CC::al */, $noreg
376 ; CHECK: renamable $r8 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg
377 ; CHECK: t2B %bb.3, 14 /* CC::al */, $noreg
379 ; CHECK: successors: %bb.9(0x04000000), %bb.3(0x7c000000)
380 ; CHECK: liveins: $r0, $r1, $r3, $r8, $r9, $r12
381 ; CHECK: renamable $r8 = nuw nsw t2ADDri killed renamable $r8, 1, 14 /* CC::al */, $noreg, $noreg
382 ; CHECK: renamable $r3, dead $cpsr = tADDi8 killed renamable $r3, 1, 14 /* CC::al */, $noreg
383 ; CHECK: tCMPhir renamable $r8, renamable $r0, 14 /* CC::al */, $noreg, implicit-def $cpsr
384 ; CHECK: renamable $r12 = t2ADDri killed renamable $r12, 1, 14 /* CC::al */, $noreg, $noreg
385 ; CHECK: t2Bcc %bb.9, 0 /* CC::eq */, killed $cpsr
387 ; CHECK: successors: %bb.4(0x50000000), %bb.2(0x30000000)
388 ; CHECK: liveins: $r0, $r1, $r3, $r8, $r9, $r12
389 ; CHECK: tCMPi8 renamable $r1, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
390 ; CHECK: t2Bcc %bb.2, 11 /* CC::lt */, killed $cpsr
392 ; CHECK: successors: %bb.5(0x80000000)
393 ; CHECK: liveins: $r0, $r1, $r3, $r8, $r9, $r12
394 ; CHECK: renamable $r4, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
395 ; CHECK: $r10 = tMOVr $r12, 14 /* CC::al */, $noreg
396 ; CHECK: $r2 = tMOVr $r3, 14 /* CC::al */, $noreg
397 ; CHECK: t2B %bb.5, 14 /* CC::al */, $noreg
399 ; CHECK: successors: %bb.7(0x50000000), %bb.6(0x30000000)
400 ; CHECK: liveins: $r0, $r1, $r2, $r3, $r4, $r8, $r9, $r10, $r12
401 ; CHECK: renamable $lr = t2WhileLoopStartLR killed renamable $r9, %bb.6, implicit-def dead $cpsr
402 ; CHECK: t2B %bb.7, 14 /* CC::al */, $noreg
404 ; CHECK: successors: %bb.2(0x04000000), %bb.5(0x7c000000)
405 ; CHECK: liveins: $r0, $r1, $r2, $r3, $r4, $r8, $r9, $r10, $r12
406 ; CHECK: renamable $r4, dead $cpsr = nuw nsw tADDi8 killed renamable $r4, 1, 14 /* CC::al */, $noreg
407 ; CHECK: renamable $r2, dead $cpsr = tADDi8 killed renamable $r2, 1, 14 /* CC::al */, $noreg
408 ; CHECK: tCMPr renamable $r4, renamable $r1, 14 /* CC::al */, $noreg, implicit-def $cpsr
409 ; CHECK: renamable $r10 = t2ADDri killed renamable $r10, 1, 14 /* CC::al */, $noreg, $noreg
410 ; CHECK: t2Bcc %bb.2, 0 /* CC::eq */, killed $cpsr
411 ; CHECK: t2B %bb.5, 14 /* CC::al */, $noreg
413 ; CHECK: successors: %bb.8(0x80000000)
414 ; CHECK: liveins: $r0, $r1, $r2, $r3, $r4, $r8, $r9, $r10, $r12
415 ; CHECK: $r5 = tMOVr $r10, 14 /* CC::al */, $noreg
416 ; CHECK: $r6 = tMOVr $r2, 14 /* CC::al */, $noreg
417 ; CHECK: t2B %bb.8, 14 /* CC::al */, $noreg
419 ; CHECK: successors: %bb.8(0x7c000000), %bb.6(0x04000000)
420 ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3, $r4, $r5, $r6, $r8, $r9, $r10, $r12
421 ; CHECK: tSTRi killed $r0, $r1, 0, 14 /* CC::al */, $noreg
422 ; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.8, implicit-def dead $cpsr
423 ; CHECK: t2B %bb.6, 14 /* CC::al */, $noreg
425 ; CHECK: $sp = frame-destroy t2LDMIA_RET $sp, 14 /* CC::al */, $noreg, def $r4, def $r5, def $r6, def $r7, def $r8, def $r9, def $r10, def $pc
428 liveins: $r0, $r1, $r2, $r3, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $lr
430 $sp = frame-setup t2STMDB_UPD $sp, 14 /* CC::al */, $noreg, killed $r4, killed $r5, killed $r6, killed $r7, killed $r8, killed $r9, killed $r10, killed $lr
431 frame-setup CFI_INSTRUCTION def_cfa_offset 32
432 frame-setup CFI_INSTRUCTION offset $lr, -4
433 frame-setup CFI_INSTRUCTION offset $r10, -8
434 frame-setup CFI_INSTRUCTION offset $r9, -12
435 frame-setup CFI_INSTRUCTION offset $r8, -16
436 frame-setup CFI_INSTRUCTION offset $r7, -20
437 frame-setup CFI_INSTRUCTION offset $r6, -24
438 frame-setup CFI_INSTRUCTION offset $r5, -28
439 frame-setup CFI_INSTRUCTION offset $r4, -32
440 tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
441 t2IT 11, 8, implicit-def $itstate
442 $sp = frame-destroy t2LDMIA_RET $sp, 11 /* CC::lt */, killed $cpsr, def $r4, def $r5, def $r6, def $r7, def $r8, def $r9, def $r10, def $pc, implicit killed $itstate
445 liveins: $r0, $r1, $r2, $r3
447 renamable $r12 = t2LDRi12 $sp, 32, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.0, align 8)
448 $r9 = tMOVr killed $r2, 14 /* CC::al */, $noreg
449 renamable $r8 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg
450 t2B %bb.2, 14 /* CC::al */, $noreg
453 successors: %bb.9(0x04000000), %bb.2(0x7c000000)
454 liveins: $r0, $r1, $r3, $r8, $r9, $r12
456 renamable $r8 = nuw nsw t2ADDri killed renamable $r8, 1, 14 /* CC::al */, $noreg, $noreg
457 renamable $r3, dead $cpsr = tADDi8 killed renamable $r3, 1, 14 /* CC::al */, $noreg
458 tCMPhir renamable $r8, renamable $r0, 14 /* CC::al */, $noreg, implicit-def $cpsr
459 renamable $r12 = t2ADDri killed renamable $r12, 1, 14 /* CC::al */, $noreg, $noreg
460 t2Bcc %bb.9, 0 /* CC::eq */, killed $cpsr
463 successors: %bb.3(0x50000000), %bb.8(0x30000000)
464 liveins: $r0, $r1, $r3, $r8, $r9, $r12
466 tCMPi8 renamable $r1, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
467 t2Bcc %bb.8, 11 /* CC::lt */, killed $cpsr
470 liveins: $r0, $r1, $r3, $r8, $r9, $r12
472 renamable $r4, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
473 $r10 = tMOVr $r12, 14 /* CC::al */, $noreg
474 $r2 = tMOVr $r3, 14 /* CC::al */, $noreg
475 t2B %bb.4, 14 /* CC::al */, $noreg
478 successors: %bb.8(0x04000000), %bb.4(0x7c000000)
479 liveins: $r0, $r1, $r2, $r3, $r4, $r8, $r9, $r10, $r12
481 renamable $r4, dead $cpsr = nuw nsw tADDi8 killed renamable $r4, 1, 14 /* CC::al */, $noreg
482 renamable $r2, dead $cpsr = tADDi8 killed renamable $r2, 1, 14 /* CC::al */, $noreg
483 tCMPr renamable $r4, renamable $r1, 14 /* CC::al */, $noreg, implicit-def $cpsr
484 renamable $r10 = t2ADDri killed renamable $r10, 1, 14 /* CC::al */, $noreg, $noreg
485 t2Bcc %bb.8, 0 /* CC::eq */, killed $cpsr
488 successors: %bb.5(0x50000000), %bb.7(0x30000000)
489 liveins: $r0, $r1, $r2, $r3, $r4, $r8, $r9, $r10, $r12
491 renamable $lr = t2WhileLoopStartLR killed renamable $r9, %bb.7, implicit-def dead $cpsr
494 liveins: $r0, $r1, $r2, $r3, $r4, $r8, $r9, $r10, $r12
496 $r5 = tMOVr $r10, 14 /* CC::al */, $noreg
497 $r6 = tMOVr $r2, 14 /* CC::al */, $noreg
498 t2B %bb.6, 14 /* CC::al */, $noreg
501 successors: %bb.6(0x7c000000), %bb.7(0x04000000)
502 liveins: $lr, $r0, $r1, $r2, $r3, $r4, $r5, $r6, $r8, $r9, $r10, $r12
504 tSTRi killed $r0, $r1, 0, 14 /* CC::al */, $noreg
505 renamable $lr = t2LoopEndDec killed renamable $lr, %bb.6, implicit-def dead $cpsr
506 t2B %bb.7, 14 /* CC::al */, $noreg
509 $sp = frame-destroy t2LDMIA_RET $sp, 14 /* CC::al */, $noreg, def $r4, def $r5, def $r6, def $r7, def $r8, def $r9, def $r10, def $pc
513 name: backwards_branch_forwards_wls
514 tracksRegLiveness: true
516 ; CHECK-LABEL: name: backwards_branch_forwards_wls
518 ; CHECK: successors: %bb.1(0x80000000)
519 ; CHECK: liveins: $r0, $r1, $r2, $lr
520 ; CHECK: tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
521 ; CHECK: t2IT 11, 8, implicit-def $itstate
522 ; CHECK: frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
524 ; CHECK: successors: %bb.2(0x40000000), %bb.5(0x40000000)
525 ; CHECK: liveins: $r0, $r1, $r2
526 ; CHECK: $lr = t2WhileLoopStartLR killed renamable $r0, %bb.2, implicit-def dead $cpsr
527 ; CHECK: t2B %bb.5, 14 /* CC::al */, $noreg
529 ; CHECK: successors: %bb.4(0x40000000), %bb.3(0x40000000)
530 ; CHECK: liveins: $lr, $r0, $r1, $r2
531 ; CHECK: $lr = t2WhileLoopStartLR killed renamable $r0, %bb.3, implicit-def dead $cpsr
532 ; CHECK: t2B %bb.4, 14 /* CC::al */, $noreg
534 ; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
536 ; CHECK: successors: %bb.3(0x40000000), %bb.4(0x40000000)
537 ; CHECK: liveins: $lr, $r1, $r2
538 ; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.4, implicit-def dead $cpsr
539 ; CHECK: t2B %bb.3, 14 /* CC::al */, $noreg
541 ; CHECK: successors: %bb.5(0x40000000), %bb.2(0x40000000)
542 ; CHECK: liveins: $lr, $r1, $r2
543 ; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.5, implicit-def dead $cpsr
544 ; CHECK: t2B %bb.2, 14 /* CC::al */, $noreg
547 liveins: $r0, $r1, $r2, $lr
549 tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
550 t2IT 11, 8, implicit-def $itstate
551 frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
554 successors: %bb.3, %bb.5
555 liveins: $r0, $r1, $r2
557 $lr = t2WhileLoopStartLR killed renamable $r0, %bb.3, implicit-def dead $cpsr
558 t2B %bb.5, 14 /* CC::al */, $noreg
561 frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
564 successors: %bb.4, %bb.1
565 liveins: $lr, $r0, $r1, $r2
567 $lr = t2WhileLoopStartLR killed renamable $r0, %bb.1, implicit-def dead $cpsr
568 t2B %bb.4, 14 /* CC::al */, $noreg
571 successors: %bb.1, %bb.4
572 liveins: $lr, $r1, $r2
574 renamable $lr = t2LoopEndDec killed renamable $lr, %bb.4, implicit-def dead $cpsr
575 t2B %bb.1, 14 /* CC::al */, $noreg
578 successors: %bb.5, %bb.3
579 liveins: $lr, $r1, $r2
581 renamable $lr = t2LoopEndDec killed renamable $lr, %bb.5, implicit-def dead $cpsr
582 t2B %bb.3, 14 /* CC::al */, $noreg
586 name: multiple_predecessors
587 tracksRegLiveness: true
589 ; CHECK-LABEL: name: multiple_predecessors
591 ; CHECK: successors: %bb.3(0x55555555), %bb.2(0x2aaaaaab)
592 ; CHECK: liveins: $r0, $r1, $r2, $r7, $lr
593 ; CHECK: frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r7, killed $lr, implicit-def $sp, implicit $sp
594 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 8
595 ; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
596 ; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -8
597 ; CHECK: $sp = frame-setup tSUBspi $sp, 1, 14 /* CC::al */, $noreg
598 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 12
599 ; CHECK: tCMPi8 killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
600 ; CHECK: t2IT 0, 8, implicit-def $itstate
601 ; CHECK: tCMPi8 killed renamable $r1, 8, 0 /* CC::eq */, killed $cpsr, implicit-def $cpsr, implicit killed $itstate
602 ; CHECK: t2Bcc %bb.2, 0 /* CC::eq */, killed $cpsr
603 ; CHECK: t2B %bb.3, 14 /* CC::al */, $noreg
605 ; CHECK: successors: %bb.6(0x40000000), %bb.3(0x40000000)
606 ; CHECK: liveins: $r0, $r1, $r2
607 ; CHECK: renamable $lr = t2WhileLoopStartLR killed renamable $r2, %bb.3, implicit-def dead $cpsr
608 ; CHECK: t2B %bb.6, 14 /* CC::al */, $noreg
610 ; CHECK: successors: %bb.4(0x40000000), %bb.3(0x40000000)
611 ; CHECK: liveins: $r2
612 ; CHECK: renamable $lr = t2WhileLoopStartLR renamable $r2, %bb.3, implicit-def dead $cpsr
613 ; CHECK: t2B %bb.4, 14 /* CC::al */, $noreg
615 ; CHECK: $sp = frame-destroy tADDspi $sp, 1, 14 /* CC::al */, $noreg
616 ; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc, implicit undef $r0
618 ; CHECK: successors: %bb.5(0x80000000)
619 ; CHECK: liveins: $lr, $r2
620 ; CHECK: renamable $r3, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
621 ; CHECK: renamable $r1 = t2ADDri $sp, 2, 14 /* CC::al */, $noreg, $noreg
622 ; CHECK: renamable $r0 = IMPLICIT_DEF
624 ; CHECK: successors: %bb.5(0x7c000000), %bb.1(0x04000000)
625 ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3
626 ; CHECK: renamable $q0, renamable $r0 = MVE_VIWDUPu16 killed renamable $r0, renamable $r3, 1, 0, $noreg, undef renamable $q0
627 ; CHECK: MVE_VSTRH16_rq undef renamable $q0, renamable $r1, killed renamable $q0, 0, $noreg
628 ; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.5, implicit-def dead $cpsr
629 ; CHECK: t2B %bb.1, 14 /* CC::al */, $noreg
631 ; CHECK: successors: %bb.7(0x80000000)
632 ; CHECK: liveins: $lr, $r0, $r1
633 ; CHECK: renamable $r3, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
635 ; CHECK: successors: %bb.7(0x7c000000), %bb.3(0x04000000)
636 ; CHECK: liveins: $lr, $r0, $r1, $r3
637 ; CHECK: renamable $q0, renamable $r0 = MVE_VIWDUPu16 killed renamable $r0, renamable $r3, 2, 0, $noreg, undef renamable $q0
638 ; CHECK: MVE_VSTRH16_rq undef renamable $q0, renamable $r1, killed renamable $q0, 0, $noreg
639 ; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.7, implicit-def dead $cpsr
640 ; CHECK: t2B %bb.3, 14 /* CC::al */, $noreg
642 successors: %bb.7(0x80000000), %bb.1(0x40000000)
643 liveins: $r0, $r1, $r2, $r7, $lr
645 frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r7, killed $lr, implicit-def $sp, implicit $sp
646 frame-setup CFI_INSTRUCTION def_cfa_offset 8
647 frame-setup CFI_INSTRUCTION offset $lr, -4
648 frame-setup CFI_INSTRUCTION offset $r7, -8
649 $sp = frame-setup tSUBspi $sp, 1, 14 /* CC::al */, $noreg
650 frame-setup CFI_INSTRUCTION def_cfa_offset 12
651 tCMPi8 killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
652 t2IT 0, 8, implicit-def $itstate
653 tCMPi8 killed renamable $r1, 8, 0 /* CC::eq */, killed $cpsr, implicit-def $cpsr, implicit killed $itstate
654 t2Bcc %bb.1, 0 /* CC::eq */, killed $cpsr
657 $sp = frame-destroy tADDspi $sp, 1, 14 /* CC::al */, $noreg
658 frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc, implicit undef $r0
661 successors: %bb.3(0x40000000), %bb.7(0x40000000)
664 renamable $lr = t2WhileLoopStartLR renamable $r2, %bb.7, implicit-def dead $cpsr
665 t2B %bb.3, 14 /* CC::al */, $noreg
668 successors: %bb.4(0x80000000)
671 renamable $r3, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
672 renamable $r1 = t2ADDri $sp, 2, 14 /* CC::al */, $noreg, $noreg
673 renamable $r0 = IMPLICIT_DEF
676 successors: %bb.4(0x7c000000), %bb.2(0x04000000)
677 liveins: $lr, $r0, $r1, $r2, $r3
679 renamable $q0, renamable $r0 = MVE_VIWDUPu16 killed renamable $r0, renamable $r3, 1, 0, $noreg, undef renamable $q0
680 MVE_VSTRH16_rq undef renamable $q0, renamable $r1, killed renamable $q0, 0, $noreg
681 renamable $lr = t2LoopEndDec killed renamable $lr, %bb.4, implicit-def dead $cpsr
682 t2B %bb.2, 14 /* CC::al */, $noreg
685 successors: %bb.5(0x40000000), %bb.7(0x40000000)
686 liveins: $r0, $r1, $r2
688 renamable $lr = t2WhileLoopStartLR killed renamable $r2, %bb.7, implicit-def dead $cpsr
689 t2B %bb.5, 14 /* CC::al */, $noreg
692 successors: %bb.6(0x80000000)
693 liveins: $lr, $r0, $r1
695 renamable $r3, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
698 successors: %bb.6(0x7c000000), %bb.7(0x04000000)
699 liveins: $lr, $r0, $r1, $r3
701 renamable $q0, renamable $r0 = MVE_VIWDUPu16 killed renamable $r0, renamable $r3, 2, 0, $noreg, undef renamable $q0
702 MVE_VSTRH16_rq undef renamable $q0, renamable $r1, killed renamable $q0, 0, $noreg
703 renamable $lr = t2LoopEndDec killed renamable $lr, %bb.6, implicit-def dead $cpsr
704 t2B %bb.7, 14 /* CC::al */, $noreg