1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc %s -o - -run-pass=if-converter -verify-machineinstrs | FileCheck %s
3 # Make sure we correctly if-convert blocks containing an unanalyzable branch sequence.
4 # (In this case, multiple conditional branches)
7 target triple = "thumbv7-unknown-linux-gnueabi"
9 define dso_local void @fn1() {
14 declare dso_local i32 @fn2(...)
19 tracksRegLiveness: true
21 ; CHECK-LABEL: name: fn1
23 ; CHECK: successors: %bb.1(0x40000000), %bb.2(0x40000000)
24 ; CHECK: liveins: $r0, $r1, $r2, $r4, $lr
25 ; CHECK: $sp = frame-setup t2STMDB_UPD $sp, 14 /* CC::al */, $noreg, killed $r4, killed $lr
26 ; CHECK: t2CMPri killed renamable $r2, 34, 14 /* CC::al */, $noreg, implicit-def $cpsr
27 ; CHECK: $r0 = t2MOVi 2, 1 /* CC::ne */, $cpsr, $noreg
28 ; CHECK: $r0 = t2MOVi 3, 0 /* CC::eq */, killed $cpsr, $noreg, implicit killed $r0
29 ; CHECK: tBL 14 /* CC::al */, $noreg, @fn2, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit killed $r1, implicit-def $sp, implicit-def dead $r0
30 ; CHECK: t2CMPri $sp, 34, 14 /* CC::al */, $noreg, implicit-def $cpsr
31 ; CHECK: t2Bcc %bb.2, 1 /* CC::ne */, $cpsr
32 ; CHECK: t2Bcc %bb.2, 2 /* CC::hs */, killed $cpsr
33 ; CHECK: t2B %bb.1, 14 /* CC::al */, $noreg
35 ; CHECK: INLINEASM &"", 1
36 ; CHECK: $sp = t2LDMIA_RET $sp, 14 /* CC::al */, $noreg, def $r4, def $pc
37 ; CHECK: bb.2.l_yes (address-taken):
38 ; CHECK: $sp = t2LDMIA_RET $sp, 14 /* CC::al */, $noreg, def $r4, def $pc
40 successors: %bb.1(0x40000000), %bb.2(0x40000000)
41 liveins: $r0, $r1, $r2, $r4, $lr
43 $sp = frame-setup t2STMDB_UPD $sp, 14, $noreg, killed $r4, killed $lr
44 t2CMPri killed renamable $r2, 34, 14, $noreg, implicit-def $cpsr
45 t2Bcc %bb.2, 1, killed $cpsr
48 successors: %bb.3(0x40000000), %bb.4(0x40000000)
51 $r0 = t2MOVi 3, 14, $noreg, $noreg
52 tBL 14, $noreg, @fn2, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit $r0, implicit $r1, implicit-def $sp, implicit-def dead $r0
53 t2CMPri $sp, 34, 14, $noreg, implicit-def $cpsr
55 t2Bcc %bb.4, 2, killed $cpsr
59 successors: %bb.3(0x40000000), %bb.4(0x40000000)
62 $r0 = t2MOVi 2, 14, $noreg, $noreg
63 tBL 14, $noreg, @fn2, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit $r0, implicit $r1, implicit-def $sp, implicit-def dead $r0
64 t2CMPri $sp, 34, 14, $noreg, implicit-def $cpsr
66 t2Bcc %bb.4, 2, killed $cpsr
71 $sp = t2LDMIA_RET $sp, 14, $noreg, def $r4, def $pc
73 bb.4.l_yes (address-taken):
74 $sp = t2LDMIA_RET $sp, 14, $noreg, def $r4, def $pc