Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt < %s -instcombine -S | FileCheck %s
      2 ; <rdar://problem/10803154>
      3 
      4 ; There should be no transformation.
      5 ; CHECK: %a = trunc i32 %x to i8
      6 ; CHECK: %b = icmp ne i8 %a, 0
      7 ; CHECK: %c = and i32 %x, 16711680
      8 ; CHECK: %d = icmp ne i32 %c, 0
      9 ; CHECK: %e = and i1 %b, %d
     10 ; CHECK: ret i1 %e
     11 
     12 define i1 @f1(i32 %x) {
     13   %a = trunc i32 %x to i8
     14   %b = icmp ne i8 %a, 0
     15   %c = and i32 %x, 16711680
     16   %d = icmp ne i32 %c, 0
     17   %e = and i1 %b, %d
     18   ret i1 %e
     19 }
     20