summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-12-06 02:00:55 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-12-06 02:00:55 +0000
commitc3ccc1aaaf8a58a70d68d947e3b769b727d4e64f (patch)
tree76969745fe61aa7b8bf909d59bfcf7cacec63fba /test/CodeGen/ARM
parent5e600e67b11c55c204b3eec00798badc96ed720b (diff)
downloadllvm-c3ccc1aaaf8a58a70d68d947e3b769b727d4e64f.tar.gz
llvm-c3ccc1aaaf8a58a70d68d947e3b769b727d4e64f.tar.bz2
llvm-c3ccc1aaaf8a58a70d68d947e3b769b727d4e64f.tar.xz
Clean up some ARM GV asm printing out; minor fixes to match what gcc does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM')
-rw-r--r--test/CodeGen/ARM/2008-08-07-AsmPrintBug.ll2
-rw-r--r--test/CodeGen/ARM/hidden-vis-2.ll9
-rw-r--r--test/CodeGen/ARM/hidden-vis-3.ll14
-rw-r--r--test/CodeGen/ARM/hidden-vis.ll18
4 files changed, 42 insertions, 1 deletions
diff --git a/test/CodeGen/ARM/2008-08-07-AsmPrintBug.ll b/test/CodeGen/ARM/2008-08-07-AsmPrintBug.ll
index d2a8bb24ca..0a79e8665a 100644
--- a/test/CodeGen/ARM/2008-08-07-AsmPrintBug.ll
+++ b/test/CodeGen/ARM/2008-08-07-AsmPrintBug.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -mattr=+v6 -relocation-model=pic | grep lcomm
+; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -mattr=+v6 -relocation-model=pic | grep comm
%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
%struct.__gcov_var = type { %struct.FILE*, i32, i32, i32, i32, i32, i32, [1025 x i32] }
diff --git a/test/CodeGen/ARM/hidden-vis-2.ll b/test/CodeGen/ARM/hidden-vis-2.ll
new file mode 100644
index 0000000000..6cf69aa486
--- /dev/null
+++ b/test/CodeGen/ARM/hidden-vis-2.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | grep ldr | count 2
+
+@x = weak hidden global i32 0 ; <i32*> [#uses=1]
+
+define i32 @t() nounwind readonly {
+entry:
+ %0 = load i32* @x, align 4 ; <i32> [#uses=1]
+ ret i32 %0
+}
diff --git a/test/CodeGen/ARM/hidden-vis-3.ll b/test/CodeGen/ARM/hidden-vis-3.ll
new file mode 100644
index 0000000000..4477f2a441
--- /dev/null
+++ b/test/CodeGen/ARM/hidden-vis-3.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | grep ldr | count 6
+; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | grep non_lazy_ptr
+; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | grep long | count 4
+
+@x = external hidden global i32 ; <i32*> [#uses=1]
+@y = extern_weak hidden global i32 ; <i32*> [#uses=1]
+
+define i32 @t() nounwind readonly {
+entry:
+ %0 = load i32* @x, align 4 ; <i32> [#uses=1]
+ %1 = load i32* @y, align 4 ; <i32> [#uses=1]
+ %2 = add i32 %1, %0 ; <i32> [#uses=1]
+ ret i32 %2
+}
diff --git a/test/CodeGen/ARM/hidden-vis.ll b/test/CodeGen/ARM/hidden-vis.ll
new file mode 100644
index 0000000000..93f81ecdae
--- /dev/null
+++ b/test/CodeGen/ARM/hidden-vis.ll
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | \
+; RUN: grep .private_extern | count 2
+
+%struct.Person = type { i32 }
+@a = hidden global i32 0
+@b = external global i32
+
+
+define weak hidden void @_ZN6Person13privateMethodEv(%struct.Person* %this) {
+ ret void
+}
+
+declare void @function(i32)
+
+define weak void @_ZN6PersonC1Ei(%struct.Person* %this, i32 %_c) {
+ ret void
+}
+