Home | History | Annotate | Download | only in LICM
      1 ; RUN: opt < %s -scalar-evolution -licm -loop-unroll -disable-output
      2 ; Test triggered an assertion in doFinalization() because loop unroll was deleting
      3 ; the inner loop which caused the loop to not get removed from the
      4 ; LoopToAliasSetMap.
      5 ; Test case taken from test/Transforms/LoopUnroll/unloop.ll.
      6 
      7 declare i1 @check() nounwind
      8 define void @skiplevelexit() nounwind {
      9 entry:
     10   br label %outer
     11 
     12 outer:
     13   br label %inner
     14 
     15 inner:
     16   %iv = phi i32 [ 0, %outer ], [ %inc, %tail ]
     17   %inc = add i32 %iv, 1
     18   call zeroext i1 @check()
     19   br i1 true, label %outer.backedge, label %tail
     20 
     21 tail:
     22   br i1 false, label %inner, label %exit
     23 
     24 outer.backedge:
     25   br label %outer
     26 
     27 exit:
     28   ret void
     29 }
     30 
     31