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