1 # RUN: llc -o - %s -mtriple=arm-- -run-pass prologepilog | FileCheck %s
3 define swiftcc i8* @need_emergency_slot(i8 *swiftself %v) {
4 ; Just a dummy to add a swiftself bit. The real code is in the MI below.
9 # CHECK-LABEL: name: need_emergency_slot
10 # Make sure we do not just assume an unsaved/restored callee saved register
11 # is free to use. Callee saved parameters may still be used if they were used
12 # to pass arguments (as in swiftself).
13 name: need_emergency_slot
14 tracksRegLiveness: true
16 - { id: 0, type: default, size: 8, alignment: 8 }
17 - { id: 1, type: default, size: 4096, alignment: 8 }
20 liveins: $r10 ; swiftself parameter comes in as $r10
22 ; Bring up register pressure to force emergency spilling, coax scavenging
23 ; to use $r10 as that one is not spilled/restored.
38 ; Computing the large stack offset requires an extra register. We should
39 ; not just use $r10 for that.
40 ; CHECK-NOT: STRi12 %1,{{.*}}$r10
42 STRi12 $r1, %stack.0, 0, 14, $noreg :: (store 4)
44 ; use the swiftself parameter value.