Dale Johannesen | 6b896ce | 2007-02-17 00:44:34 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | llc && |
| 2 | ; RUN: llvm-as < %s | llc | grep jmp | wc -l | grep 0 |
Dale Johannesen | 6070f2e | 2007-02-17 01:12:15 +0000 | [diff] [blame] | 3 | ; PR 1200 |
Dale Johannesen | 6b896ce | 2007-02-17 00:44:34 +0000 | [diff] [blame] | 4 | |
Anton Korobeynikov | 4198c58 | 2007-04-09 12:31:58 +0000 | [diff] [blame^] | 5 | ; ModuleID = '<stdin>' |
Dale Johannesen | 6b896ce | 2007-02-17 00:44:34 +0000 | [diff] [blame] | 6 | target datalayout = "e-p:32:32" |
| 7 | target triple = "i686-apple-darwin8" |
| 8 | %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } |
| 9 | %struct.Index_Map = type { i32, %struct.item_set** } |
| 10 | %struct.Item = type { [4 x i16], %struct.rule* } |
| 11 | %struct.__sFILEX = type opaque |
| 12 | %struct.__sbuf = type { i8*, i32 } |
| 13 | %struct.dimension = type { i16*, %struct.Index_Map, %struct.mapping*, i32, %struct.plankMap* } |
| 14 | %struct.item_set = type { i32, i32, %struct.operator*, [2 x %struct.item_set*], %struct.item_set*, i16*, %struct.Item*, %struct.Item* } |
| 15 | %struct.list = type { i8*, %struct.list* } |
| 16 | %struct.mapping = type { %struct.list**, i32, i32, i32, %struct.item_set** } |
| 17 | %struct.nonterminal = type { i8*, i32, i32, i32, %struct.plankMap*, %struct.rule* } |
| 18 | %struct.operator = type { i8*, i8, i32, i32, i32, i32, %struct.table* } |
| 19 | %struct.pattern = type { %struct.nonterminal*, %struct.operator*, [2 x %struct.nonterminal*] } |
| 20 | %struct.plank = type { i8*, %struct.list*, i32 } |
| 21 | %struct.plankMap = type { %struct.list*, i32, %struct.stateMap* } |
| 22 | %struct.rule = type { [4 x i16], i32, i32, i32, %struct.nonterminal*, %struct.pattern*, i8 } |
| 23 | %struct.stateMap = type { i8*, %struct.plank*, i32, i16* } |
| 24 | %struct.table = type { %struct.operator*, %struct.list*, i16*, [2 x %struct.dimension*], %struct.item_set** } |
| 25 | @outfile = external global %struct.FILE* ; <%struct.FILE**> [#uses=1] |
| 26 | @str1 = external global [11 x i8] ; <[11 x i8]*> [#uses=1] |
| 27 | |
Dale Johannesen | 6b896ce | 2007-02-17 00:44:34 +0000 | [diff] [blame] | 28 | declare i32 @fprintf(%struct.FILE*, i8*, ...) |
| 29 | |
| 30 | define i16 @main_bb_2E_i9_2E_i_2E_i932_2E_ce(%struct.list* %l_addr.01.0.i2.i.i929, %struct.operator** %tmp66.i62.i.out) { |
| 31 | newFuncRoot: |
| 32 | br label %bb.i9.i.i932.ce |
| 33 | |
Anton Korobeynikov | 4198c58 | 2007-04-09 12:31:58 +0000 | [diff] [blame^] | 34 | NewDefault: ; preds = %LeafBlock, %LeafBlock1, %LeafBlock2, %LeafBlock3 |
| 35 | br label %bb36.i.i.exitStub |
| 36 | |
| 37 | bb36.i.i.exitStub: ; preds = %NewDefault |
Dale Johannesen | 6b896ce | 2007-02-17 00:44:34 +0000 | [diff] [blame] | 38 | store %struct.operator* %tmp66.i62.i, %struct.operator** %tmp66.i62.i.out |
| 39 | ret i16 0 |
| 40 | |
Anton Korobeynikov | 4198c58 | 2007-04-09 12:31:58 +0000 | [diff] [blame^] | 41 | bb.i14.i.exitStub: ; preds = %LeafBlock |
Dale Johannesen | 6b896ce | 2007-02-17 00:44:34 +0000 | [diff] [blame] | 42 | store %struct.operator* %tmp66.i62.i, %struct.operator** %tmp66.i62.i.out |
| 43 | ret i16 1 |
| 44 | |
Anton Korobeynikov | 4198c58 | 2007-04-09 12:31:58 +0000 | [diff] [blame^] | 45 | bb12.i.i935.exitStub: ; preds = %LeafBlock1 |
Dale Johannesen | 6b896ce | 2007-02-17 00:44:34 +0000 | [diff] [blame] | 46 | store %struct.operator* %tmp66.i62.i, %struct.operator** %tmp66.i62.i.out |
| 47 | ret i16 2 |
| 48 | |
Anton Korobeynikov | 4198c58 | 2007-04-09 12:31:58 +0000 | [diff] [blame^] | 49 | bb20.i.i937.exitStub: ; preds = %LeafBlock2 |
Dale Johannesen | 6b896ce | 2007-02-17 00:44:34 +0000 | [diff] [blame] | 50 | store %struct.operator* %tmp66.i62.i, %struct.operator** %tmp66.i62.i.out |
| 51 | ret i16 3 |
| 52 | |
Anton Korobeynikov | 4198c58 | 2007-04-09 12:31:58 +0000 | [diff] [blame^] | 53 | bb28.i.i938.exitStub: ; preds = %LeafBlock3 |
Dale Johannesen | 6b896ce | 2007-02-17 00:44:34 +0000 | [diff] [blame] | 54 | store %struct.operator* %tmp66.i62.i, %struct.operator** %tmp66.i62.i.out |
| 55 | ret i16 4 |
| 56 | |
| 57 | bb.i9.i.i932.ce: ; preds = %newFuncRoot |
| 58 | %tmp1.i3.i.i930 = getelementptr %struct.list* %l_addr.01.0.i2.i.i929, i32 0, i32 0 ; <i8**> [#uses=1] |
| 59 | %tmp2.i4.i.i931 = load i8** %tmp1.i3.i.i930 ; <i8*> [#uses=1] |
| 60 | %tmp66.i62.i = bitcast i8* %tmp2.i4.i.i931 to %struct.operator* ; <%struct.operator*> [#uses=7] |
| 61 | %tmp1.i6.i = getelementptr %struct.operator* %tmp66.i62.i, i32 0, i32 2 ; <i32*> [#uses=1] |
| 62 | %tmp2.i7.i = load i32* %tmp1.i6.i ; <i32> [#uses=1] |
| 63 | %tmp3.i8.i = load %struct.FILE** @outfile ; <%struct.FILE*> [#uses=1] |
| 64 | %tmp5.i9.i = call i32 (%struct.FILE*, i8*, ...)* @fprintf( %struct.FILE* %tmp3.i8.i, i8* getelementptr ([11 x i8]* @str1, i32 0, i32 0), i32 %tmp2.i7.i ) ; <i32> [#uses=0] |
| 65 | %tmp7.i10.i = getelementptr %struct.operator* %tmp66.i62.i, i32 0, i32 5 ; <i32*> [#uses=1] |
Anton Korobeynikov | 4198c58 | 2007-04-09 12:31:58 +0000 | [diff] [blame^] | 66 | %tmp8.i11.i = load i32* %tmp7.i10.i ; <i32> [#uses=7] |
| 67 | br label %NodeBlock5 |
| 68 | |
| 69 | NodeBlock5: ; preds = %bb.i9.i.i932.ce |
| 70 | icmp slt i32 %tmp8.i11.i, 1 ; <i1>:0 [#uses=1] |
| 71 | br i1 %0, label %NodeBlock, label %NodeBlock4 |
| 72 | |
| 73 | NodeBlock4: ; preds = %NodeBlock5 |
| 74 | icmp slt i32 %tmp8.i11.i, 2 ; <i1>:1 [#uses=1] |
| 75 | br i1 %1, label %LeafBlock2, label %LeafBlock3 |
| 76 | |
| 77 | LeafBlock3: ; preds = %NodeBlock4 |
| 78 | icmp eq i32 %tmp8.i11.i, 2 ; <i1>:2 [#uses=1] |
| 79 | br i1 %2, label %bb28.i.i938.exitStub, label %NewDefault |
| 80 | |
| 81 | LeafBlock2: ; preds = %NodeBlock4 |
| 82 | icmp eq i32 %tmp8.i11.i, 1 ; <i1>:3 [#uses=1] |
| 83 | br i1 %3, label %bb20.i.i937.exitStub, label %NewDefault |
| 84 | |
| 85 | NodeBlock: ; preds = %NodeBlock5 |
| 86 | icmp slt i32 %tmp8.i11.i, 0 ; <i1>:4 [#uses=1] |
| 87 | br i1 %4, label %LeafBlock, label %LeafBlock1 |
| 88 | |
| 89 | LeafBlock1: ; preds = %NodeBlock |
| 90 | icmp eq i32 %tmp8.i11.i, 0 ; <i1>:5 [#uses=1] |
| 91 | br i1 %5, label %bb12.i.i935.exitStub, label %NewDefault |
| 92 | |
| 93 | LeafBlock: ; preds = %NodeBlock |
| 94 | icmp eq i32 %tmp8.i11.i, -1 ; <i1>:6 [#uses=1] |
| 95 | br i1 %6, label %bb.i14.i.exitStub, label %NewDefault |
Dale Johannesen | 6b896ce | 2007-02-17 00:44:34 +0000 | [diff] [blame] | 96 | } |