llvm.org GIT mirror llvm / 59bc1a7
New testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8071 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
1 changed file(s) with 40 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: as < %s | opt -tailduplicate -disable-output
1
2 implementation
3
4 int %sell_haggle() {
5 entry: ; No predecessors!
6 br bool false, label %then.5, label %UnifiedExitNode
7
8 then.5: ; preds = %entry
9 br bool false, label %loopentry.1.preheader, label %else.1
10
11 else.1: ; preds = %then.5
12 br label %loopentry.1.preheader
13
14 loopentry.1.preheader: ; preds = %then.5, %else.1
15 %final_ask.0 = phi int [ 0, %else.1 ], [ 0, %then.5 ] ; [#uses=2]
16 br label %loopentry.1
17
18 loopentry.1: ; preds = %loopentry.1.preheader, %endif.17
19 switch uint 0, label %UnifiedExitNode [
20 uint 2, label %UnifiedExitNode
21 uint 1, label %endif.16
22 ]
23
24 endif.16: ; preds = %loopentry.1
25 br bool false, label %then.17, label %UnifiedExitNode
26
27 then.17: ; preds = %endif.16
28 br bool false, label %then.18, label %endif.17
29
30 then.18: ; preds = %then.17
31 br bool false, label %endif.17, label %UnifiedExitNode
32
33 endif.17: ; preds = %then.17, %then.18
34 %cur_ask.3 = phi int [ %final_ask.0, %then.17 ], [ %final_ask.0, %then.18 ] ; [#uses=0]
35 br bool false, label %loopentry.1, label %UnifiedExitNode
36
37 UnifiedExitNode: ; preds = %entry, %endif.17, %then.18, %endif.16, %loopentry.1, %loopentry.1
38 ret int 0
39 }