Home | History | Annotate | Download | only in RegionInfo
      1 ; RUN: opt -regions -analyze < %s | FileCheck %s
      2 
      3 ; We should not crash if there are some bbs that are not reachable.
      4 define void @f() {
      5 entry:
      6   br label %for.pre
      7 
      8 notintree:                                        ; No predecessors!
      9   br label %ret
     10 
     11 for.pre:                                          ; preds = %entry
     12   br label %for
     13 
     14 for:                                              ; preds = %for.inc, %for.pre
     15   %indvar = phi i64 [ 0, %for.pre ], [ %indvar.next, %for.inc ]
     16   %exitcond = icmp ne i64 %indvar, 200
     17   br i1 %exitcond, label %for.inc, label %ret
     18 
     19 for.inc:                                          ; preds = %for
     20   %indvar.next = add i64 %indvar, 1
     21   br label %for
     22 
     23 ret:                                              ; preds = %for, %notintree
     24   ret void
     25 }
     26 
     27 ; CHECK: [0] entry => <Function Return>
     28 ; CHECK:   [1] for => ret
     29 
     30