Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -instcombine -simplifycfg -licm -disable-output |
| 2 | |
| 3 | target endian = little |
| 4 | target pointersize = 32 |
| 5 | %yy_base = external global [787 x short] ; <[787 x short]*> [#uses=1] |
| 6 | %yy_state_ptr = external global int* ; <int**> [#uses=3] |
| 7 | %yy_state_buf = external global [16386 x int] ; <[16386 x int]*> [#uses=1] |
| 8 | %yy_lp = external global int ; <int*> [#uses=1] |
| 9 | |
| 10 | implementation ; Functions: |
| 11 | |
| 12 | int %_yylex() { ; No predecessors! |
| 13 | br label %loopentry.0 |
| 14 | |
| 15 | loopentry.0: ; preds = %0, %else.26 |
| 16 | store int* getelementptr ([16386 x int]* %yy_state_buf, long 0, long 0), int** %yy_state_ptr |
| 17 | %tmp.35 = load int** %yy_state_ptr ; <int*> [#uses=2] |
| 18 | %inc.0 = getelementptr int* %tmp.35, long 1 ; <int*> [#uses=1] |
| 19 | store int* %inc.0, int** %yy_state_ptr |
| 20 | %tmp.36 = load int* null ; <int> [#uses=1] |
| 21 | store int %tmp.36, int* %tmp.35 |
| 22 | br label %loopexit.2 |
| 23 | |
| 24 | loopexit.2: ; preds = %loopentry.0, %else.26, %loopexit.2 |
| 25 | store sbyte* null, sbyte** null |
| 26 | %tmp.91 = load int* null ; <int> [#uses=1] |
| 27 | %tmp.92 = cast int %tmp.91 to long ; <long> [#uses=1] |
| 28 | %tmp.93 = getelementptr [787 x short]* %yy_base, long 0, long %tmp.92 ; <short*> [#uses=1] |
| 29 | %tmp.94 = load short* %tmp.93 ; <short> [#uses=1] |
| 30 | %tmp.95 = setne short %tmp.94, 4394 ; <bool> [#uses=1] |
| 31 | br bool %tmp.95, label %loopexit.2, label %yy_find_action |
| 32 | |
| 33 | yy_find_action: ; preds = %loopexit.2, %else.26 |
| 34 | br label %loopentry.3 |
| 35 | |
| 36 | loopentry.3: ; preds = %yy_find_action, %shortcirc_done.0, %then.9 |
| 37 | %tmp.105 = load int* %yy_lp ; <int> [#uses=1] |
| 38 | %tmp.106 = setne int %tmp.105, 0 ; <bool> [#uses=1] |
| 39 | br bool %tmp.106, label %shortcirc_next.0, label %shortcirc_done.0 |
| 40 | |
| 41 | shortcirc_next.0: ; preds = %loopentry.3 |
| 42 | %tmp.114 = load short* null ; <short> [#uses=1] |
| 43 | %tmp.115 = cast short %tmp.114 to int ; <int> [#uses=1] |
| 44 | %tmp.116 = setlt int 0, %tmp.115 ; <bool> [#uses=1] |
| 45 | br label %shortcirc_done.0 |
| 46 | |
| 47 | shortcirc_done.0: ; preds = %loopentry.3, %shortcirc_next.0 |
| 48 | %shortcirc_val.0 = phi bool [ false, %loopentry.3 ], [ %tmp.116, %shortcirc_next.0 ] ; <bool> [#uses=1] |
| 49 | br bool %shortcirc_val.0, label %else.0, label %loopentry.3 |
| 50 | |
| 51 | else.0: ; preds = %shortcirc_done.0 |
| 52 | %tmp.144 = load int* null ; <int> [#uses=1] |
| 53 | %tmp.145 = and int %tmp.144, 8192 ; <int> [#uses=1] |
| 54 | %tmp.146 = setne int %tmp.145, 0 ; <bool> [#uses=1] |
| 55 | br bool %tmp.146, label %then.9, label %else.26 |
| 56 | |
| 57 | then.9: ; preds = %else.0 |
| 58 | br label %loopentry.3 |
| 59 | |
| 60 | else.26: ; preds = %else.1 |
| 61 | switch uint 0, label %loopentry.0 [ |
| 62 | uint 2, label %yy_find_action |
| 63 | uint 0, label %loopexit.2 |
| 64 | ] |
| 65 | } |