summaryrefslogtreecommitdiff
path: root/test/CodeGen/Hexagon/pic-local.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Hexagon/pic-local.ll')
-rw-r--r--test/CodeGen/Hexagon/pic-local.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/Hexagon/pic-local.ll b/test/CodeGen/Hexagon/pic-local.ll
new file mode 100644
index 0000000000000..48b0096aa6521
--- /dev/null
+++ b/test/CodeGen/Hexagon/pic-local.ll
@@ -0,0 +1,19 @@
+; RUN: llc -march=hexagon -mcpu=hexagonv5 -relocation-model=pic < %s | FileCheck %s
+
+define private void @f1() {
+ ret void
+}
+
+define internal void @f2() {
+ ret void
+}
+
+define void()* @get_f1() {
+ ; CHECK: r0 = add(pc, ##.Lf1@PCREL)
+ ret void()* @f1
+}
+
+define void()* @get_f2() {
+ ; CHECK: r0 = add(pc, ##f2@PCREL)
+ ret void()* @f2
+}