llvm/test/CodeGen/ARM/alias_store.ll
Evgeniy Stepanov 2c0dd61dd0 Fix PR31896.
Address of an alias of a global with offset is incorrectly lowered as an address of the global (i.e. ignoring offset).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295762 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-21 20:17:34 +00:00

17 lines
368 B
LLVM

; RUN: llc < %s -mtriple=arm-linux-gnueabi | FileCheck %s
@X = constant {i8, i8 } { i8 0, i8 0 }
@XA = alias i8, getelementptr inbounds ({ i8, i8 }, {i8, i8}* @X, i32 0, i32 1)
define void @f(i8** %p) align 2 {
entry:
store i8* @XA, i8 **%p, align 4
ret void
}
; CHECK: f:
; CHECK: ldr r{{.*}}, [[L:.*]]
; CHECK: [[L]]:
; CHECK-NEXT: .long XA
; CHECK: XA = X+1