Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt < %s -instcombine -S | FileCheck %s
      2 
      3 define i1 @test0(i39 %X, i39 %A) {
      4 ; CHECK: @test0
      5 ; CHECK: %[[V1:.*]] = shl i39 1, %A
      6 ; CHECK: %[[V2:.*]] = and i39 %[[V1]], %X
      7 ; CHECK: %[[V3:.*]] = icmp ne i39 %[[V2]], 0
      8 ; CHECK: ret i1 %[[V3]]
      9 
     10 	%B = lshr i39 %X, %A
     11 	%D = trunc i39 %B to i1
     12 	ret i1 %D
     13 }
     14 
     15 define i1 @test1(i799 %X, i799 %A) {
     16 ; CHECK: @test1
     17 ; CHECK: %[[V1:.*]] = shl i799 1, %A
     18 ; CHECK: %[[V2:.*]] = and i799 %[[V1]], %X
     19 ; CHECK: %[[V3:.*]] = icmp ne i799 %[[V2]], 0
     20 ; CHECK: ret i1 %[[V3]]
     21 
     22 	%B = lshr i799 %X, %A
     23 	%D = trunc i799 %B to i1
     24 	ret i1 %D
     25 }
     26