1 ; RUN: llc < %s -march=thumb -mattr=+thumb2 -join-physregs | FileCheck %s
3 ; These tests implicitly depend on 'movs r0, #0' being rematerialized below the
4 ; tst as 'mov.w r0, #0'. So far, that requires physreg joining.
7 define i1 @f1(i32 %a) {
9 %tmp1 = icmp ne i32 %tmp, 0
13 ; CHECK: tst.w r0, #187
16 define i1 @f2(i32 %a) {
17 %tmp = and i32 %a, 187
18 %tmp1 = icmp eq i32 0, %tmp
22 ; CHECK: tst.w r0, #187
24 ; 0x00aa00aa = 11141290
25 define i1 @f3(i32 %a) {
26 %tmp = and i32 %a, 11141290
27 %tmp1 = icmp eq i32 %tmp, 0
31 ; CHECK: tst.w r0, #11141290
33 ; 0x00aa00aa = 11141290
34 define i1 @f4(i32 %a) {
35 %tmp = and i32 %a, 11141290
36 %tmp1 = icmp ne i32 0, %tmp
40 ; CHECK: tst.w r0, #11141290
42 ; 0xcc00cc00 = 3422604288
43 define i1 @f5(i32 %a) {
44 %tmp = and i32 %a, 3422604288
45 %tmp1 = icmp ne i32 %tmp, 0
49 ; CHECK: tst.w r0, #-872363008
51 ; 0xcc00cc00 = 3422604288
52 define i1 @f6(i32 %a) {
53 %tmp = and i32 %a, 3422604288
54 %tmp1 = icmp eq i32 0, %tmp
58 ; CHECK: tst.w r0, #-872363008
60 ; 0xdddddddd = 3722304989
61 define i1 @f7(i32 %a) {
62 %tmp = and i32 %a, 3722304989
63 %tmp1 = icmp eq i32 %tmp, 0
67 ; CHECK: tst.w r0, #-572662307
69 ; 0xdddddddd = 3722304989
70 define i1 @f8(i32 %a) {
71 %tmp = and i32 %a, 3722304989
72 %tmp1 = icmp ne i32 0, %tmp
76 ; CHECK: tst.w r0, #-572662307
78 ; 0x00110000 = 1114112
79 define i1 @f9(i32 %a) {
80 %tmp = and i32 %a, 1114112
81 %tmp1 = icmp ne i32 %tmp, 0
85 ; CHECK: tst.w r0, #1114112
87 ; 0x00110000 = 1114112
88 define i1 @f10(i32 %a) {
89 %tmp = and i32 %a, 1114112
90 %tmp1 = icmp eq i32 0, %tmp
94 ; CHECK: tst.w r0, #1114112