1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -o - %s -mtriple=thumbv7-- -run-pass=stack-protector -run-pass=prologepilog | FileCheck %s
4 # This should trigger an emergency spill in the register scavenger because the
5 # frame offset into the large argument is too large.
7 tracksRegLiveness: true
9 - { id: 0, offset: 4084, size: 4, alignment: 4, isImmutable: true,
11 - { id: 1, offset: -12, size: 4096, alignment: 4, isImmutable: false,
15 ; CHECK-LABEL: name: func0
16 ; CHECK: liveins: $r4, $r5, $r6, $r7, $r8, $r9, $r10, $r11, $lr
17 ; 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 $r11, killed $lr
18 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 36
19 ; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -16
20 ; CHECK: frame-setup CFI_INSTRUCTION offset $r11, -20
21 ; CHECK: frame-setup CFI_INSTRUCTION offset $r10, -24
22 ; CHECK: frame-setup CFI_INSTRUCTION offset $r9, -28
23 ; CHECK: frame-setup CFI_INSTRUCTION offset $r8, -32
24 ; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -36
25 ; CHECK: frame-setup CFI_INSTRUCTION offset $r6, -40
26 ; CHECK: frame-setup CFI_INSTRUCTION offset $r5, -44
27 ; CHECK: frame-setup CFI_INSTRUCTION offset $r4, -48
28 ; CHECK: $sp = frame-setup tSUBspi $sp, 4, 14 /* CC::al */, $noreg
29 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 52
30 ; CHECK: $r0 = IMPLICIT_DEF
31 ; CHECK: $r1 = IMPLICIT_DEF
32 ; CHECK: $r2 = IMPLICIT_DEF
33 ; CHECK: $r3 = IMPLICIT_DEF
34 ; CHECK: $r4 = IMPLICIT_DEF
35 ; CHECK: $r5 = IMPLICIT_DEF
36 ; CHECK: $r6 = IMPLICIT_DEF
37 ; CHECK: $r7 = IMPLICIT_DEF
38 ; CHECK: $r8 = IMPLICIT_DEF
39 ; CHECK: $r9 = IMPLICIT_DEF
40 ; CHECK: $r10 = IMPLICIT_DEF
41 ; CHECK: $r11 = IMPLICIT_DEF
42 ; CHECK: $r12 = IMPLICIT_DEF
43 ; CHECK: $lr = IMPLICIT_DEF
44 ; CHECK: t2STRi12 killed $r0, $sp, 0, 14 /* CC::al */, $noreg :: (store (s32) into %stack.0)
45 ; CHECK: $r0 = t2ADDri killed $sp, 4096, 14 /* CC::al */, $noreg, $noreg
46 ; CHECK: $sp = t2LDRi12 killed $r0, 40, 14 /* CC::al */, $noreg :: (load (s32))
47 ; CHECK: $r0 = t2LDRi12 $sp, 0, 14 /* CC::al */, $noreg :: (load (s32) from %stack.0)
77 $sp = t2LDRi12 %fixed-stack.0, 0, 14, $noreg :: (load (s32))
95 # This should not trigger an emergency spill yet.
97 tracksRegLiveness: true
99 - { id: 0, offset: 4044, size: 4, alignment: 4, isImmutable: true,
101 - { id: 1, offset: -12, size: 4056, alignment: 4, isImmutable: false,
105 ; CHECK-LABEL: name: func1
106 ; CHECK: liveins: $r4, $r5, $r6, $r8, $r9, $r10, $r11, $lr
107 ; CHECK: $sp = frame-setup t2STMDB_UPD $sp, 14 /* CC::al */, $noreg, killed $r4, killed $r5, killed $r6, killed $r8, killed $r9, killed $r10, killed $r11, killed $lr
108 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 32
109 ; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -16
110 ; CHECK: frame-setup CFI_INSTRUCTION offset $r11, -20
111 ; CHECK: frame-setup CFI_INSTRUCTION offset $r10, -24
112 ; CHECK: frame-setup CFI_INSTRUCTION offset $r9, -28
113 ; CHECK: frame-setup CFI_INSTRUCTION offset $r8, -32
114 ; CHECK: frame-setup CFI_INSTRUCTION offset $r6, -36
115 ; CHECK: frame-setup CFI_INSTRUCTION offset $r5, -40
116 ; CHECK: frame-setup CFI_INSTRUCTION offset $r4, -44
117 ; CHECK: $sp = frame-setup tSUBspi $sp, 4, 14 /* CC::al */, $noreg
118 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 48
119 ; CHECK: $r0 = IMPLICIT_DEF
120 ; CHECK: $r1 = IMPLICIT_DEF
121 ; CHECK: $r2 = IMPLICIT_DEF
122 ; CHECK: $r3 = IMPLICIT_DEF
123 ; CHECK: $r4 = IMPLICIT_DEF
124 ; CHECK: $r5 = IMPLICIT_DEF
125 ; CHECK: $r6 = IMPLICIT_DEF
126 ; CHECK: $r8 = IMPLICIT_DEF
127 ; CHECK: $r9 = IMPLICIT_DEF
128 ; CHECK: $r10 = IMPLICIT_DEF
129 ; CHECK: $r11 = IMPLICIT_DEF
130 ; CHECK: $r12 = IMPLICIT_DEF
131 ; CHECK: $lr = IMPLICIT_DEF
132 ; CHECK: $r11 = t2LDRi12 $sp, 4092, 14 /* CC::al */, $noreg :: (load (s32))
160 $r11 = t2LDRi12 %fixed-stack.0, 0, 14, $noreg :: (load (s32))