summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SystemZ/pie.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-06-23 21:18:59 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-06-23 21:18:59 +0000
commit2d3cce71eeb929efbab95466ba3847ea8e3d09c1 (patch)
tree36a5ea4e01cba40f8dcfa79f5d4837b38ead74ed /llvm/test/CodeGen/SystemZ/pie.ll
parentd14d05affeb6d04c6ed861f6df12ba0c0c8fe827 (diff)
downloadbcm5719-llvm-2d3cce71eeb929efbab95466ba3847ea8e3d09c1.tar.gz
bcm5719-llvm-2d3cce71eeb929efbab95466ba3847ea8e3d09c1.zip
Uses shouldAssumeDSOLocal.
With that SystemZ knows to avoid a GOT for PIE. llvm-svn: 273614
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/pie.ll')
-rw-r--r--llvm/test/CodeGen/SystemZ/pie.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/pie.ll b/llvm/test/CodeGen/SystemZ/pie.ll
new file mode 100644
index 00000000000..8fc26145446
--- /dev/null
+++ b/llvm/test/CodeGen/SystemZ/pie.ll
@@ -0,0 +1,13 @@
+; RUN: llc -mtriple=s390x-linux-gnu -relocation-model=pic < %s | FileCheck %s
+
+@foo = global i32 42
+
+define i32* @get_foo() {
+ ret i32* @foo
+}
+
+; CHECK: larl %r2, foo{{$}}
+
+!llvm.module.flags = !{!0}
+
+!0 = !{i32 1, !"PIE Level", i32 2}
OpenPOWER on IntegriCloud