1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/CodeGen/Thumb2/block-placement.mir

669 lines
29 KiB
YAML

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=thumbv8.1m.main-none-eabi -mattr=+mve -run-pass=arm-block-placement -verify-machineinstrs %s -o - | FileCheck %s
--- |
; Checks that Predecessor gets moved (to before the LoopExit) if it contains a backward WLS.
define void @backwards_branch(i32 %N, i32* nocapture %a, i32* nocapture readonly %b) {
entry:
unreachable
}
; Checks that Predecessor (containing a backwards WLS) does not get moved to before the loopExit if it is the entry block.
define void @backwards_branch_entry_block(i32 %N, i32* nocapture %a, i32* nocapture readonly %b) {
entry:
unreachable
}
; Checks that Predecessor (to which a forward WLS exists) is not moved if moving it would cause the WLS to become backwards branching.
define void @backwards_branch_backwards_wls(i32 %N, i32 %M, i32* nocapture %a, i32* nocapture %b, i32* nocapture %c) {
entry:
unreachable
}
; Checks that a MachineFunction is unaffected if it doesn't contain any WLS (pseudo) instruction.
define void @no_predecessor(i32 %N, i32 %M, i32* nocapture %a, i32* nocapture %b, i32* nocapture %c) {
entry:
unreachable
}
; Within a nested (Both the WLS and loopExit are at depth=3 here) loop, checks that Predecessor
; gets moved (in backward direction) if there exists a backdwards WLS from it to the LoopExit.
define void @nested_loops(i32 %n, i32 %m, i32 %l, i8* noalias %X, i8* noalias %Y) {
entry:
unreachable
}
; Checks that Predecessor (to which a forward WLS exists) is moved if moving it would NOT cause the WLS
; to become backwards branching.
define void @backwards_branch_forwards_wls(i32 %N, i32 %M, i32* nocapture %a, i32* nocapture %b, i32* nocapture %c) {
entry:
unreachable
}
; Checks that multiple predecessor case is handled appropriately
define void @multiple_predecessors(i32 %d, i32 %e, i32 %f) {
entry:
unreachable
}
declare dso_local i32 @g(...)
declare dso_local i32 @h(...)
...
---
name: backwards_branch
body: |
; CHECK-LABEL: name: backwards_branch
; CHECK: bb.0:
; CHECK: successors: %bb.1(0x80000000)
; CHECK: tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
; CHECK: t2IT 11, 8, implicit-def $itstate
; CHECK: frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
; CHECK: bb.1:
; CHECK: successors: %bb.3(0x80000000)
; CHECK: $lr = t2WhileLoopStartLR killed renamable $r0, %bb.2, implicit-def dead $cpsr
; CHECK: t2B %bb.3, 14 /* CC::al */, $noreg
; CHECK: bb.2:
; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
; CHECK: bb.3:
; CHECK: successors: %bb.3(0x7c000000), %bb.2(0x04000000)
; CHECK: renamable $r0 = tLDRi renamable $r2, 0, 14 /* CC::al */, $noreg
; CHECK: tSTRi killed renamable $r0, renamable $r1, 0, 14 /* CC::al */, $noreg
; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.3, implicit-def dead $cpsr
; CHECK: t2B %bb.2, 14 /* CC::al */, $noreg
bb.0:
successors: %bb.2(0x80000000)
liveins: $r0, $r1, $r2, $lr
tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
t2IT 11, 8, implicit-def $itstate
frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
bb.1:
frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
bb.2:
successors: %bb.3(0x80000000)
liveins: $r0, $r1, $r2
$lr = t2WhileLoopStartLR killed renamable $r0, %bb.1, implicit-def dead $cpsr
bb.3:
successors: %bb.3(0x7c000000), %bb.1(0x04000000)
liveins: $lr, $r1, $r2
renamable $r0 = tLDRi renamable $r2, 0, 14 /* CC::al */, $noreg
tSTRi killed renamable $r0, renamable $r1, 0, 14 /* CC::al */, $noreg
renamable $lr = t2LoopEndDec killed renamable $lr, %bb.3, implicit-def dead $cpsr
t2B %bb.1, 14 /* CC::al */, $noreg
...
---
name: backwards_branch_entry_block
body: |
; CHECK-LABEL: name: backwards_branch_entry_block
; CHECK: bb.0:
; CHECK: successors: %bb.2(0x80000000)
; CHECK: tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
; CHECK: t2IT 11, 8, implicit-def $itstate
; CHECK: frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
; CHECK: bb.1:
; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
; CHECK: bb.2:
; CHECK: successors: %bb.3(0x80000000)
; CHECK: $lr = t2WhileLoopStartLR killed renamable $r0, %bb.0, implicit-def dead $cpsr
; CHECK: bb.3:
; CHECK: successors: %bb.3(0x7c000000), %bb.1(0x04000000)
; CHECK: renamable $r0 = tLDRi renamable $r2, 0, 14 /* CC::al */, $noreg
; CHECK: tSTRi killed renamable $r0, renamable $r1, 0, 14 /* CC::al */, $noreg
; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.3, implicit-def dead $cpsr
; CHECK: t2B %bb.1, 14 /* CC::al */, $noreg
bb.0:
successors: %bb.2(0x80000000)
liveins: $r0, $r1, $r2, $lr
tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
t2IT 11, 8, implicit-def $itstate
frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
bb.1:
frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
bb.2:
successors: %bb.3(0x80000000)
liveins: $r0, $r1, $r2
$lr = t2WhileLoopStartLR killed renamable $r0, %bb.0, implicit-def dead $cpsr
bb.3:
successors: %bb.3(0x7c000000), %bb.1(0x04000000)
liveins: $lr, $r1, $r2
renamable $r0 = tLDRi renamable $r2, 0, 14 /* CC::al */, $noreg
tSTRi killed renamable $r0, renamable $r1, 0, 14 /* CC::al */, $noreg
renamable $lr = t2LoopEndDec killed renamable $lr, %bb.3, implicit-def dead $cpsr
t2B %bb.1, 14 /* CC::al */, $noreg
...
---
name: backwards_branch_backwards_wls
body: |
; CHECK-LABEL: name: backwards_branch_backwards_wls
; CHECK: bb.0:
; CHECK: successors: %bb.2(0x80000000)
; CHECK: tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
; CHECK: t2IT 11, 8, implicit-def $itstate
; CHECK: frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
; CHECK: bb.1:
; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
; CHECK: bb.2:
; CHECK: successors: %bb.3(0x40000000), %bb.5(0x40000000)
; CHECK: $lr = t2WhileLoopStartLR killed renamable $r0, %bb.3, implicit-def dead $cpsr
; CHECK: t2B %bb.5, 14 /* CC::al */, $noreg
; CHECK: bb.3:
; CHECK: successors: %bb.1(0x7c000000), %bb.4(0x04000000)
; CHECK: $lr = t2WhileLoopStartLR killed renamable $r0, %bb.1, implicit-def dead $cpsr
; CHECK: t2B %bb.4, 14 /* CC::al */, $noreg
; CHECK: bb.4:
; CHECK: successors: %bb.1(0x40000000), %bb.4(0x40000000)
; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.4, implicit-def dead $cpsr
; CHECK: t2B %bb.1, 14 /* CC::al */, $noreg
; CHECK: bb.5:
; CHECK: successors: %bb.5(0x40000000), %bb.3(0x40000000)
; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.5, implicit-def dead $cpsr
; CHECK: t2B %bb.3, 14 /* CC::al */, $noreg
bb.0:
successors: %bb.2(0x80000000)
liveins: $r0, $r1, $r2, $lr
tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
t2IT 11, 8, implicit-def $itstate
frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
bb.1:
frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
bb.2:
successors: %bb.3(0x80000000), %bb.5(0x80000000)
liveins: $r0, $r1, $r2
$lr = t2WhileLoopStartLR killed renamable $r0, %bb.3, implicit-def dead $cpsr
t2B %bb.5, 14 /* CC::al */, $noreg
bb.3:
successors: %bb.1(0x7c000000), %bb.4(0x04000000)
liveins: $lr, $r1, $r2
$lr = t2WhileLoopStartLR killed renamable $r0, %bb.1, implicit-def dead $cpsr
t2B %bb.4, 14 /* CC::al */, $noreg
bb.4:
successors: %bb.1, %bb.4
liveins: $lr, $r1, $r2
renamable $lr = t2LoopEndDec killed renamable $lr, %bb.4, implicit-def dead $cpsr
t2B %bb.1, 14 /* CC::al */, $noreg
bb.5:
successors: %bb.5, %bb.3
liveins: $lr, $r1, $r2
renamable $lr = t2LoopEndDec killed renamable $lr, %bb.5, implicit-def dead $cpsr
t2B %bb.3, 14 /* CC::al */, $noreg
...
---
name: no_predecessor
body: |
; CHECK-LABEL: name: no_predecessor
; CHECK: bb.0:
; CHECK: successors: %bb.2(0x30000000), %bb.1(0x50000000)
; CHECK: frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r4, killed $r5, $r7, killed $lr, implicit-def $sp, implicit $sp
; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 16
; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -8
; CHECK: frame-setup CFI_INSTRUCTION offset $r5, -12
; CHECK: frame-setup CFI_INSTRUCTION offset $r4, -16
; CHECK: $r7 = frame-setup tADDrSPi $sp, 2, 14 /* CC::al */, $noreg
; CHECK: frame-setup CFI_INSTRUCTION def_cfa $r7, 8
; CHECK: $r4 = tMOVr killed $r0, 14 /* CC::al */, $noreg
; CHECK: tBL 14 /* CC::al */, $noreg, @g, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0
; CHECK: tCMPi8 killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
; CHECK: t2Bcc %bb.2, 0 /* CC::eq */, killed $cpsr
; CHECK: bb.1:
; CHECK: successors: %bb.4(0x80000000)
; CHECK: renamable $r0, dead $cpsr = tMOVi8 4, 14 /* CC::al */, $noreg
; CHECK: renamable $r5 = t2LDRSHi12 killed renamable $r0, 0, 14 /* CC::al */, $noreg
; CHECK: t2B %bb.4, 14 /* CC::al */, $noreg
; CHECK: bb.2:
; CHECK: successors: %bb.4(0x80000000)
; CHECK: renamable $r5, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
; CHECK: t2B %bb.4, 14 /* CC::al */, $noreg
; CHECK: bb.3:
; CHECK: successors: %bb.4(0x80000000)
; CHECK: $r0 = tMOVr $r5, 14 /* CC::al */, $noreg
; 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
; CHECK: bb.4:
; CHECK: successors: %bb.5(0x04000000), %bb.3(0x7c000000)
; CHECK: renamable $r0 = tLDRi renamable $r4, 0, 14 /* CC::al */, $noreg
; CHECK: tCMPi8 killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
; CHECK: t2Bcc %bb.3, 1 /* CC::ne */, killed $cpsr
; CHECK: bb.5:
; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r4, def $r5, def $r7, def $pc
bb.0:
successors: %bb.1(0x30000000), %bb.2(0x50000000)
liveins: $r0, $r4, $r5, $lr
frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r4, killed $r5, $r7, killed $lr, implicit-def $sp, implicit $sp
frame-setup CFI_INSTRUCTION def_cfa_offset 16
frame-setup CFI_INSTRUCTION offset $lr, -4
frame-setup CFI_INSTRUCTION offset $r7, -8
frame-setup CFI_INSTRUCTION offset $r5, -12
frame-setup CFI_INSTRUCTION offset $r4, -16
$r7 = frame-setup tADDrSPi $sp, 2, 14 /* CC::al */, $noreg
frame-setup CFI_INSTRUCTION def_cfa $r7, 8
$r4 = tMOVr killed $r0, 14 /* CC::al */, $noreg
tBL 14 /* CC::al */, $noreg, @g, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0
tCMPi8 killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
t2Bcc %bb.1, 0 /* CC::eq */, killed $cpsr
bb.2:
successors: %bb.3(0x80000000)
liveins: $r4
renamable $r0, dead $cpsr = tMOVi8 4, 14 /* CC::al */, $noreg
renamable $r5 = t2LDRSHi12 killed renamable $r0, 0, 14 /* CC::al */, $noreg
t2B %bb.3, 14 /* CC::al */, $noreg
bb.1:
successors: %bb.3(0x80000000)
liveins: $r4
renamable $r5, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
t2B %bb.3, 14 /* CC::al */, $noreg
bb.4:
successors: %bb.3(0x80000000)
liveins: $r4, $r5
$r0 = tMOVr $r5, 14 /* CC::al */, $noreg
tBL 14 /* CC::al */, $noreg, @h, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit-def $sp, implicit-def dead $r0
bb.3:
successors: %bb.5(0x04000000), %bb.4(0x7c000000)
liveins: $r4, $r5
renamable $r0 = tLDRi renamable $r4, 0, 14 /* CC::al */, $noreg
tCMPi8 killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
t2Bcc %bb.4, 1 /* CC::ne */, killed $cpsr
bb.5:
frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r4, def $r5, def $r7, def $pc
...
---
name: nested_loops
alignment: 4
tracksRegLiveness: true
liveins:
- { reg: '$r0' }
- { reg: '$r1' }
- { reg: '$r2' }
- { reg: '$r3' }
frameInfo:
stackSize: 32
maxAlignment: 4
maxCallFrameSize: 0
fixedStack:
- { id: 0, size: 4, alignment: 8, isImmutable: true }
stack:
- { id: 0, type: spill-slot, offset: -4, size: 4, alignment: 4, callee-saved-register: '$lr',
callee-saved-restored: false }
- { id: 1, type: spill-slot, offset: -8, size: 4, alignment: 4, callee-saved-register: '$r10' }
- { id: 2, type: spill-slot, offset: -12, size: 4, alignment: 4, callee-saved-register: '$r9' }
- { id: 3, type: spill-slot, offset: -16, size: 4, alignment: 4, callee-saved-register: '$r8' }
- { id: 4, type: spill-slot, offset: -20, size: 4, alignment: 4, callee-saved-register: '$r7' }
- { id: 5, type: spill-slot, offset: -24, size: 4, alignment: 4, callee-saved-register: '$r6' }
- { id: 6, type: spill-slot, offset: -28, size: 4, alignment: 4, callee-saved-register: '$r5' }
- { id: 7, type: spill-slot, offset: -32, size: 4, alignment: 4, callee-saved-register: '$r4' }
machineFunctionInfo: {}
body: |
; CHECK-LABEL: name: nested_loops
; CHECK: bb.0:
; CHECK: successors: %bb.1(0x80000000)
; CHECK: liveins: $r0, $r1, $r2, $r3, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $lr
; 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
; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 32
; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
; CHECK: frame-setup CFI_INSTRUCTION offset $r10, -8
; CHECK: frame-setup CFI_INSTRUCTION offset $r9, -12
; CHECK: frame-setup CFI_INSTRUCTION offset $r8, -16
; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -20
; CHECK: frame-setup CFI_INSTRUCTION offset $r6, -24
; CHECK: frame-setup CFI_INSTRUCTION offset $r5, -28
; CHECK: frame-setup CFI_INSTRUCTION offset $r4, -32
; CHECK: tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
; CHECK: t2IT 11, 8, implicit-def $itstate
; 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
; CHECK: bb.1:
; CHECK: successors: %bb.3(0x80000000)
; CHECK: liveins: $r0, $r1, $r2, $r3
; CHECK: renamable $r12 = t2LDRi12 $sp, 32, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.0, align 8)
; CHECK: $r9 = tMOVr killed $r2, 14 /* CC::al */, $noreg
; CHECK: renamable $r8 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg
; CHECK: t2B %bb.3, 14 /* CC::al */, $noreg
; CHECK: bb.2:
; CHECK: successors: %bb.9(0x04000000), %bb.3(0x7c000000)
; CHECK: liveins: $r0, $r1, $r3, $r8, $r9, $r12
; CHECK: renamable $r8 = nuw nsw t2ADDri killed renamable $r8, 1, 14 /* CC::al */, $noreg, $noreg
; CHECK: renamable $r3, dead $cpsr = tADDi8 killed renamable $r3, 1, 14 /* CC::al */, $noreg
; CHECK: tCMPhir renamable $r8, renamable $r0, 14 /* CC::al */, $noreg, implicit-def $cpsr
; CHECK: renamable $r12 = t2ADDri killed renamable $r12, 1, 14 /* CC::al */, $noreg, $noreg
; CHECK: t2Bcc %bb.9, 0 /* CC::eq */, killed $cpsr
; CHECK: bb.3:
; CHECK: successors: %bb.4(0x50000000), %bb.2(0x30000000)
; CHECK: liveins: $r0, $r1, $r3, $r8, $r9, $r12
; CHECK: tCMPi8 renamable $r1, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
; CHECK: t2Bcc %bb.2, 11 /* CC::lt */, killed $cpsr
; CHECK: bb.4:
; CHECK: successors: %bb.5(0x80000000)
; CHECK: liveins: $r0, $r1, $r3, $r8, $r9, $r12
; CHECK: renamable $r4, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
; CHECK: $r10 = tMOVr $r12, 14 /* CC::al */, $noreg
; CHECK: $r2 = tMOVr $r3, 14 /* CC::al */, $noreg
; CHECK: t2B %bb.5, 14 /* CC::al */, $noreg
; CHECK: bb.5:
; CHECK: successors: %bb.7(0x50000000), %bb.6(0x30000000)
; CHECK: liveins: $r0, $r1, $r2, $r3, $r4, $r8, $r9, $r10, $r12
; CHECK: renamable $lr = t2WhileLoopStartLR killed renamable $r9, %bb.6, implicit-def dead $cpsr
; CHECK: t2B %bb.7, 14 /* CC::al */, $noreg
; CHECK: bb.6:
; CHECK: successors: %bb.2(0x04000000), %bb.5(0x7c000000)
; CHECK: liveins: $r0, $r1, $r2, $r3, $r4, $r8, $r9, $r10, $r12
; CHECK: renamable $r4, dead $cpsr = nuw nsw tADDi8 killed renamable $r4, 1, 14 /* CC::al */, $noreg
; CHECK: renamable $r2, dead $cpsr = tADDi8 killed renamable $r2, 1, 14 /* CC::al */, $noreg
; CHECK: tCMPr renamable $r4, renamable $r1, 14 /* CC::al */, $noreg, implicit-def $cpsr
; CHECK: renamable $r10 = t2ADDri killed renamable $r10, 1, 14 /* CC::al */, $noreg, $noreg
; CHECK: t2Bcc %bb.2, 0 /* CC::eq */, killed $cpsr
; CHECK: t2B %bb.5, 14 /* CC::al */, $noreg
; CHECK: bb.7:
; CHECK: successors: %bb.8(0x80000000)
; CHECK: liveins: $r0, $r1, $r2, $r3, $r4, $r8, $r9, $r10, $r12
; CHECK: $r5 = tMOVr $r10, 14 /* CC::al */, $noreg
; CHECK: $r6 = tMOVr $r2, 14 /* CC::al */, $noreg
; CHECK: t2B %bb.8, 14 /* CC::al */, $noreg
; CHECK: bb.8:
; CHECK: successors: %bb.8(0x7c000000), %bb.6(0x04000000)
; CHECK: liveins: $lr, $r0, $r1, $r2, $r3, $r4, $r5, $r6, $r8, $r9, $r10, $r12
; CHECK: tSTRi killed $r0, $r1, 0, 14 /* CC::al */, $noreg
; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.8, implicit-def dead $cpsr
; CHECK: t2B %bb.6, 14 /* CC::al */, $noreg
; CHECK: bb.9:
; 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
bb.0:
successors: %bb.1
liveins: $r0, $r1, $r2, $r3, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $lr
$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
frame-setup CFI_INSTRUCTION def_cfa_offset 32
frame-setup CFI_INSTRUCTION offset $lr, -4
frame-setup CFI_INSTRUCTION offset $r10, -8
frame-setup CFI_INSTRUCTION offset $r9, -12
frame-setup CFI_INSTRUCTION offset $r8, -16
frame-setup CFI_INSTRUCTION offset $r7, -20
frame-setup CFI_INSTRUCTION offset $r6, -24
frame-setup CFI_INSTRUCTION offset $r5, -28
frame-setup CFI_INSTRUCTION offset $r4, -32
tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
t2IT 11, 8, implicit-def $itstate
$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
bb.1:
liveins: $r0, $r1, $r2, $r3
renamable $r12 = t2LDRi12 $sp, 32, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.0, align 8)
$r9 = tMOVr killed $r2, 14 /* CC::al */, $noreg
renamable $r8 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg
t2B %bb.2, 14 /* CC::al */, $noreg
bb.8:
successors: %bb.9(0x04000000), %bb.2(0x7c000000)
liveins: $r0, $r1, $r3, $r8, $r9, $r12
renamable $r8 = nuw nsw t2ADDri killed renamable $r8, 1, 14 /* CC::al */, $noreg, $noreg
renamable $r3, dead $cpsr = tADDi8 killed renamable $r3, 1, 14 /* CC::al */, $noreg
tCMPhir renamable $r8, renamable $r0, 14 /* CC::al */, $noreg, implicit-def $cpsr
renamable $r12 = t2ADDri killed renamable $r12, 1, 14 /* CC::al */, $noreg, $noreg
t2Bcc %bb.9, 0 /* CC::eq */, killed $cpsr
bb.2:
successors: %bb.3(0x50000000), %bb.8(0x30000000)
liveins: $r0, $r1, $r3, $r8, $r9, $r12
tCMPi8 renamable $r1, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
t2Bcc %bb.8, 11 /* CC::lt */, killed $cpsr
bb.3:
liveins: $r0, $r1, $r3, $r8, $r9, $r12
renamable $r4, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
$r10 = tMOVr $r12, 14 /* CC::al */, $noreg
$r2 = tMOVr $r3, 14 /* CC::al */, $noreg
t2B %bb.4, 14 /* CC::al */, $noreg
bb.7:
successors: %bb.8(0x04000000), %bb.4(0x7c000000)
liveins: $r0, $r1, $r2, $r3, $r4, $r8, $r9, $r10, $r12
renamable $r4, dead $cpsr = nuw nsw tADDi8 killed renamable $r4, 1, 14 /* CC::al */, $noreg
renamable $r2, dead $cpsr = tADDi8 killed renamable $r2, 1, 14 /* CC::al */, $noreg
tCMPr renamable $r4, renamable $r1, 14 /* CC::al */, $noreg, implicit-def $cpsr
renamable $r10 = t2ADDri killed renamable $r10, 1, 14 /* CC::al */, $noreg, $noreg
t2Bcc %bb.8, 0 /* CC::eq */, killed $cpsr
bb.4:
successors: %bb.5(0x50000000), %bb.7(0x30000000)
liveins: $r0, $r1, $r2, $r3, $r4, $r8, $r9, $r10, $r12
renamable $lr = t2WhileLoopStartLR killed renamable $r9, %bb.7, implicit-def dead $cpsr
bb.5:
liveins: $r0, $r1, $r2, $r3, $r4, $r8, $r9, $r10, $r12
$r5 = tMOVr $r10, 14 /* CC::al */, $noreg
$r6 = tMOVr $r2, 14 /* CC::al */, $noreg
t2B %bb.6, 14 /* CC::al */, $noreg
bb.6:
successors: %bb.6(0x7c000000), %bb.7(0x04000000)
liveins: $lr, $r0, $r1, $r2, $r3, $r4, $r5, $r6, $r8, $r9, $r10, $r12
tSTRi killed $r0, $r1, 0, 14 /* CC::al */, $noreg
renamable $lr = t2LoopEndDec killed renamable $lr, %bb.6, implicit-def dead $cpsr
t2B %bb.7, 14 /* CC::al */, $noreg
bb.9:
$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
...
---
name: backwards_branch_forwards_wls
body: |
; CHECK-LABEL: name: backwards_branch_forwards_wls
; CHECK: bb.0:
; CHECK: successors: %bb.1(0x80000000)
; CHECK: tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
; CHECK: t2IT 11, 8, implicit-def $itstate
; CHECK: frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
; CHECK: bb.1:
; CHECK: successors: %bb.2(0x40000000), %bb.5(0x40000000)
; CHECK: $lr = t2WhileLoopStartLR killed renamable $r0, %bb.2, implicit-def dead $cpsr
; CHECK: t2B %bb.5, 14 /* CC::al */, $noreg
; CHECK: bb.2:
; CHECK: successors: %bb.4(0x40000000), %bb.3(0x40000000)
; CHECK: $lr = t2WhileLoopStartLR killed renamable $r0, %bb.3, implicit-def dead $cpsr
; CHECK: t2B %bb.4, 14 /* CC::al */, $noreg
; CHECK: bb.3:
; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
; CHECK: bb.4:
; CHECK: successors: %bb.3(0x40000000), %bb.4(0x40000000)
; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.4, implicit-def dead $cpsr
; CHECK: t2B %bb.3, 14 /* CC::al */, $noreg
; CHECK: bb.5:
; CHECK: successors: %bb.5(0x40000000), %bb.2(0x40000000)
; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.5, implicit-def dead $cpsr
; CHECK: t2B %bb.2, 14 /* CC::al */, $noreg
bb.0:
successors: %bb.2
liveins: $r0, $r1, $r2, $lr
tCMPi8 renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
t2IT 11, 8, implicit-def $itstate
frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
bb.2:
successors: %bb.3, %bb.5
liveins: $r0, $r1, $r2
$lr = t2WhileLoopStartLR killed renamable $r0, %bb.3, implicit-def dead $cpsr
t2B %bb.5, 14 /* CC::al */, $noreg
bb.1:
frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
bb.3:
successors: %bb.4, %bb.1
liveins: $lr, $r1, $r2
$lr = t2WhileLoopStartLR killed renamable $r0, %bb.1, implicit-def dead $cpsr
t2B %bb.4, 14 /* CC::al */, $noreg
bb.4:
successors: %bb.1, %bb.4
liveins: $lr, $r1, $r2
renamable $lr = t2LoopEndDec killed renamable $lr, %bb.4, implicit-def dead $cpsr
t2B %bb.1, 14 /* CC::al */, $noreg
bb.5:
successors: %bb.5, %bb.3
liveins: $lr, $r1, $r2
renamable $lr = t2LoopEndDec killed renamable $lr, %bb.5, implicit-def dead $cpsr
t2B %bb.3, 14 /* CC::al */, $noreg
...
---
name: multiple_predecessors
body: |
; CHECK-LABEL: name: multiple_predecessors
; CHECK: bb.0:
; CHECK: successors: %bb.3(0x55555555), %bb.2(0x2aaaaaab)
; CHECK: frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r7, killed $lr, implicit-def $sp, implicit $sp
; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 8
; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -8
; CHECK: $sp = frame-setup tSUBspi $sp, 1, 14 /* CC::al */, $noreg
; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 12
; CHECK: tCMPi8 killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
; CHECK: t2IT 0, 8, implicit-def $itstate
; CHECK: tCMPi8 killed renamable $r1, 8, 0 /* CC::eq */, killed $cpsr, implicit-def $cpsr, implicit killed $itstate
; CHECK: t2Bcc %bb.2, 0 /* CC::eq */, killed $cpsr
; CHECK: t2B %bb.3, 14 /* CC::al */, $noreg
; CHECK: bb.1:
; CHECK: successors: %bb.6(0x40000000), %bb.3(0x40000000)
; CHECK: renamable $lr = t2WhileLoopStartLR killed renamable $r2, %bb.3, implicit-def dead $cpsr
; CHECK: t2B %bb.6, 14 /* CC::al */, $noreg
; CHECK: bb.2:
; CHECK: successors: %bb.4(0x40000000), %bb.3(0x40000000)
; CHECK: renamable $lr = t2WhileLoopStartLR renamable $r2, %bb.3, implicit-def dead $cpsr
; CHECK: t2B %bb.4, 14 /* CC::al */, $noreg
; CHECK: bb.3:
; CHECK: $sp = frame-destroy tADDspi $sp, 1, 14 /* CC::al */, $noreg
; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc, implicit undef $r0
; CHECK: bb.4:
; CHECK: successors: %bb.5(0x80000000)
; CHECK: renamable $r3, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
; CHECK: renamable $r1 = t2ADDri $sp, 2, 14 /* CC::al */, $noreg, $noreg
; CHECK: renamable $r0 = IMPLICIT_DEF
; CHECK: bb.5:
; CHECK: successors: %bb.5(0x7c000000), %bb.1(0x04000000)
; CHECK: renamable $q0, renamable $r0 = MVE_VIWDUPu16 killed renamable $r0, renamable $r3, 1, 0, $noreg, undef renamable $q0
; CHECK: MVE_VSTRH16_rq undef renamable $q0, renamable $r1, killed renamable $q0, 0, $noreg
; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.5, implicit-def dead $cpsr
; CHECK: t2B %bb.1, 14 /* CC::al */, $noreg
; CHECK: bb.6:
; CHECK: successors: %bb.7(0x80000000)
; CHECK: renamable $r3, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
; CHECK: bb.7:
; CHECK: successors: %bb.7(0x7c000000), %bb.3(0x04000000)
; CHECK: renamable $q0, renamable $r0 = MVE_VIWDUPu16 killed renamable $r0, renamable $r3, 2, 0, $noreg, undef renamable $q0
; CHECK: MVE_VSTRH16_rq undef renamable $q0, renamable $r1, killed renamable $q0, 0, $noreg
; CHECK: renamable $lr = t2LoopEndDec killed renamable $lr, %bb.7, implicit-def dead $cpsr
; CHECK: t2B %bb.3, 14 /* CC::al */, $noreg
bb.0:
successors: %bb.7(0x80000000), %bb.1(0x40000000)
liveins: $r0, $r1, $r2, $r7, $lr
frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r7, killed $lr, implicit-def $sp, implicit $sp
frame-setup CFI_INSTRUCTION def_cfa_offset 8
frame-setup CFI_INSTRUCTION offset $lr, -4
frame-setup CFI_INSTRUCTION offset $r7, -8
$sp = frame-setup tSUBspi $sp, 1, 14 /* CC::al */, $noreg
frame-setup CFI_INSTRUCTION def_cfa_offset 12
tCMPi8 killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr
t2IT 0, 8, implicit-def $itstate
tCMPi8 killed renamable $r1, 8, 0 /* CC::eq */, killed $cpsr, implicit-def $cpsr, implicit killed $itstate
t2Bcc %bb.1, 0 /* CC::eq */, killed $cpsr
bb.7:
$sp = frame-destroy tADDspi $sp, 1, 14 /* CC::al */, $noreg
frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc, implicit undef $r0
bb.1:
successors: %bb.3(0x40000000), %bb.7(0x40000000)
liveins: $r2
renamable $lr = t2WhileLoopStartLR renamable $r2, %bb.7, implicit-def dead $cpsr
t2B %bb.3, 14 /* CC::al */, $noreg
bb.3:
successors: %bb.4(0x80000000)
liveins: $lr, $r2
renamable $r3, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
renamable $r1 = t2ADDri $sp, 2, 14 /* CC::al */, $noreg, $noreg
renamable $r0 = IMPLICIT_DEF
bb.4:
successors: %bb.4(0x7c000000), %bb.2(0x04000000)
liveins: $lr, $r0, $r1, $r2, $r3
renamable $q0, renamable $r0 = MVE_VIWDUPu16 killed renamable $r0, renamable $r3, 1, 0, $noreg, undef renamable $q0
MVE_VSTRH16_rq undef renamable $q0, renamable $r1, killed renamable $q0, 0, $noreg
renamable $lr = t2LoopEndDec killed renamable $lr, %bb.4, implicit-def dead $cpsr
t2B %bb.2, 14 /* CC::al */, $noreg
bb.2:
successors: %bb.5(0x40000000), %bb.7(0x40000000)
liveins: $r0, $r1, $r2
renamable $lr = t2WhileLoopStartLR killed renamable $r2, %bb.7, implicit-def dead $cpsr
t2B %bb.5, 14 /* CC::al */, $noreg
bb.5:
successors: %bb.6(0x80000000)
liveins: $lr, $r0, $r1
renamable $r3, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
bb.6:
successors: %bb.6(0x7c000000), %bb.7(0x04000000)
liveins: $lr, $r0, $r1, $r3
renamable $q0, renamable $r0 = MVE_VIWDUPu16 killed renamable $r0, renamable $r3, 2, 0, $noreg, undef renamable $q0
MVE_VSTRH16_rq undef renamable $q0, renamable $r1, killed renamable $q0, 0, $noreg
renamable $lr = t2LoopEndDec killed renamable $lr, %bb.6, implicit-def dead $cpsr
t2B %bb.7, 14 /* CC::al */, $noreg
...