forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
2 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
; 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 |