Home | History | Annotate | Download | only in IndVarSimplify
      1 ; RUN: opt < %s -indvars -S -disable-output
      2 
      3 ; PR5758
      4 define zeroext i1 @foo() nounwind {
      5 entry:
      6   indirectbr i8* undef, [label %"202", label %"133"]
      7 
      8 "132":                                            ; preds = %"133"
      9   %0 = add i32 %1, 1                              ; <i32> [#uses=1]
     10   br label %"133"
     11 
     12 "133":                                            ; preds = %"132", %entry
     13   %1 = phi i32 [ %0, %"132" ], [ 0, %entry ]      ; <i32> [#uses=2]
     14   %2 = icmp eq i32 %1, 4                          ; <i1> [#uses=1]
     15   br i1 %2, label %"134", label %"132"
     16 
     17 "134":                                            ; preds = %"133"
     18   ret i1 true
     19 
     20 "202":                                            ; preds = %entry
     21   ret i1 false
     22 }
     23 
     24 ; PR7333
     25 define void @__atomvec_module__put_vrml_bonds() nounwind {
     26 bb7.preheader:                                    ; preds = %entry
     27   indirectbr i8* undef, [label %bb14, label %bb16]
     28 
     29 bb14:                                             ; preds = %bb14, %bb7.preheader
     30   br label %bb16
     31 
     32 bb16:                                             ; preds = %bb16, %bb14, %bb7.preheader
     33   %S.31.0 = phi i64 [ %3, %bb16 ], [ 1, %bb7.preheader ], [ 1, %bb14 ] ; <i64> [#uses=2]
     34   %0 = add nsw i64 %S.31.0, -1                    ; <i64> [#uses=1]
     35   %1 = getelementptr inbounds [3 x double]* undef, i64 0, i64 %0 ; <double*> [#uses=1]
     36   %2 = load double* %1, align 8                   ; <double> [#uses=0]
     37   %3 = add nsw i64 %S.31.0, 1                     ; <i64> [#uses=1]
     38   br label %bb16
     39 }
     40