summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Goodwin <david_goodwin@apple.com>2009-06-29 22:25:22 +0000
committerDavid Goodwin <david_goodwin@apple.com>2009-06-29 22:25:22 +0000
commit8ba221d5c55bbfce03fade83b188cb36f291aca8 (patch)
tree7ce7798d41c63e2b153168092e5e70a8231b6847
parent1ad7edc2125d57dcd6c54810d7a4a5f4f77da34b (diff)
Thumb-2 tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74464 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/Thumb2/thumb2-adc.ll20
-rw-r--r--test/CodeGen/Thumb2/thumb2-add2.ll5
-rw-r--r--test/CodeGen/Thumb2/thumb2-sbc2.ll6
-rw-r--r--test/CodeGen/Thumb2/thumb2-sub.ll31
-rw-r--r--test/CodeGen/Thumb2/thumb2-sub2.ll6
-rw-r--r--test/CodeGen/Thumb2/thumb2-sub4.ll6
-rw-r--r--test/CodeGen/Thumb2/thumb2-sub5.ll6
7 files changed, 65 insertions, 15 deletions
diff --git a/test/CodeGen/Thumb2/thumb2-adc.ll b/test/CodeGen/Thumb2/thumb2-adc.ll
index 4424c1ac900..c1565b30096 100644
--- a/test/CodeGen/Thumb2/thumb2-adc.ll
+++ b/test/CodeGen/Thumb2/thumb2-adc.ll
@@ -1,32 +1,32 @@
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {adc\\W*r\[0-9\],\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#171\\|#1179666\\|#872428544\\|#1448498774\\|#66846720} | count 5
-; 734439407617 = 0x000000ab00000001
+; 734439407618 = 0x000000ab00000002
define i64 @f1(i64 %a) {
- %tmp = add i64 %a, 734439407617
+ %tmp = add i64 %a, 734439407618
ret i64 %tmp
}
-; 5066626890203137 = 0x0012001200000001
+; 5066626890203138 = 0x0012001200000002
define i64 @f2(i64 %a) {
- %tmp = add i64 %a, 5066626890203137
+ %tmp = add i64 %a, 5066626890203138
ret i64 %tmp
}
-; 3747052064576897025 = 0x3400340000000001
+; 3747052064576897026 = 0x3400340000000002
define i64 @f3(i64 %a) {
- %tmp = add i64 %a, 3747052064576897025
+ %tmp = add i64 %a, 3747052064576897026
ret i64 %tmp
}
-; 6221254862626095105 = 0x5656565600000001
+; 6221254862626095106 = 0x5656565600000002
define i64 @f4(i64 %a) {
- %tmp = add i64 %a, 6221254862626095105
+ %tmp = add i64 %a, 6221254862626095106
ret i64 %tmp
}
-; 287104476244869121 = 0x03fc000000000001
+; 287104476244869122 = 0x03fc000000000002
define i64 @f5(i64 %a) {
- %tmp = add i64 %a, 287104476244869121
+ %tmp = add i64 %a, 287104476244869122
ret i64 %tmp
}
diff --git a/test/CodeGen/Thumb2/thumb2-add2.ll b/test/CodeGen/Thumb2/thumb2-add2.ll
index f94b3c166d8..be89508c7ef 100644
--- a/test/CodeGen/Thumb2/thumb2-add2.ll
+++ b/test/CodeGen/Thumb2/thumb2-add2.ll
@@ -29,8 +29,3 @@ define i32 @f5(i32 %a) {
%tmp = add i32 %a, 510
ret i32 %tmp
}
-
-define i32 @f6(i32 %a) {
- %tmp = add i32 %a, 4095
- ret i32 %tmp
-}
diff --git a/test/CodeGen/Thumb2/thumb2-sbc2.ll b/test/CodeGen/Thumb2/thumb2-sbc2.ll
new file mode 100644
index 00000000000..4302f761195
--- /dev/null
+++ b/test/CodeGen/Thumb2/thumb2-sbc2.ll
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {sbc\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\]*} | count 1
+
+define i64 @f1(i64 %a, i64 %b) {
+ %tmp = sub i64 %a, %b
+ ret i64 %tmp
+}
diff --git a/test/CodeGen/Thumb2/thumb2-sub.ll b/test/CodeGen/Thumb2/thumb2-sub.ll
new file mode 100644
index 00000000000..cf8270412d1
--- /dev/null
+++ b/test/CodeGen/Thumb2/thumb2-sub.ll
@@ -0,0 +1,31 @@
+; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {sub\[w\]\\?\\W*r\[0-9\],\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#171\\|#1179666\\|#872428544\\|#1448498774\\|#510} | count 5
+
+; 171 = 0x000000ab
+define i32 @f1(i32 %a) {
+ %tmp = sub i32 %a, 171
+ ret i32 %tmp
+}
+
+; 1179666 = 0x00120012
+define i32 @f2(i32 %a) {
+ %tmp = sub i32 %a, 1179666
+ ret i32 %tmp
+}
+
+; 872428544 = 0x34003400
+define i32 @f3(i32 %a) {
+ %tmp = sub i32 %a, 872428544
+ ret i32 %tmp
+}
+
+; 1448498774 = 0x56565656
+define i32 @f4(i32 %a) {
+ %tmp = sub i32 %a, 1448498774
+ ret i32 %tmp
+}
+
+; 510 = 0x000001fe
+define i32 @f5(i32 %a) {
+ %tmp = sub i32 %a, 510
+ ret i32 %tmp
+}
diff --git a/test/CodeGen/Thumb2/thumb2-sub2.ll b/test/CodeGen/Thumb2/thumb2-sub2.ll
new file mode 100644
index 00000000000..c7ebd22a8a1
--- /dev/null
+++ b/test/CodeGen/Thumb2/thumb2-sub2.ll
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {subw\\W*r\[0-9\],\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#4095} | count 1
+
+define i32 @f1(i32 %a) {
+ %tmp = sub i32 %a, 4095
+ ret i32 %tmp
+}
diff --git a/test/CodeGen/Thumb2/thumb2-sub4.ll b/test/CodeGen/Thumb2/thumb2-sub4.ll
new file mode 100644
index 00000000000..c6788cbf564
--- /dev/null
+++ b/test/CodeGen/Thumb2/thumb2-sub4.ll
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {sub\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\]} | count 1
+
+define i32 @f1(i32 %a, i32 %b) {
+ %tmp = sub i32 %a, %b
+ ret i32 %tmp
+}
diff --git a/test/CodeGen/Thumb2/thumb2-sub5.ll b/test/CodeGen/Thumb2/thumb2-sub5.ll
new file mode 100644
index 00000000000..3e9ec256973
--- /dev/null
+++ b/test/CodeGen/Thumb2/thumb2-sub5.ll
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {subs\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\]} | count 1
+
+define i64 @f1(i64 %a, i64 %b) {
+ %tmp = sub i64 %a, %b
+ ret i64 %tmp
+}