1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt < %s -passes='print<regions>' 2>&1 | FileCheck %s
4 ; We should not crash if there are some bbs that are not reachable.
9 notintree: ; No predecessors!
12 for.pre: ; preds = %entry
15 for: ; preds = %for.inc, %for.pre
16 %indvar = phi i64 [ 0, %for.pre ], [ %indvar.next, %for.inc ]
17 %exitcond = icmp ne i64 %indvar, 200
18 br i1 %exitcond, label %for.inc, label %ret
20 for.inc: ; preds = %for
21 %indvar.next = add i64 %indvar, 1
24 ret: ; preds = %for, %notintree
28 ; CHECK: [0] entry => <Function Return>
29 ; CHECK: [1] for => ret