Detect need for autoalignment of the stack earlier to catch spills more
[oota-llvm.git] / test / CodeGen / Thumb2 / thumb2-tst.ll
1 ; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {tst\\.w\\W*r\[0-9\],\\W*#\[0-9\]*} | \
2 ; RUN:     grep {#187\\|#11141290\\|#-872363008\\|#1114112\\|#-572662307} | count 10
3
4 ; 0x000000bb = 187
5 define i1 @f1(i32 %a) {
6     %tmp = and i32 %a, 187
7     %tmp1 = icmp ne i32 %tmp, 0
8     ret i1 %tmp1
9 }
10
11 ; 0x000000bb = 187
12 define i1 @f2(i32 %a) {
13     %tmp = and i32 %a, 187
14     %tmp1 = icmp eq i32 0, %tmp
15     ret i1 %tmp1
16 }
17
18 ; 0x00aa00aa = 11141290
19 define i1 @f3(i32 %a) {
20     %tmp = and i32 %a, 11141290 
21     %tmp1 = icmp eq i32 %tmp, 0
22     ret i1 %tmp1
23 }
24
25 ; 0x00aa00aa = 11141290
26 define i1 @f4(i32 %a) {
27     %tmp = and i32 %a, 11141290 
28     %tmp1 = icmp ne i32 0, %tmp
29     ret i1 %tmp1
30 }
31
32 ; 0xcc00cc00 = 3422604288
33 define i1 @f5(i32 %a) {
34     %tmp = and i32 %a, 3422604288
35     %tmp1 = icmp ne i32 %tmp, 0
36     ret i1 %tmp1
37 }
38
39 ; 0xcc00cc00 = 3422604288
40 define i1 @f6(i32 %a) {
41     %tmp = and i32 %a, 3422604288
42     %tmp1 = icmp eq i32 0, %tmp
43     ret i1 %tmp1
44 }
45
46 ; 0xdddddddd = 3722304989
47 define i1 @f7(i32 %a) {
48     %tmp = and i32 %a, 3722304989
49     %tmp1 = icmp eq i32 %tmp, 0
50     ret i1 %tmp1
51 }
52
53 ; 0xdddddddd = 3722304989
54 define i1 @f8(i32 %a) {
55     %tmp = and i32 %a, 3722304989
56     %tmp1 = icmp ne i32 0, %tmp
57     ret i1 %tmp1
58 }
59
60 ; 0x00110000 = 1114112
61 define i1 @f9(i32 %a) {
62     %tmp = and i32 %a, 1114112
63     %tmp1 = icmp ne i32 %tmp, 0
64     ret i1 %tmp1
65 }
66
67 ; 0x00110000 = 1114112
68 define i1 @f10(i32 %a) {
69     %tmp = and i32 %a, 1114112
70     %tmp1 = icmp eq i32 0, %tmp
71     ret i1 %tmp1
72 }