• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -mtriple=aarch64-none-linux-gnu -start-after machine-sink -stop-after machine-sink -o - %s | FileCheck %s
2
3--- |
4  @var = global i64 0
5  @local_addr = global i64* null
6
7  define void @stack_local() {
8  entry:
9    %local_var = alloca i64
10    %val = load i64, i64* @var
11    store i64 %val, i64* %local_var
12    store i64* %local_var, i64** @local_addr
13    ret void
14  }
15...
16---
17name:            stack_local
18isSSA:           true
19tracksRegLiveness: true
20registers:
21  - { id: 0, class: gpr64common }
22  - { id: 1, class: gpr64 }
23  - { id: 2, class: gpr64common }
24  - { id: 3, class: gpr64common }
25frameInfo:
26  maxAlignment:    8
27# CHECK-LABEL: stack_local
28# CHECK: stack:
29# CHECK-NEXT: { id: 0, name: local_var, offset: 0, size: 8, alignment: 8, local-offset: -8 }
30stack:
31  - { id: 0,name: local_var,offset: 0,size: 8,alignment: 8, local-offset: -8 }
32body: |
33  bb.0.entry:
34    %0 = ADRP @var
35    %1 = LDRXui killed %0, @var :: (load 8 from @var)
36    STRXui killed %1, %stack.0.local_var, 0 :: (store 8 into %ir.local_var)
37    %2 = ADRP @local_addr
38    %3 = ADDXri %stack.0.local_var, 0, 0
39    STRXui killed %3, killed %2, @local_addr :: (store 8 into @local_addr)
40    RET_ReallyLR
41...
42