Home | History | Annotate | Download | only in Thumb2
      1 ; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2 %s -o - | FileCheck %s
      2 
      3 ; These tests would be improved by 'movs r0, #0' being rematerialized below the
      4 ; test as 'mov.w r0, #0'.
      5 
      6 ; 0x000000bb = 187
      7 define i1 @f2(i32 %a) {
      8     %tmp = xor i32 %a, 187
      9     %tmp1 = icmp eq i32 0, %tmp
     10     ret i1 %tmp1
     11 }
     12 ; CHECK-LABEL: f2:
     13 ; CHECK: 	teq.w	{{.*}}, #187
     14 
     15 ; 0x00aa00aa = 11141290
     16 define i1 @f3(i32 %a) {
     17     %tmp = xor i32 %a, 11141290 
     18     %tmp1 = icmp eq i32 %tmp, 0
     19     ret i1 %tmp1
     20 }
     21 ; CHECK-LABEL: f3:
     22 ; CHECK: 	teq.w	{{.*}}, #11141290
     23 
     24 ; 0xcc00cc00 = 3422604288
     25 define i1 @f6(i32 %a) {
     26     %tmp = xor i32 %a, 3422604288
     27     %tmp1 = icmp eq i32 0, %tmp
     28     ret i1 %tmp1
     29 }
     30 ; CHECK-LABEL: f6:
     31 ; CHECK: 	teq.w	{{.*}}, #-872363008
     32 
     33 ; 0xdddddddd = 3722304989
     34 define i1 @f7(i32 %a) {
     35     %tmp = xor i32 %a, 3722304989
     36     %tmp1 = icmp eq i32 %tmp, 0
     37     ret i1 %tmp1
     38 }
     39 ; CHECK-LABEL: f7:
     40 ; CHECK: 	teq.w	{{.*}}, #-572662307
     41 
     42 ; 0xdddddddd = 3722304989
     43 define i1 @f8(i32 %a) {
     44     %tmp = xor i32 %a, 3722304989
     45     %tmp1 = icmp ne i32 0, %tmp
     46     ret i1 %tmp1
     47 }
     48 
     49 ; 0x00110000 = 1114112
     50 define i1 @f10(i32 %a) {
     51     %tmp = xor i32 %a, 1114112
     52     %tmp1 = icmp eq i32 0, %tmp
     53     ret i1 %tmp1
     54 }
     55 ; CHECK-LABEL: f10:
     56 ; CHECK: 	teq.w	{{.*}}, #1114112
     57 
     58