Home | History | Annotate | Download | only in LoopStrengthReduce
      1 ; RUN: opt < %s -loop-reduce -S \
      2 ; RUN:    | grep {icmp eq i2 %lsr.iv.next, %xmp4344}
      3 
      4 ; Don't reverse the iteration if the rhs of the compare is defined
      5 ; inside the loop.
      6 
      7 define void @Fill_Buffer(i2* %p) nounwind {
      8 entry:
      9 	br label %bb8
     10 
     11 bb8:
     12 	%indvar34 = phi i32 [ 0, %entry ], [ %indvar.next35, %bb8 ]
     13 	%indvar3451 = trunc i32 %indvar34 to i2
     14 	%xmp4344 = load i2* %p
     15 	%xmp104 = icmp eq i2 %indvar3451, %xmp4344
     16 	%indvar.next35 = add i32 %indvar34, 1
     17 	br i1 %xmp104, label %bb10, label %bb8
     18 
     19 bb10:
     20 	unreachable
     21 }
     22