1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 05:52:53 +02:00
llvm-mirror/test/CodeGen/MIR/AArch64/stack-object-local-offset.mir
Alex Lorenz 6cf20390c0 MIR Serialization: Use the global value syntax for global value memory operands.
This commit modifies the serialization syntax so that the global IR values in
machine memory operands use the global value '@<name>' syntax instead of the
current '%ir.<name>' syntax.

The unnamed global IR values are handled by this commit as well, as the
existing global value parsing method can parse the unnamed globals already.

llvm-svn: 245527
2015-08-20 00:20:03 +00:00

42 lines
1.2 KiB
YAML

# RUN: llc -mtriple=aarch64-none-linux-gnu -start-after machine-sink -stop-after machine-sink -o /dev/null %s | FileCheck %s
--- |
@var = global i64 0
@local_addr = global i64* null
define void @stack_local() {
entry:
%local_var = alloca i64
%val = load i64, i64* @var
store i64 %val, i64* %local_var
store i64* %local_var, i64** @local_addr
ret void
}
...
---
name: stack_local
isSSA: true
tracksRegLiveness: true
registers:
- { id: 0, class: gpr64common }
- { id: 1, class: gpr64 }
- { id: 2, class: gpr64common }
- { id: 3, class: gpr64common }
frameInfo:
maxAlignment: 8
# CHECK-LABEL: stack_local
# CHECK: stack:
# CHECK_NEXT: { id:0, name:local_var, offset:0, size:8, alignment:8, local-offset: -8 }
stack:
- { id: 0,name: local_var,offset: 0,size: 8,alignment: 8, local-offset: -8 }
body: |
bb.0.entry:
%0 = ADRP @var
%1 = LDRXui killed %0, @var :: (load 8 from @var)
STRXui killed %1, %stack.0.local_var, 0 :: (store 8 into %ir.local_var)
%2 = ADRP @local_addr
%3 = ADDXri %stack.0.local_var, 0, 0
STRXui killed %3, killed %2, @local_addr :: (store 8 into @local_addr)
RET_ReallyLR
...