Home | History | Annotate | Download | only in IndVarSimplify
      1 ; RUN: opt < %s -indvars -disable-output
      2 ; PR5073
      3 
      4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
      5 target triple = "x86_64-unknown-linux-gnu"
      6 
      7 define void @ctpmv_(float* noalias nocapture %tmp4, i32 %tmp21) nounwind {
      8 bb20:                                             ; preds = %bb19
      9   br label %bb24
     10 
     11 bb24:                                             ; preds = %bb40, %bb23
     12   %tmp25 = phi i32 [ %tmp43, %bb40 ], [ %tmp21, %bb20 ] ; <i32> [#uses=4]
     13   %tmp26 = phi i32 [ %tmp41, %bb40 ], [ undef, %bb20 ] ; <i32> [#uses=2]
     14   %tmp27 = add nsw i32 %tmp26, -1                 ; <i32> [#uses=1]
     15   %tmp28 = add nsw i32 %tmp25, -1                 ; <i32> [#uses=2]
     16   %tmp29 = icmp sgt i32 %tmp28, 0                 ; <i1> [#uses=1]
     17   br i1 %tmp29, label %bb30, label %bb40
     18 
     19 bb30:                                             ; preds = %bb30, %bb24
     20   %tmp31 = phi i32 [ %tmp39, %bb30 ], [ %tmp28, %bb24 ] ; <i32> [#uses=2]
     21   %tmp32 = phi i32 [ %tmp37, %bb30 ], [ %tmp27, %bb24 ] ; <i32> [#uses=2]
     22   %tmp33 = sext i32 %tmp32 to i64                 ; <i64> [#uses=1]
     23   %tmp35 = getelementptr float* %tmp4, i64 %tmp33 ; <%0*> [#uses=1]
     24   %tmp36 = load float* %tmp35, align 4               ; <%0> [#uses=0]
     25   %tmp37 = add nsw i32 %tmp32, -1                 ; <i32> [#uses=1]
     26   %tmp39 = add nsw i32 %tmp31, -1                 ; <i32> [#uses=1]
     27   %tmp38 = icmp eq i32 %tmp31, 1                  ; <i1> [#uses=1]
     28   br i1 %tmp38, label %bb40, label %bb30
     29 
     30 bb40:                                             ; preds = %bb30, %bb24
     31   %tmp41 = sub i32 %tmp26, %tmp25                 ; <i32> [#uses=1]
     32   %tmp43 = add nsw i32 %tmp25, -1                 ; <i32> [#uses=1]
     33   %tmp42 = icmp eq i32 %tmp25, 1                  ; <i1> [#uses=1]
     34   br i1 %tmp42, label %bb46, label %bb24
     35 
     36 bb46:                                             ; preds = %bb40, %bb23, %bb19
     37   ret void
     38 }
     39