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