1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/CodeGen/ARM/pei-swiftself.mir
Matt Arsenault cc12b285b6 CodeGen: Print/parse LLTs in MachineMemOperands
This will currently accept the old number of bytes syntax, and convert
it to a scalar. This should be removed in the near future (I think I
converted all of the tests already, but likely missed a few).

Not sure what the exact syntax and policy should be. We can continue
printing the number of bytes for non-generic instructions to avoid
test churn and only allow non-scalar types for generic instructions.

This will currently print the LLT in parentheses, but accept parsing
the existing integers and implicitly converting to scalar. The
parentheses are a bit ugly, but the parser logic seems unable to deal
without either parentheses or some keyword to indicate the start of a
type.
2021-06-30 16:54:13 -04:00

61 lines
1.6 KiB
YAML

# RUN: llc -o - %s -mtriple=arm-- -run-pass prologepilog | FileCheck %s
--- |
define swiftcc i8* @need_emergency_slot(i8 *swiftself %v) {
; Just a dummy to add a swiftself bit. The real code is in the MI below.
unreachable
}
...
---
# 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
tracksRegLiveness: true
stack:
- { id: 0, type: default, size: 8, alignment: 8 }
- { id: 1, type: default, size: 4096, alignment: 8 }
body: |
bb.0:
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.
$r0 = IMPLICIT_DEF
$r1 = IMPLICIT_DEF
$r2 = IMPLICIT_DEF
$r3 = IMPLICIT_DEF
$r4 = IMPLICIT_DEF
$r5 = IMPLICIT_DEF
$r6 = IMPLICIT_DEF
$r7 = IMPLICIT_DEF
$r8 = IMPLICIT_DEF
$r9 = IMPLICIT_DEF
$r11 = IMPLICIT_DEF
$r12 = IMPLICIT_DEF
$lr = IMPLICIT_DEF
; 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.
KILL $r10
KILL $r0
KILL $r1
KILL $r2
KILL $r3
KILL $r4
KILL $r5
KILL $r6
KILL $r7
KILL $r8
KILL $r9
KILL $r11
KILL $r12
KILL $lr
...