41 lines · plain
1; RUN: llc < %s -mtriple=aarch64-unknown-unknown | FileCheck %s2 3define i1 @andn_cmp(i32 %x, i32 %y) {4; CHECK-LABEL: andn_cmp:5; CHECK: // %bb.0:6; CHECK-NEXT: bics wzr, w1, w07; CHECK-NEXT: cset w0, eq8; CHECK-NEXT: ret9;10 %notx = xor i32 %x, -111 %and = and i32 %notx, %y12 %cmp = icmp eq i32 %and, 013 ret i1 %cmp14}15 16define i1 @and_cmp(i32 %x, i32 %y) {17; CHECK-LABEL: and_cmp:18; CHECK: // %bb.0:19; CHECK-NEXT: bics wzr, w1, w020; CHECK-NEXT: cset w0, eq21; CHECK-NEXT: ret22;23 %and = and i32 %x, %y24 %cmp = icmp eq i32 %and, %y25 ret i1 %cmp26}27 28define i1 @and_cmp_const(i32 %x) {29; CHECK-LABEL: and_cmp_const:30; CHECK: // %bb.0:31; CHECK-NEXT: mov w8, #4332; CHECK-NEXT: bics wzr, w8, w033; CHECK-NEXT: cset w0, eq34; CHECK-NEXT: ret35;36 %and = and i32 %x, 4337 %cmp = icmp eq i32 %and, 4338 ret i1 %cmp39}40 41