summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/x86-64-pic-9.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/x86-64-pic-9.ll')
-rw-r--r--test/CodeGen/X86/x86-64-pic-9.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/X86/x86-64-pic-9.ll b/test/CodeGen/X86/x86-64-pic-9.ll
new file mode 100644
index 0000000000..eacfcc11d0
--- /dev/null
+++ b/test/CodeGen/X86/x86-64-pic-9.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | \
+; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1 -f
+; RUN: grep {leaq f(%rip),} %t1
+; RUN: not grep GOTPCREL %t1
+
+define void ()* @g() {
+entry:
+ ret void ()* @f
+}
+
+define internal void @f() {
+entry:
+ ret void
+}