mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 16:56:50 +00:00
2c0dd61dd0
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
17 lines
368 B
LLVM
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
|