2009-09-11 20:01:28 +02:00
|
|
|
; RUN: opt < %s -loop-reduce -disable-output
|
2005-09-12 19:08:15 +02:00
|
|
|
|
2008-03-19 08:28:33 +01:00
|
|
|
define void @main() {
|
2005-09-12 19:08:15 +02:00
|
|
|
entry:
|
|
|
|
br label %loopentry.0
|
|
|
|
loopentry.0: ; preds = %then.5, %entry
|
2008-03-19 08:28:33 +01:00
|
|
|
%arg_index.1.ph = phi i32 [ 1, %entry ], [ %arg_index.1.ph.be, %then.5 ] ; <i32> [#uses=1]
|
|
|
|
br i1 false, label %no_exit.0, label %loopexit.0
|
2005-09-12 19:08:15 +02:00
|
|
|
no_exit.0: ; preds = %loopentry.0
|
2008-03-19 08:28:33 +01:00
|
|
|
%arg_index.1.1 = add i32 0, %arg_index.1.ph ; <i32> [#uses=2]
|
|
|
|
br i1 false, label %then.i55, label %endif.i61
|
2005-09-12 19:08:15 +02:00
|
|
|
then.i55: ; preds = %no_exit.0
|
2008-03-19 08:28:33 +01:00
|
|
|
br i1 false, label %then.4, label %else.1
|
2005-09-12 19:08:15 +02:00
|
|
|
endif.i61: ; preds = %no_exit.0
|
|
|
|
ret void
|
|
|
|
then.4: ; preds = %then.i55
|
2008-03-19 08:28:33 +01:00
|
|
|
%tmp.19993 = add i32 %arg_index.1.1, 2 ; <i32> [#uses=0]
|
2005-09-12 19:08:15 +02:00
|
|
|
ret void
|
|
|
|
else.1: ; preds = %then.i55
|
2008-03-19 08:28:33 +01:00
|
|
|
br i1 false, label %then.i86, label %loopexit.i97
|
2005-09-12 19:08:15 +02:00
|
|
|
then.i86: ; preds = %else.1
|
|
|
|
ret void
|
|
|
|
loopexit.i97: ; preds = %else.1
|
2008-03-19 08:28:33 +01:00
|
|
|
br i1 false, label %then.5, label %else.2
|
2005-09-12 19:08:15 +02:00
|
|
|
then.5: ; preds = %loopexit.i97
|
2008-03-19 08:28:33 +01:00
|
|
|
%arg_index.1.ph.be = add i32 %arg_index.1.1, 2 ; <i32> [#uses=1]
|
2005-09-12 19:08:15 +02:00
|
|
|
br label %loopentry.0
|
|
|
|
else.2: ; preds = %loopexit.i97
|
|
|
|
ret void
|
|
|
|
loopexit.0: ; preds = %loopentry.0
|
|
|
|
ret void
|
|
|
|
}
|