summaryrefslogtreecommitdiff
path: root/test/CodeGen/IA64/private.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/IA64/private.ll')
-rw-r--r--test/CodeGen/IA64/private.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/IA64/private.ll b/test/CodeGen/IA64/private.ll
new file mode 100644
index 00000000000..04170a95808
--- /dev/null
+++ b/test/CodeGen/IA64/private.ll
@@ -0,0 +1,21 @@
+; Test to make sure that the 'private' is used correctly.
+;
+; RUN: llvm-as < %s | llc -march=ia64 > %t
+; RUN: grep .foo: %t
+; RUN: grep br.call.sptk.*\.foo %t
+; RUN: grep .baz: %t
+; RUN: grep ltoff.*\.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
+}