Home | History | Annotate | Download | only in LoopRotate
      1 ; RUN: opt < %s -loop-rotate -loop-reduce -verify-dom-info -verify-loop-info -disable-output
      2 
      3 define fastcc void @foo() nounwind {
      4 BB:
      5   br label %BB1
      6 
      7 BB1:                                              ; preds = %BB19, %BB
      8   br label %BB4
      9 
     10 BB2:                                              ; preds = %BB4
     11   %tmp = bitcast i32 undef to i32                 ; <i32> [#uses=1]
     12   br label %BB4
     13 
     14 BB4:                                              ; preds = %BB3, %BB1
     15   %tmp5 = phi i32 [ undef, %BB1 ], [ %tmp, %BB2 ] ; <i32> [#uses=1]
     16   br i1 false, label %BB8, label %BB2
     17 
     18 BB8:                                              ; preds = %BB6
     19   %tmp7 = bitcast i32 %tmp5 to i32                ; <i32> [#uses=2]
     20   br i1 false, label %BB9, label %BB13
     21 
     22 BB9:                                              ; preds = %BB12, %BB8
     23   %tmp10 = phi i32 [ %tmp11, %BB12 ], [ %tmp7, %BB8 ] ; <i32> [#uses=2]
     24   %tmp11 = add i32 %tmp10, 1                      ; <i32> [#uses=1]
     25   br label %BB12
     26 
     27 BB12:                                             ; preds = %BB9
     28   br i1 false, label %BB9, label %BB17
     29 
     30 BB13:                                             ; preds = %BB15, %BB8
     31   %tmp14 = phi i32 [ %tmp16, %BB15 ], [ %tmp7, %BB8 ] ; <i32> [#uses=1]
     32   br label %BB15
     33 
     34 BB15:                                             ; preds = %BB13
     35   %tmp16 = add i32 %tmp14, -1                     ; <i32> [#uses=1]
     36   br i1 false, label %BB13, label %BB18
     37 
     38 BB17:                                             ; preds = %BB12
     39   br label %BB19
     40 
     41 BB18:                                             ; preds = %BB15
     42   br label %BB19
     43 
     44 BB19:                                             ; preds = %BB18, %BB17
     45   %tmp20 = phi i32 [ %tmp10, %BB17 ], [ undef, %BB18 ] ; <i32> [#uses=0]
     46   br label %BB1
     47 }
     48