blob: 964b07e30669bb575e4a3cd75a0c7e0127649462 [file] [log] [blame]
Dan Gohmanf2f6ce62009-09-11 18:01:28 +00001; RUN: opt < %s -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