llvm.org GIT mirror llvm / a1ee42a
new testcase narrowed down from xboard git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7910 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
2 changed file(s) with 130 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: as < %s | opt -tailduplicate -instcombine -simplifycfg -print -licm -disable-output
1
2 target endian = little
3 target pointersize = 32
4 %yy_base = external global [787 x short] ; <[787 x short]*> [#uses=1]
5 %yy_state_ptr = external global int* ; [#uses=3]
6 %yy_state_buf = external global [16386 x int] ; <[16386 x int]*> [#uses=1]
7 %yy_lp = external global int ; [#uses=1]
8
9 implementation ; Functions:
10
11 int %_yylex() { ; No predecessors!
12 br label %loopentry.0
13
14 loopentry.0: ; preds = %0, %else.26
15 store int* getelementptr ([16386 x int]* %yy_state_buf, long 0, long 0), int** %yy_state_ptr
16 %tmp.35 = load int** %yy_state_ptr ; [#uses=2]
17 %inc.0 = getelementptr int* %tmp.35, long 1 ; [#uses=1]
18 store int* %inc.0, int** %yy_state_ptr
19 %tmp.36 = load int* null ; [#uses=1]
20 store int %tmp.36, int* %tmp.35
21 br label %loopexit.2
22
23 loopexit.2: ; preds = %loopentry.0, %else.26, %loopexit.2
24 store sbyte* null, sbyte** null
25 %tmp.91 = load int* null ; [#uses=1]
26 %tmp.92 = cast int %tmp.91 to long ; [#uses=1]
27 %tmp.93 = getelementptr [787 x short]* %yy_base, long 0, long %tmp.92 ; [#uses=1]
28 %tmp.94 = load short* %tmp.93 ; [#uses=1]
29 %tmp.95 = setne short %tmp.94, 4394 ; [#uses=1]
30 br bool %tmp.95, label %loopexit.2, label %yy_find_action
31
32 yy_find_action: ; preds = %loopexit.2, %else.26
33 br label %loopentry.3
34
35 loopentry.3: ; preds = %yy_find_action, %shortcirc_done.0, %then.9
36 %tmp.105 = load int* %yy_lp ; [#uses=1]
37 %tmp.106 = setne int %tmp.105, 0 ; [#uses=1]
38 br bool %tmp.106, label %shortcirc_next.0, label %shortcirc_done.0
39
40 shortcirc_next.0: ; preds = %loopentry.3
41 %tmp.114 = load short* null ; [#uses=1]
42 %tmp.115 = cast short %tmp.114 to int ; [#uses=1]
43 %tmp.116 = setlt int 0, %tmp.115 ; [#uses=1]
44 br label %shortcirc_done.0
45
46 shortcirc_done.0: ; preds = %loopentry.3, %shortcirc_next.0
47 %shortcirc_val.0 = phi bool [ false, %loopentry.3 ], [ %tmp.116, %shortcirc_next.0 ] ; [#uses=1]
48 br bool %shortcirc_val.0, label %else.0, label %loopentry.3
49
50 else.0: ; preds = %shortcirc_done.0
51 %tmp.144 = load int* null ; [#uses=1]
52 %tmp.145 = and int %tmp.144, 8192 ; [#uses=1]
53 %tmp.146 = setne int %tmp.145, 0 ; [#uses=1]
54 br bool %tmp.146, label %then.9, label %else.26
55
56 then.9: ; preds = %else.0
57 br label %loopentry.3
58
59 else.26: ; preds = %else.1
60 switch uint 0, label %loopentry.0 [
61 uint 2, label %yy_find_action
62 uint 0, label %loopexit.2
63 ]
64 }
0 ; RUN: as < %s | opt -tailduplicate -instcombine -simplifycfg -print -licm -disable-output
1
2 target endian = little
3 target pointersize = 32
4 %yy_base = external global [787 x short] ; <[787 x short]*> [#uses=1]
5 %yy_state_ptr = external global int* ; [#uses=3]
6 %yy_state_buf = external global [16386 x int] ; <[16386 x int]*> [#uses=1]
7 %yy_lp = external global int ; [#uses=1]
8
9 implementation ; Functions:
10
11 int %_yylex() { ; No predecessors!
12 br label %loopentry.0
13
14 loopentry.0: ; preds = %0, %else.26
15 store int* getelementptr ([16386 x int]* %yy_state_buf, long 0, long 0), int** %yy_state_ptr
16 %tmp.35 = load int** %yy_state_ptr ; [#uses=2]
17 %inc.0 = getelementptr int* %tmp.35, long 1 ; [#uses=1]
18 store int* %inc.0, int** %yy_state_ptr
19 %tmp.36 = load int* null ; [#uses=1]
20 store int %tmp.36, int* %tmp.35
21 br label %loopexit.2
22
23 loopexit.2: ; preds = %loopentry.0, %else.26, %loopexit.2
24 store sbyte* null, sbyte** null
25 %tmp.91 = load int* null ; [#uses=1]
26 %tmp.92 = cast int %tmp.91 to long ; [#uses=1]
27 %tmp.93 = getelementptr [787 x short]* %yy_base, long 0, long %tmp.92 ; [#uses=1]
28 %tmp.94 = load short* %tmp.93 ; [#uses=1]
29 %tmp.95 = setne short %tmp.94, 4394 ; [#uses=1]
30 br bool %tmp.95, label %loopexit.2, label %yy_find_action
31
32 yy_find_action: ; preds = %loopexit.2, %else.26
33 br label %loopentry.3
34
35 loopentry.3: ; preds = %yy_find_action, %shortcirc_done.0, %then.9
36 %tmp.105 = load int* %yy_lp ; [#uses=1]
37 %tmp.106 = setne int %tmp.105, 0 ; [#uses=1]
38 br bool %tmp.106, label %shortcirc_next.0, label %shortcirc_done.0
39
40 shortcirc_next.0: ; preds = %loopentry.3
41 %tmp.114 = load short* null ; [#uses=1]
42 %tmp.115 = cast short %tmp.114 to int ; [#uses=1]
43 %tmp.116 = setlt int 0, %tmp.115 ; [#uses=1]
44 br label %shortcirc_done.0
45
46 shortcirc_done.0: ; preds = %loopentry.3, %shortcirc_next.0
47 %shortcirc_val.0 = phi bool [ false, %loopentry.3 ], [ %tmp.116, %shortcirc_next.0 ] ; [#uses=1]
48 br bool %shortcirc_val.0, label %else.0, label %loopentry.3
49
50 else.0: ; preds = %shortcirc_done.0
51 %tmp.144 = load int* null ; [#uses=1]
52 %tmp.145 = and int %tmp.144, 8192 ; [#uses=1]
53 %tmp.146 = setne int %tmp.145, 0 ; [#uses=1]
54 br bool %tmp.146, label %then.9, label %else.26
55
56 then.9: ; preds = %else.0
57 br label %loopentry.3
58
59 else.26: ; preds = %else.1
60 switch uint 0, label %loopentry.0 [
61 uint 2, label %yy_find_action
62 uint 0, label %loopexit.2
63 ]
64 }