1 # RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass none -o - %s | FileCheck %s
5 @local_addr = global i64* null
7 define void @stack_local() {
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
18 tracksRegLiveness: true
20 - { id: 0, class: gpr64common }
21 - { id: 1, class: gpr64 }
22 - { id: 2, class: gpr64common }
23 - { id: 3, class: gpr64common }
26 # CHECK-LABEL: stack_local
28 # CHECK: - { id: 0, name: local_var, type: default, offset: 0, size: 8, alignment: 8,
29 # CHECK-NEXT: stack-id: default, callee-saved-register: '', callee-saved-restored: true,
30 # CHECK-NEXT: local-offset: -8, debug-info-variable: '', debug-info-expression: '',
31 # CHECK-NEXT: debug-info-location: '' }
33 - { id: 0,name: local_var,offset: 0,size: 8,alignment: 8, local-offset: -8 }
37 %1 = LDRXui killed %0, @var :: (load 8 from @var)
38 STRXui killed %1, %stack.0.local_var, 0 :: (store 8 into %ir.local_var)
40 %3 = ADDXri %stack.0.local_var, 0, 0
41 STRXui killed %3, killed %2, @local_addr :: (store 8 into @local_addr)