blob: 2fc1c9801914310d929cbd10c5ca081f236a4b8e [file] [log] [blame]
Tanya Lattnere6d5d392008-03-19 07:28:33 +00001; RUN: llvm-as < %s | opt -lowerswitch -disable-output
Chris Lattner6cc83752004-03-14 04:13:57 +00002
Tanya Lattnere6d5d392008-03-19 07:28:33 +00003define void @solve() {
Chris Lattner6cc83752004-03-14 04:13:57 +00004entry:
Tanya Lattnere6d5d392008-03-19 07:28:33 +00005 %targetBlock = call i16 @solve_code( ) ; <i16> [#uses=1]
Chris Lattner6cc83752004-03-14 04:13:57 +00006 br label %codeReplTail
Chris Lattner6cc83752004-03-14 04:13:57 +00007then.1: ; preds = %codeReplTail
8 ret void
Chris Lattner6cc83752004-03-14 04:13:57 +00009loopexit.0: ; preds = %codeReplTail
10 ret void
Tanya Lattnere6d5d392008-03-19 07:28:33 +000011codeReplTail: ; preds = %codeReplTail, %entry
12 switch i16 %targetBlock, label %codeReplTail [
13 i16 0, label %loopexit.0
14 i16 1, label %then.1
Chris Lattner6cc83752004-03-14 04:13:57 +000015 ]
16}
17
Tanya Lattnere6d5d392008-03-19 07:28:33 +000018declare i16 @solve_code()
19