| 1 |
; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -relocation-model=pic -frame-pointer=all |
| 2 |
|
| 3 |
%0 = type { %struct.GAP } ; type %0 |
| 4 |
%1 = type { i16, i8, i8 } ; type %1 |
| 5 |
%2 = type { [2 x i32], [2 x i32] } ; type %2 |
| 6 |
%3 = type { ptr } ; type %3 |
| 7 |
%4 = type { i8, i8, i16, i8, i8, i8, i8 } ; type %4 |
| 8 |
%struct.FILE = type { ptr, i32, i32, i16, i16, %struct.__sbuf, i32, ptr, ptr, ptr, ptr, ptr, %struct.__sbuf, ptr, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } |
| 9 |
%struct.FILE_POS = type { i8, i8, i16, i32 } |
| 10 |
%struct.FIRST_UNION = type { %struct.FILE_POS } |
| 11 |
%struct.FOURTH_UNION = type { %struct.STYLE } |
| 12 |
%struct.GAP = type { i8, i8, i16 } |
| 13 |
%struct.LIST = type { ptr, ptr } |
| 14 |
%struct.SECOND_UNION = type { %1 } |
| 15 |
%struct.STYLE = type { %0, %0, i16, i16, i32 } |
| 16 |
%struct.THIRD_UNION = type { %2 } |
| 17 |
%struct.__sFILEX = type opaque |
| 18 |
%struct.__sbuf = type { ptr, i32 } |
| 19 |
%struct.head_type = type { [2 x %struct.LIST], %struct.FIRST_UNION, %struct.SECOND_UNION, %struct.THIRD_UNION, %struct.FOURTH_UNION, ptr, %3, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 } |
| 20 |
%struct.rec = type { %struct.head_type } |
| 21 |
@.str24239 = external constant [20 x i8], align 1 ; <ptr> [#uses=1] |
| 22 |
@no_file_pos = external global %4 ; <ptr> [#uses=1] |
| 23 |
@zz_tmp = external global ptr ; <ptr> [#uses=1] |
| 24 |
@.str81872 = external constant [10 x i8], align 1 ; <ptr> [#uses=1] |
| 25 |
@out_fp = external global ptr ; <ptr> [#uses=2] |
| 26 |
@cpexists = external global i32 ; <ptr> [#uses=2] |
| 27 |
@.str212784 = external constant [17 x i8], align 1 ; <ptr> [#uses=1] |
| 28 |
@.str1822946 = external constant [8 x i8], align 1 ; <ptr> [#uses=1] |
| 29 |
@.str1842948 = external constant [11 x i8], align 1 ; <ptr> [#uses=1] |
| 30 |
|
| 31 |
declare i32 @fprintf(ptr nocapture, ptr nocapture, ...) nounwind |
| 32 |
|
| 33 |
declare i32 @"\01_fwrite"(ptr, i32, i32, ptr) |
| 34 |
|
| 35 |
declare ptr @OpenIncGraphicFile(ptr, i8 zeroext, ptr nocapture, ptr, ptr nocapture) nounwind |
| 36 |
|
| 37 |
declare void @Error(i32, i32, ptr, i32, ptr, ...) nounwind |
| 38 |
|
| 39 |
declare ptr @fgets(ptr, i32, ptr nocapture) nounwind |
| 40 |
|
| 41 |
define void @PS_PrintGraphicInclude(ptr %x, i32 %colmark, i32 %rowmark) nounwind { |
| 42 |
entry: |
| 43 |
br label %bb5 |
| 44 |
|
| 45 |
bb5: ; preds = %bb5, %entry |
| 46 |
%.pn = phi ptr [ %y.0, %bb5 ], [ undef, %entry ] ; <ptr> [#uses=1] |
| 47 |
%y.0.in = getelementptr %struct.rec, ptr %.pn, i32 0, i32 0, i32 0, i32 1, i32 0 ; <ptr> [#uses=1] |
| 48 |
%y.0 = load ptr, ptr %y.0.in ; <ptr> [#uses=2] |
| 49 |
br i1 undef, label %bb5, label %bb6 |
| 50 |
|
| 51 |
bb6: ; preds = %bb5 |
| 52 |
%0 = call ptr @OpenIncGraphicFile(ptr undef, i8 zeroext 0, ptr undef, ptr null, ptr undef) nounwind ; <ptr> [#uses=1] |
| 53 |
br i1 false, label %bb.i, label %FontHalfXHeight.exit |
| 54 |
|
| 55 |
bb.i: ; preds = %bb6 |
| 56 |
br label %FontHalfXHeight.exit |
| 57 |
|
| 58 |
FontHalfXHeight.exit: ; preds = %bb.i, %bb6 |
| 59 |
br i1 undef, label %bb.i1, label %FontSize.exit |
| 60 |
|
| 61 |
bb.i1: ; preds = %FontHalfXHeight.exit |
| 62 |
br label %FontSize.exit |
| 63 |
|
| 64 |
FontSize.exit: ; preds = %bb.i1, %FontHalfXHeight.exit |
| 65 |
%1 = load i32, ptr undef, align 4 ; <i32> [#uses=1] |
| 66 |
%2 = icmp ult i32 0, undef ; <i1> [#uses=1] |
| 67 |
br i1 %2, label %bb.i5, label %FontName.exit |
| 68 |
|
| 69 |
bb.i5: ; preds = %FontSize.exit |
| 70 |
call void (i32, i32, ptr, i32, ptr, ...) @Error(i32 1, i32 2, ptr @.str24239, i32 0, ptr @no_file_pos, ptr @.str81872) nounwind |
| 71 |
br label %FontName.exit |
| 72 |
|
| 73 |
FontName.exit: ; preds = %bb.i5, %FontSize.exit |
| 74 |
%3 = call i32 (ptr, ptr, ...) @fprintf(ptr undef, ptr @.str1822946, i32 %1, ptr undef) nounwind ; <i32> [#uses=0] |
| 75 |
%4 = call i32 @"\01_fwrite"(ptr @.str1842948, i32 1, i32 10, ptr undef) nounwind ; <i32> [#uses=0] |
| 76 |
%5 = sub i32 %colmark, undef ; <i32> [#uses=1] |
| 77 |
%6 = sub i32 %rowmark, undef ; <i32> [#uses=1] |
| 78 |
%7 = load ptr, ptr @out_fp, align 4 ; <ptr> [#uses=1] |
| 79 |
%8 = call i32 (ptr, ptr, ...) @fprintf(ptr %7, ptr @.str212784, i32 %5, i32 %6) nounwind ; <i32> [#uses=0] |
| 80 |
store i32 0, ptr @cpexists, align 4 |
| 81 |
%9 = getelementptr %struct.rec, ptr %y.0, i32 0, i32 0, i32 3, i32 0, i32 0, i32 1 ; <ptr> [#uses=1] |
| 82 |
%10 = load i32, ptr %9, align 4 ; <i32> [#uses=1] |
| 83 |
%11 = sub i32 0, %10 ; <i32> [#uses=1] |
| 84 |
%12 = load ptr, ptr @out_fp, align 4 ; <ptr> [#uses=1] |
| 85 |
%13 = call i32 (ptr, ptr, ...) @fprintf(ptr %12, ptr @.str212784, i32 undef, i32 %11) nounwind ; <i32> [#uses=0] |
| 86 |
store i32 0, ptr @cpexists, align 4 |
| 87 |
br label %bb100.outer.outer |
| 88 |
|
| 89 |
bb100.outer.outer: ; preds = %bb79.critedge, %bb1.i3, %FontName.exit |
| 90 |
%x_addr.0.ph.ph = phi ptr [ %x, %FontName.exit ], [ null, %bb79.critedge ], [ null, %bb1.i3 ] ; <ptr> [#uses=1] |
| 91 |
%14 = getelementptr %struct.rec, ptr %x_addr.0.ph.ph, i32 0, i32 0, i32 1, i32 0 ; <ptr> [#uses=0] |
| 92 |
br label %bb100.outer |
| 93 |
|
| 94 |
bb.i80: ; preds = %bb3.i85 |
| 95 |
br i1 undef, label %bb2.i84, label %bb2.i51 |
| 96 |
|
| 97 |
bb2.i84: ; preds = %bb100.outer, %bb.i80 |
| 98 |
br i1 undef, label %bb3.i77, label %bb3.i85 |
| 99 |
|
| 100 |
bb3.i85: ; preds = %bb2.i84 |
| 101 |
br i1 false, label %StringBeginsWith.exit88, label %bb.i80 |
| 102 |
|
| 103 |
StringBeginsWith.exit88: ; preds = %bb3.i85 |
| 104 |
br i1 undef, label %bb3.i77, label %bb2.i51 |
| 105 |
|
| 106 |
bb2.i.i68: ; preds = %bb3.i77 |
| 107 |
br label %bb3.i77 |
| 108 |
|
| 109 |
bb3.i77: ; preds = %bb2.i.i68, %StringBeginsWith.exit88, %bb2.i84 |
| 110 |
br i1 false, label %bb1.i58, label %bb2.i.i68 |
| 111 |
|
| 112 |
bb1.i58: ; preds = %bb3.i77 |
| 113 |
unreachable |
| 114 |
|
| 115 |
bb.i47: ; preds = %bb3.i52 |
| 116 |
br i1 undef, label %bb2.i51, label %bb2.i.i15.critedge |
| 117 |
|
| 118 |
bb2.i51: ; preds = %bb.i47, %StringBeginsWith.exit88, %bb.i80 |
| 119 |
%15 = load i8, ptr undef, align 1 ; <i8> [#uses=0] |
| 120 |
br i1 false, label %StringBeginsWith.exit55thread-split, label %bb3.i52 |
| 121 |
|
| 122 |
bb3.i52: ; preds = %bb2.i51 |
| 123 |
br i1 false, label %StringBeginsWith.exit55, label %bb.i47 |
| 124 |
|
| 125 |
StringBeginsWith.exit55thread-split: ; preds = %bb2.i51 |
| 126 |
br label %StringBeginsWith.exit55 |
| 127 |
|
| 128 |
StringBeginsWith.exit55: ; preds = %StringBeginsWith.exit55thread-split, %bb3.i52 |
| 129 |
br label %bb2.i41 |
| 130 |
|
| 131 |
bb2.i41: ; preds = %bb2.i41, %StringBeginsWith.exit55 |
| 132 |
br label %bb2.i41 |
| 133 |
|
| 134 |
bb2.i.i15.critedge: ; preds = %bb.i47 |
| 135 |
%16 = call ptr @fgets(ptr undef, i32 512, ptr %0) nounwind ; <ptr> [#uses=0] |
| 136 |
%iftmp.560.0 = select i1 undef, i32 2, i32 0 ; <i32> [#uses=1] |
| 137 |
br label %bb100.outer |
| 138 |
|
| 139 |
bb2.i8: ; preds = %bb100.outer |
| 140 |
br i1 undef, label %bb1.i3, label %bb79.critedge |
| 141 |
|
| 142 |
bb1.i3: ; preds = %bb2.i8 |
| 143 |
br label %bb100.outer.outer |
| 144 |
|
| 145 |
bb79.critedge: ; preds = %bb2.i8 |
| 146 |
store ptr null, ptr @zz_tmp, align 4 |
| 147 |
br label %bb100.outer.outer |
| 148 |
|
| 149 |
bb100.outer: ; preds = %bb2.i.i15.critedge, %bb100.outer.outer |
| 150 |
%state.0.ph = phi i32 [ 0, %bb100.outer.outer ], [ %iftmp.560.0, %bb2.i.i15.critedge ] ; <i32> [#uses=1] |
| 151 |
%cond = icmp eq i32 %state.0.ph, 1 ; <i1> [#uses=1] |
| 152 |
br i1 %cond, label %bb2.i8, label %bb2.i84 |
| 153 |
} |