diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-02-21 20:17:34 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-02-21 20:17:34 +0000 |
commit | 1fd19c6e5df00c8a9025a0d62d0f37c0643072ed (patch) | |
tree | 63a9b2e3368cfeec97742153a8b71621522d1cb3 /llvm/test | |
parent | 0eec53cb41523790c47e6d1d4a9c98c15d33e9b6 (diff) | |
download | bcm5719-llvm-1fd19c6e5df00c8a9025a0d62d0f37c0643072ed.tar.gz bcm5719-llvm-1fd19c6e5df00c8a9025a0d62d0f37c0643072ed.zip |
Fix PR31896.
Address of an alias of a global with offset is incorrectly lowered as an address of the global (i.e. ignoring offset).
llvm-svn: 295762
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/ARM/alias_store.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/alias_store.ll b/llvm/test/CodeGen/ARM/alias_store.ll new file mode 100644 index 00000000000..48f21fc03ec --- /dev/null +++ b/llvm/test/CodeGen/ARM/alias_store.ll @@ -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 |