summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips/private.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Mips/private.ll')
-rw-r--r--test/CodeGen/Mips/private.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/private.ll b/test/CodeGen/Mips/private.ll
new file mode 100644
index 0000000..34b7547
--- /dev/null
+++ b/test/CodeGen/Mips/private.ll
@@ -0,0 +1,21 @@
+; Test to make sure that the 'private' is used correctly.
+;
+; RUN: llc < %s -march=mips > %t
+; RUN: grep \\\$foo: %t
+; RUN: grep call.*\\\$foo %t
+; RUN: grep \\\$baz: %t
+; RUN: grep lw.*\\\$baz %t
+
+declare void @foo()
+
+define private void @foo() {
+ ret void
+}
+
+@baz = private global i32 4
+
+define i32 @bar() {
+ call void @foo()
+ %1 = load i32* @baz, align 4
+ ret i32 %1
+}