summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorJacques Pienaar <jpienaar@google.com>2016-12-15 16:56:16 +0000
committerJacques Pienaar <jpienaar@google.com>2016-12-15 16:56:16 +0000
commitccffe38352fe4042c7fb3bb36ba1e6fea9df9e34 (patch)
tree334036e6473808ee4cfbc16e805a7a923f05bc96 /llvm/test
parent659949cb03c7c49a1a9c7096cf211311f5171846 (diff)
downloadbcm5719-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.ll14
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
+}
OpenPOWER on IntegriCloud