You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
901 B
31 lines
901 B
; RUN: opt -regions -analyze < %s | FileCheck %s
|
|
; RUN: opt < %s -passes='print<regions>' 2>&1 | FileCheck %s
|
|
|
|
; We should not crash if there are some bbs that are not reachable.
|
|
define void @f() {
|
|
entry:
|
|
br label %for.pre
|
|
|
|
notintree: ; No predecessors!
|
|
br label %ret
|
|
|
|
for.pre: ; preds = %entry
|
|
br label %for
|
|
|
|
for: ; preds = %for.inc, %for.pre
|
|
%indvar = phi i64 [ 0, %for.pre ], [ %indvar.next, %for.inc ]
|
|
%exitcond = icmp ne i64 %indvar, 200
|
|
br i1 %exitcond, label %for.inc, label %ret
|
|
|
|
for.inc: ; preds = %for
|
|
%indvar.next = add i64 %indvar, 1
|
|
br label %for
|
|
|
|
ret: ; preds = %for, %notintree
|
|
ret void
|
|
}
|
|
|
|
; CHECK: [0] entry => <Function Return>
|
|
; CHECK: [1] for => ret
|
|
|