summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/readonly-aliases.ll
blob: c90650d3a81de68d040642b218746a7c021cbe9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
; RUN: llc -mtriple thumbv7-unknown-linux-android -filetype asm -o - %s | FileCheck %s

@a = protected constant <{ i32, i32 }> <{ i32 0, i32 0 }>
@b = protected alias i32, getelementptr(i32, i32* getelementptr inbounds (<{ i32, i32 }>, <{ i32, i32 }>* @a, i32 0, i32 1), i32 -1)

declare void @f(i32*)

define void @g() {
entry:
  call void @f(i32* @b)
  ret void
}

; CHECK-LABEL: g:
; CHECK: movw [[REGISTER:r[0-9]+]], :lower16:b
; CHECK: movt [[REGISTER]], :upper16:b

OpenPOWER on IntegriCloud