2009-09-11 18:01:28 +00:00
|
|
|
; RUN: opt < %s -loop-extract -disable-output
|
2004-03-14 03:03:59 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define void @solve() {
|
2004-03-14 03:03:59 +00:00
|
|
|
entry:
|
|
|
|
br label %loopentry.0
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
loopentry.0: ; preds = %endif.0, %entry
|
|
|
|
br i1 false, label %no_exit.0, label %loopexit.0
|
2004-03-14 03:03:59 +00:00
|
|
|
|
|
|
|
no_exit.0: ; preds = %loopentry.0
|
2008-03-01 09:15:35 +00:00
|
|
|
br i1 false, label %then.0, label %endif.0
|
2004-03-14 03:03:59 +00:00
|
|
|
|
|
|
|
then.0: ; preds = %no_exit.0
|
2008-03-01 09:15:35 +00:00
|
|
|
br i1 false, label %shortcirc_done, label %shortcirc_next
|
2004-03-14 03:03:59 +00:00
|
|
|
|
|
|
|
shortcirc_next: ; preds = %then.0
|
|
|
|
br label %shortcirc_done
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
shortcirc_done: ; preds = %shortcirc_next, %then.0
|
|
|
|
br i1 false, label %then.1, label %endif.1
|
2004-03-14 03:03:59 +00:00
|
|
|
|
|
|
|
then.1: ; preds = %shortcirc_done
|
2008-03-01 09:15:35 +00:00
|
|
|
br i1 false, label %cond_true, label %cond_false
|
2004-03-14 03:03:59 +00:00
|
|
|
|
|
|
|
cond_true: ; preds = %then.1
|
|
|
|
br label %cond_continue
|
|
|
|
|
|
|
|
cond_false: ; preds = %then.1
|
|
|
|
br label %cond_continue
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
cond_continue: ; preds = %cond_false, %cond_true
|
2004-03-14 03:03:59 +00:00
|
|
|
br label %return
|
|
|
|
|
|
|
|
after_ret.0: ; No predecessors!
|
|
|
|
br label %endif.1
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
endif.1: ; preds = %after_ret.0, %shortcirc_done
|
2004-03-14 03:03:59 +00:00
|
|
|
br label %endif.0
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
endif.0: ; preds = %endif.1, %no_exit.0
|
2004-03-14 03:03:59 +00:00
|
|
|
br label %loopentry.0
|
|
|
|
|
|
|
|
loopexit.0: ; preds = %loopentry.0
|
2008-03-01 09:15:35 +00:00
|
|
|
br i1 false, label %then.2, label %endif.2
|
2004-03-14 03:03:59 +00:00
|
|
|
|
|
|
|
then.2: ; preds = %loopexit.0
|
2008-03-01 09:15:35 +00:00
|
|
|
br i1 false, label %then.3, label %endif.3
|
2004-03-14 03:03:59 +00:00
|
|
|
|
|
|
|
then.3: ; preds = %then.2
|
|
|
|
br label %return
|
|
|
|
|
|
|
|
after_ret.1: ; No predecessors!
|
|
|
|
br label %endif.3
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
endif.3: ; preds = %after_ret.1, %then.2
|
2004-03-14 03:03:59 +00:00
|
|
|
br label %endif.2
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
endif.2: ; preds = %endif.3, %loopexit.0
|
2004-03-14 03:03:59 +00:00
|
|
|
br label %loopentry.1
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
loopentry.1: ; preds = %no_exit.1, %endif.2
|
|
|
|
br i1 false, label %no_exit.1, label %loopexit.1
|
2004-03-14 03:03:59 +00:00
|
|
|
|
|
|
|
no_exit.1: ; preds = %loopentry.1
|
|
|
|
br label %loopentry.1
|
|
|
|
|
|
|
|
loopexit.1: ; preds = %loopentry.1
|
|
|
|
br label %return
|
|
|
|
|
|
|
|
after_ret.2: ; No predecessors!
|
|
|
|
br label %return
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
return: ; preds = %after_ret.2, %loopexit.1, %then.3, %cond_continue
|
2004-03-14 03:03:59 +00:00
|
|
|
ret void
|
|
|
|
}
|