Home | History | Annotate | Download | only in AArch64
      1 ; RUN: llc < %s -mtriple=aarch64-unknown-unknown | FileCheck %s
      2 
      3 define i1 @andn_cmp(i32 %x, i32 %y) {
      4 ; CHECK-LABEL: andn_cmp:
      5 ; CHECK:       // %bb.0:
      6 ; CHECK-NEXT:    bics wzr, w1, w0
      7 ; CHECK-NEXT:    cset w0, eq
      8 ; CHECK-NEXT:    ret
      9 ;
     10   %notx = xor i32 %x, -1
     11   %and = and i32 %notx, %y
     12   %cmp = icmp eq i32 %and, 0
     13   ret i1 %cmp
     14 }
     15 
     16 define i1 @and_cmp(i32 %x, i32 %y) {
     17 ; CHECK-LABEL: and_cmp:
     18 ; CHECK:       // %bb.0:
     19 ; CHECK-NEXT:    bics wzr, w1, w0
     20 ; CHECK-NEXT:    cset w0, eq
     21 ; CHECK-NEXT:    ret
     22 ;
     23   %and = and i32 %x, %y
     24   %cmp = icmp eq i32 %and, %y
     25   ret i1 %cmp
     26 }
     27 
     28 define i1 @and_cmp_const(i32 %x) {
     29 ; CHECK-LABEL: and_cmp_const:
     30 ; CHECK:       // %bb.0:
     31 ; CHECK-NEXT:    mov w8, #43
     32 ; CHECK-NEXT:    bics wzr, w8, w0
     33 ; CHECK-NEXT:    cset w0, eq
     34 ; CHECK-NEXT:    ret
     35 ;
     36   %and = and i32 %x, 43
     37   %cmp = icmp eq i32 %and, 43
     38   ret i1 %cmp
     39 }
     40 
     41