1 ; RUN: opt < %s -tailduplicate -disable-output
3 define i32 @sell_haggle() {
5 br i1 false, label %then.5, label %UnifiedExitNode
6 then.5: ; preds = %entry
7 br i1 false, label %loopentry.1.preheader, label %else.1
8 else.1: ; preds = %then.5
9 br label %loopentry.1.preheader
10 loopentry.1.preheader: ; preds = %else.1, %then.5
11 %final_ask.0 = phi i32 [ 0, %else.1 ], [ 0, %then.5 ] ; <i32> [#uses=2]
13 loopentry.1: ; preds = %endif.17, %loopentry.1.preheader
14 switch i32 0, label %UnifiedExitNode [
15 i32 2, label %UnifiedExitNode
16 i32 1, label %endif.16
18 endif.16: ; preds = %loopentry.1
19 br i1 false, label %then.17, label %UnifiedExitNode
20 then.17: ; preds = %endif.16
21 br i1 false, label %then.18, label %endif.17
22 then.18: ; preds = %then.17
23 br i1 false, label %endif.17, label %UnifiedExitNode
24 endif.17: ; preds = %then.18, %then.17
25 %cur_ask.3 = phi i32 [ %final_ask.0, %then.17 ], [ %final_ask.0, %then.18 ] ; <i32> [#uses=0]
26 br i1 false, label %loopentry.1, label %UnifiedExitNode
27 UnifiedExitNode: ; preds = %endif.17, %then.18, %endif.16, %loopentry.1, %loopentry.1, %entry