For PR1319:
[oota-llvm.git] / test / Transforms / SimplifyCFG / switch_formation.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep br
2 ; END.
3
4 bool %_ZN4llvm11SetCondInst7classofEPKNS_11InstructionE({uint, uint}* %I) {
5 entry:
6         %tmp.1.i = getelementptr {uint, uint}* %I, long 0, uint 1
7         %tmp.2.i = load uint* %tmp.1.i
8         %tmp.2 = seteq uint %tmp.2.i, 14
9         br bool %tmp.2, label %shortcirc_done.4, label %shortcirc_next.0
10
11 shortcirc_next.0:               ; preds = %entry
12         %tmp.6 = seteq uint %tmp.2.i, 15                ; <bool> [#uses=1]
13         br bool %tmp.6, label %shortcirc_done.4, label %shortcirc_next.1
14
15 shortcirc_next.1:               ; preds = %shortcirc_next.0
16         %tmp.11 = seteq uint %tmp.2.i, 16               ; <bool> [#uses=1]
17         br bool %tmp.11, label %shortcirc_done.4, label %shortcirc_next.2
18
19 shortcirc_next.2:               ; preds = %shortcirc_next.1
20         %tmp.16 = seteq uint %tmp.2.i, 17               ; <bool> [#uses=1]
21         br bool %tmp.16, label %shortcirc_done.4, label %shortcirc_next.3
22
23 shortcirc_next.3:               ; preds = %shortcirc_next.2
24         %tmp.21 = seteq uint %tmp.2.i, 18               ; <bool> [#uses=1]
25         br bool %tmp.21, label %shortcirc_done.4, label %shortcirc_next.4
26
27 shortcirc_next.4:               ; preds = %shortcirc_next.3
28         %tmp.26 = seteq uint %tmp.2.i, 19               ; <bool> [#uses=1]
29         br label %UnifiedReturnBlock
30
31 shortcirc_done.4:               ; preds = %entry, %shortcirc_next.0, %shortcirc_next.1, %shortcirc_next.2, %shortcirc_next.3
32         br label %UnifiedReturnBlock
33
34 UnifiedReturnBlock:             ; preds = %shortcirc_next.4, %shortcirc_done.4
35         %UnifiedRetVal = phi bool [ %tmp.26, %shortcirc_next.4 ], [ true, %shortcirc_done.4 ]           ; <bool> [#uses=1]
36         ret bool %UnifiedRetVal
37 }