llvm.org GIT mirror llvm / cae3491
new testcase for pr670 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24507 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 13 years ago
1 changed file(s) with 88 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -mem2reg -disable-output
1 ; PR670
2
3 void %printk(int, ...) {
4 entry:
5 %flags = alloca uint ; [#uses=2]
6 br bool false, label %then.0, label %endif.0
7
8 then.0: ; preds = %entry
9 br label %endif.0
10
11 endif.0: ; preds = %then.0, %entry
12 store uint 0, uint* %flags
13 br label %loopentry
14
15 loopentry: ; preds = %endif.3, %endif.0
16 br bool false, label %no_exit, label %loopexit
17
18 no_exit: ; preds = %loopentry
19 br bool false, label %then.1, label %endif.1
20
21 then.1: ; preds = %no_exit
22 br bool false, label %shortcirc_done.0, label %shortcirc_next.0
23
24 shortcirc_next.0: ; preds = %then.1
25 br label %shortcirc_done.0
26
27 shortcirc_done.0: ; preds = %shortcirc_next.0, %then.1
28 br bool false, label %shortcirc_done.1, label %shortcirc_next.1
29
30 shortcirc_next.1: ; preds = %shortcirc_done.0
31 br label %shortcirc_done.1
32
33 shortcirc_done.1: ; preds = %shortcirc_next.1, %shortcirc_done.0
34 br bool false, label %shortcirc_done.2, label %shortcirc_next.2
35
36 shortcirc_next.2: ; preds = %shortcirc_done.1
37 br label %shortcirc_done.2
38
39 shortcirc_done.2: ; preds = %shortcirc_next.2, %shortcirc_done.1
40 br bool false, label %then.2, label %endif.2
41
42 then.2: ; preds = %shortcirc_done.2
43 br label %endif.2
44
45 endif.2: ; preds = %then.2, %shortcirc_done.2
46 br label %endif.1
47
48 endif.1: ; preds = %endif.2, %no_exit
49 br bool false, label %then.3, label %endif.3
50
51 then.3: ; preds = %endif.1
52 br label %endif.3
53
54 endif.3: ; preds = %then.3, %endif.1
55 br label %loopentry
56
57 loopexit: ; preds = %loopentry
58 br label %endif.4
59
60 then.4: ; No predecessors!
61 %tmp.61 = load uint* %flags ; [#uses=0]
62 br label %out
63
64 dead_block_after_goto: ; No predecessors!
65 br label %endif.4
66
67 endif.4: ; preds = %dead_block_after_goto, %loopexit
68 br bool false, label %then.5, label %else
69
70 then.5: ; preds = %endif.4
71 br label %endif.5
72
73 else: ; preds = %endif.4
74 br label %endif.5
75
76 endif.5: ; preds = %else, %then.5
77 br label %out
78
79 out: ; preds = %endif.5, %then.4
80 br label %return
81
82 after_ret: ; No predecessors!
83 br label %return
84
85 return: ; preds = %after_ret, %out
86 ret void
87 }