summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-12-04 01:56:50 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-12-04 01:56:50 +0000
commiteb83dfde66b4614fe48a572ea2ee1d7b91bcbc19 (patch)
tree5447306745bb5aa1c97da48e0ad5a70db2269841 /test/CodeGen
parent6a9041e5ca9bdf2c1b586a7b2c6488374b39be74 (diff)
downloadllvm-eb83dfde66b4614fe48a572ea2ee1d7b91bcbc19.tar.gz
llvm-eb83dfde66b4614fe48a572ea2ee1d7b91bcbc19.tar.bz2
llvm-eb83dfde66b4614fe48a572ea2ee1d7b91bcbc19.tar.xz
Visibility hidden GVs do not require extra load of symbol address from the GOT or non-lazy-ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60519 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/hidden-vis-2.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/X86/hidden-vis-2.ll b/test/CodeGen/X86/hidden-vis-2.ll
new file mode 100644
index 0000000000..e000547f44
--- /dev/null
+++ b/test/CodeGen/X86/hidden-vis-2.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin9 | grep mov | count 1
+; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin9 | not grep GOT
+
+@x = weak hidden global i32 0 ; <i32*> [#uses=1]
+
+define i32 @t() nounwind readonly {
+entry:
+ %0 = load i32* @x, align 4 ; <i32> [#uses=1]
+ ret i32 %0
+}