summaryrefslogtreecommitdiff
path: root/test/CodeGen/Thumb2/thumb2-tst.ll
diff options
context:
space:
mode:
authorDavid Goodwin <david_goodwin@apple.com>2009-06-29 22:49:42 +0000
committerDavid Goodwin <david_goodwin@apple.com>2009-06-29 22:49:42 +0000
commitbaeb911d60401818dc9fe0db6182cd048e4fdd03 (patch)
treefb644aa88fbb575fc421e0745f4f1f81f144008a /test/CodeGen/Thumb2/thumb2-tst.ll
parent8ba221d5c55bbfce03fade83b188cb36f291aca8 (diff)
downloadllvm-baeb911d60401818dc9fe0db6182cd048e4fdd03.tar.gz
llvm-baeb911d60401818dc9fe0db6182cd048e4fdd03.tar.bz2
llvm-baeb911d60401818dc9fe0db6182cd048e4fdd03.tar.xz
Add Thumb-2 support for TEQ amd TST.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Thumb2/thumb2-tst.ll')
-rw-r--r--test/CodeGen/Thumb2/thumb2-tst.ll71
1 files changed, 71 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb2/thumb2-tst.ll b/test/CodeGen/Thumb2/thumb2-tst.ll
new file mode 100644
index 0000000000..9e2d3e5ec1
--- /dev/null
+++ b/test/CodeGen/Thumb2/thumb2-tst.ll
@@ -0,0 +1,71 @@
+; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {tst\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#187\\|#11141290\\|#3422604288\\|#1114112\\|#3722304989} | count 10
+
+; 0x000000bb = 187
+define i1 @f1(i32 %a) {
+ %tmp = and i32 %a, 187
+ %tmp1 = icmp ne i32 %tmp, 0
+ ret i1 %tmp1
+}
+
+; 0x000000bb = 187
+define i1 @f2(i32 %a) {
+ %tmp = and i32 %a, 187
+ %tmp1 = icmp eq i32 0, %tmp
+ ret i1 %tmp1
+}
+
+; 0x00aa00aa = 11141290
+define i1 @f3(i32 %a) {
+ %tmp = and i32 %a, 11141290
+ %tmp1 = icmp eq i32 %tmp, 0
+ ret i1 %tmp1
+}
+
+; 0x00aa00aa = 11141290
+define i1 @f4(i32 %a) {
+ %tmp = and i32 %a, 11141290
+ %tmp1 = icmp ne i32 0, %tmp
+ ret i1 %tmp1
+}
+
+; 0xcc00cc00 = 3422604288
+define i1 @f5(i32 %a) {
+ %tmp = and i32 %a, 3422604288
+ %tmp1 = icmp ne i32 %tmp, 0
+ ret i1 %tmp1
+}
+
+; 0xcc00cc00 = 3422604288
+define i1 @f6(i32 %a) {
+ %tmp = and i32 %a, 3422604288
+ %tmp1 = icmp eq i32 0, %tmp
+ ret i1 %tmp1
+}
+
+; 0xdddddddd = 3722304989
+define i1 @f7(i32 %a) {
+ %tmp = and i32 %a, 3722304989
+ %tmp1 = icmp eq i32 %tmp, 0
+ ret i1 %tmp1
+}
+
+; 0xdddddddd = 3722304989
+define i1 @f8(i32 %a) {
+ %tmp = and i32 %a, 3722304989
+ %tmp1 = icmp ne i32 0, %tmp
+ ret i1 %tmp1
+}
+
+; 0x00110000 = 1114112
+define i1 @f9(i32 %a) {
+ %tmp = and i32 %a, 1114112
+ %tmp1 = icmp ne i32 %tmp, 0
+ ret i1 %tmp1
+}
+
+; 0x00110000 = 1114112
+define i1 @f10(i32 %a) {
+ %tmp = and i32 %a, 1114112
+ %tmp1 = icmp eq i32 0, %tmp
+ ret i1 %tmp1
+}