2008-03-25 04:26:08 +00:00
|
|
|
; RUN: llvm-as < %s | opt -loopsimplify
|
2002-09-26 19:50:11 +00:00
|
|
|
|
2008-03-25 04:26:08 +00:00
|
|
|
define void @foo(i1 %C) {
|
|
|
|
br i1 %C, label %T, label %F
|
|
|
|
T: ; preds = %0
|
2002-09-26 19:50:11 +00:00
|
|
|
br label %Loop
|
2008-03-25 04:26:08 +00:00
|
|
|
F: ; preds = %0
|
2002-09-26 19:50:11 +00:00
|
|
|
br label %Loop
|
2008-03-25 04:26:08 +00:00
|
|
|
Loop: ; preds = %L2, %Loop, %F, %T
|
|
|
|
%Val = phi i32 [ 0, %T ], [ 1, %F ], [ 2, %Loop ], [ 3, %L2 ] ; <i32> [#uses=0]
|
|
|
|
br i1 %C, label %Loop, label %L2
|
|
|
|
L2: ; preds = %Loop
|
2002-09-26 19:50:11 +00:00
|
|
|
br label %Loop
|
|
|
|
}
|
2008-03-25 04:26:08 +00:00
|
|
|
|