2008-03-19 07:28:33 +00:00
|
|
|
; RUN: llvm-as < %s | opt -lowerswitch -disable-output
|
2004-03-14 04:13:57 +00:00
|
|
|
|
2008-03-19 07:28:33 +00:00
|
|
|
define void @solve() {
|
2004-03-14 04:13:57 +00:00
|
|
|
entry:
|
2008-03-19 07:28:33 +00:00
|
|
|
%targetBlock = call i16 @solve_code( ) ; <i16> [#uses=1]
|
2004-03-14 04:13:57 +00:00
|
|
|
br label %codeReplTail
|
|
|
|
then.1: ; preds = %codeReplTail
|
|
|
|
ret void
|
|
|
|
loopexit.0: ; preds = %codeReplTail
|
|
|
|
ret void
|
2008-03-19 07:28:33 +00:00
|
|
|
codeReplTail: ; preds = %codeReplTail, %entry
|
|
|
|
switch i16 %targetBlock, label %codeReplTail [
|
|
|
|
i16 0, label %loopexit.0
|
|
|
|
i16 1, label %then.1
|
2004-03-14 04:13:57 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2008-03-19 07:28:33 +00:00
|
|
|
declare i16 @solve_code()
|
|
|
|
|