brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · eb82f9a Raw
111 lines · plain
1; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2 %s -o - | FileCheck %s2 3; These tests would be improved by 'movs r0, #0' being rematerialized below the4; tst as 'mov.w r0, #0'.5 6; 0x000000bb = 1877define i32 @f2(i32 %a) {8    %tmp = and i32 %a, 1879    %tmp1 = icmp eq i32 0, %tmp10    %ret = select i1 %tmp1, i32 42, i32 2411    ret i32 %ret12}13; CHECK-LABEL: f2:14; CHECK: 	tst.w	{{.*}}, #18715 16; 0x00aa00aa = 1114129017define i32 @f3(i32 %a) {18    %tmp = and i32 %a, 11141290 19    %tmp1 = icmp eq i32 %tmp, 020    %ret = select i1 %tmp1, i32 42, i32 2421    ret i32 %ret22}23; CHECK-LABEL: f3:24; CHECK: 	tst.w	{{.*}}, #1114129025 26; 0xcc00cc00 = 342260428827define i32 @f6(i32 %a) {28    %tmp = and i32 %a, 342260428829    %tmp1 = icmp eq i32 0, %tmp30    %ret = select i1 %tmp1, i32 42, i32 2431    ret i32 %ret32}33; CHECK-LABEL: f6:34; CHECK: 	tst.w	{{.*}}, #-87236300835 36; 0xdddddddd = 372230498937define i32 @f7(i32 %a) {38    %tmp = and i32 %a, 372230498939    %tmp1 = icmp eq i32 %tmp, 040    %ret = select i1 %tmp1, i32 42, i32 2441    ret i32 %ret42}43; CHECK-LABEL: f7:44; CHECK: 	tst.w	{{.*}}, #-57266230745 46; 0x00110000 = 111411247define i32 @f10(i32 %a) {48    %tmp = and i32 %a, 111411249    %tmp1 = icmp eq i32 0, %tmp50    %ret = select i1 %tmp1, i32 42, i32 2451    ret i32 %ret52}53; CHECK-LABEL: f10:54; CHECK: 	tst.w	{{.*}}, #111411255 56; 0x000000bb = 18757define i1 @f12(i32 %a) {58    %tmp = and i32 %a, 18759    %tmp1 = icmp eq i32 0, %tmp60    ret i1 %tmp161}62; CHECK-LABEL: f12:63; CHECK: 	  and r0, r0, #18764; CHECK-NEXT: clz r0, r065; CHECK-NEXT: lsrs r0, r0, #566 67; 0x00aa00aa = 1114129068define i1 @f13(i32 %a) {69    %tmp = and i32 %a, 1114129070    %tmp1 = icmp eq i32 %tmp, 071    ret i1 %tmp172}73; CHECK-LABEL: f13:74; CHECK: 	  and r0, r0, #1114129075; CHECK-NEXT: clz r0, r076; CHECK-NEXT: lsrs r0, r0, #577 78; 0xcc00cc00 = 342260428879define i1 @f16(i32 %a) {80    %tmp = and i32 %a, 342260428881    %tmp1 = icmp eq i32 0, %tmp82    ret i1 %tmp183}84; CHECK-LABEL: f16:85; CHECK: 	  and r0, r0, #-87236300886; CHECK-NEXT: clz r0, r087; CHECK-NEXT: lsrs r0, r0, #588 89; 0xdddddddd = 372230498990define i1 @f17(i32 %a) {91    %tmp = and i32 %a, 372230498992    %tmp1 = icmp eq i32 %tmp, 093    ret i1 %tmp194}95; CHECK-LABEL: f17:96; CHECK: 	  bic r0, r0, #57266230697; CHECK-NEXT: clz r0, r098; CHECK-NEXT: lsrs r0, r0, #599 100; 0x00110000 = 1114112101define i1 @f18(i32 %a) {102    %tmp = and i32 %a, 1114112103    %tmp1 = icmp eq i32 0, %tmp104    ret i1 %tmp1105}106; CHECK-LABEL: f18:107; CHECK: 	  and r0, r0, #1114112108; CHECK-NEXT: clz r0, r0109; CHECK-NEXT: lsrs r0, r0, #5110 111