Thumb-2 tests
authorDavid Goodwin <david_goodwin@apple.com>
Mon, 29 Jun 2009 22:25:22 +0000 (22:25 +0000)
committerDavid Goodwin <david_goodwin@apple.com>
Mon, 29 Jun 2009 22:25:22 +0000 (22:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74464 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/Thumb2/thumb2-adc.ll
test/CodeGen/Thumb2/thumb2-add2.ll
test/CodeGen/Thumb2/thumb2-sbc2.ll [new file with mode: 0644]
test/CodeGen/Thumb2/thumb2-sub.ll [new file with mode: 0644]
test/CodeGen/Thumb2/thumb2-sub2.ll [new file with mode: 0644]
test/CodeGen/Thumb2/thumb2-sub4.ll [new file with mode: 0644]
test/CodeGen/Thumb2/thumb2-sub5.ll [new file with mode: 0644]

index 4424c1ac90071f10c9390b8f00283f75e900fa68..c1565b300960002073d82dcdb0ff28eb7914752d 100644 (file)
@@ -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, 28710447624486912
+    %tmp = add i64 %a, 287104476244869122
     ret i64 %tmp
 }
 
index f94b3c166d8a367e399ff4a112e6f58cf26d3bfe..be89508c7ef23e608c26cb7789b9b969c4eb22b1 100644 (file)
@@ -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 (file)
index 0000000..4302f76
--- /dev/null
@@ -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 (file)
index 0000000..cf82704
--- /dev/null
@@ -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 (file)
index 0000000..c7ebd22
--- /dev/null
@@ -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 (file)
index 0000000..c6788cb
--- /dev/null
@@ -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 (file)
index 0000000..3e9ec25
--- /dev/null
@@ -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
+}