Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt < %s -instcombine -S | \
      2 ; RUN: FileCheck %s
      3 
      4 ; Should be optimized to one and.
      5 define i1 @test1(i32 %a, i32 %b) {
      6 ; CHECK-LABEL: @test1(
      7 ; CHECK-NEXT: %1 = xor i32 %a, %b
      8 ; CHECK-NEXT: %2 = and i32 %1, 65280
      9 ; CHECK-NEXT: %tmp = icmp ne i32 %2, 0
     10 ; CHECK-NEXT: ret i1 %tmp
     11         %tmp1 = and i32 %a, 65280               ; <i32> [#uses=1]
     12         %tmp3 = and i32 %b, 65280               ; <i32> [#uses=1]
     13         %tmp = icmp ne i32 %tmp1, %tmp3         ; <i1> [#uses=1]
     14         ret i1 %tmp
     15 }
     16