diff options
author | Jacques Pienaar <jpienaar@google.com> | 2016-12-15 16:56:16 +0000 |
---|---|---|
committer | Jacques Pienaar <jpienaar@google.com> | 2016-12-15 16:56:16 +0000 |
commit | ccffe38352fe4042c7fb3bb36ba1e6fea9df9e34 (patch) | |
tree | 334036e6473808ee4cfbc16e805a7a923f05bc96 /llvm/test | |
parent | 659949cb03c7c49a1a9c7096cf211311f5171846 (diff) | |
download | bcm5719-llvm-ccffe38352fe4042c7fb3bb36ba1e6fea9df9e34.tar.gz bcm5719-llvm-ccffe38352fe4042c7fb3bb36ba1e6fea9df9e34.zip |
[lanai] Simplify small section check in LowerGlobalAddress and treat ldata sections specially.
Move the check for the code model into isGlobalInSmallSectionImpl and return false (not in small section) for variables placed in sections prefixed with .ldata (workaround for a tool limitation).
llvm-svn: 289832
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/Lanai/codemodel.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Lanai/codemodel.ll b/llvm/test/CodeGen/Lanai/codemodel.ll index e5ec7265924..6bc0dc4d398 100644 --- a/llvm/test/CodeGen/Lanai/codemodel.ll +++ b/llvm/test/CodeGen/Lanai/codemodel.ll @@ -28,3 +28,17 @@ entry: ret i32 %0 } +@y = local_unnamed_addr global i32* null, section ".ldata,block", align 8 + +define i32 @foo2() nounwind readonly { +entry: +; CHECK-SMALL-LABEL: foo2: +; CHECK-SMALL: mov hi(y), %r[[REGISTER:[0-9]+]] +; CHECK-SMALL: or %r[[REGISTER]], lo(y), %r[[REGISTER]] +; CHECK-LABEL: foo2: +; CHECK: mov hi(y), %r[[REGISTER:[0-9]+]] +; CHECK: or %r[[REGISTER]], lo(y), %r[[REGISTER]] + %0 = load i32*, i32** @y, align 8 + %1 = load i32, i32* %0, align 4 + ret i32 %1 +} |