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