summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/x86-64-pic-6.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2008-06-09 09:52:31 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2008-06-09 09:52:31 +0000
commitd674b4e87d76609994ffc82aae6b2eb37e8b02db (patch)
treeed8d9768127a9fa4c9c232bda3b3ad5eb180c56e /test/CodeGen/X86/x86-64-pic-6.ll
parent313f0e63f7c751e2ef6b2dbc163f1b68d2bcc4c8 (diff)
downloadllvm-d674b4e87d76609994ffc82aae6b2eb37e8b02db.tar.gz
llvm-d674b4e87d76609994ffc82aae6b2eb37e8b02db.tar.bz2
llvm-d674b4e87d76609994ffc82aae6b2eb37e8b02db.tar.xz
add support for PIC on linux x86-64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52139 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/x86-64-pic-6.ll')
-rw-r--r--test/CodeGen/X86/x86-64-pic-6.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/X86/x86-64-pic-6.ll b/test/CodeGen/X86/x86-64-pic-6.ll
new file mode 100644
index 0000000000..b8a91f10ea
--- /dev/null
+++ b/test/CodeGen/X86/x86-64-pic-6.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | \
+; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
+; RUN: grep {movl a(%rip),} %t1
+; RUN: not grep GOTPCREL %t1
+
+@a = internal global i32 0
+
+define i32 @get_a() {
+entry:
+ %tmp1 = load i32* @a, align 4
+ ret i32 %tmp1
+}