Home | History | Annotate | Download | only in CorrelatedValuePropagation
      1 ; RUN: opt -S < %s -correlated-propagation | FileCheck %s
      2 
      3 ; CHECK: @test
      4 define i16 @test(i32 %a, i1 %b) {
      5 entry:
      6   %c = icmp eq i32 %a, 0
      7   br i1 %c, label %left, label %right
      8 
      9 right:
     10   %d = trunc i32 %a to i1
     11   br label %merge
     12 
     13 left:
     14   br i1 %b, label %merge, label %other
     15 
     16 other:
     17   ret i16 23
     18 
     19 merge:
     20   %f = phi i1 [%b, %left], [%d, %right]
     21 ; CHECK: select i1 %f, i16 1, i16 0 
     22   %h = select i1 %f, i16 1, i16 0 
     23 ; CHECK: ret i16 %h
     24   ret i16 %h
     25 }