1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin 2 3 @.str41196 = external constant [2 x i8], align 4 ; <[2 x i8]*> [#uses=1] 4 5 declare void @syStopraw(i32) nounwind 6 7 declare i32 @SyFopen(i8*, i8*) nounwind 8 9 declare i8* @SyFgets(i8*, i32) nounwind 10 11 define void @SyHelp(i8* nocapture %topic, i32 %fin) nounwind { 12 entry: 13 %line = alloca [256 x i8], align 4 ; <[256 x i8]*> [#uses=1] 14 %secname = alloca [1024 x i8], align 4 ; <[1024 x i8]*> [#uses=0] 15 %last = alloca [256 x i8], align 4 ; <[256 x i8]*> [#uses=1] 16 %last2 = alloca [256 x i8], align 4 ; <[256 x i8]*> [#uses=1] 17 br i1 undef, label %bb, label %bb2 18 19 bb: ; preds = %entry 20 br i1 undef, label %bb2, label %bb3 21 22 bb2: ; preds = %bb, %entry 23 br label %bb3 24 25 bb3: ; preds = %bb2, %bb 26 %storemerge = phi i32 [ 0, %bb2 ], [ 1, %bb ] ; <i32> [#uses=1] 27 br i1 undef, label %bb19, label %bb20 28 29 bb19: ; preds = %bb3 30 br label %bb20 31 32 bb20: ; preds = %bb19, %bb3 33 br i1 undef, label %bb25, label %bb26 34 35 bb25: ; preds = %bb20 36 br label %bb26 37 38 bb26: ; preds = %bb25, %bb20 39 %offset.2 = phi i32 [ -2, %bb25 ], [ 0, %bb20 ] ; <i32> [#uses=1] 40 br i1 undef, label %bb.nph508, label %bb49 41 42 bb.nph508: ; preds = %bb26 43 unreachable 44 45 bb49: ; preds = %bb26 46 br i1 undef, label %bb51, label %bb50 47 48 bb50: ; preds = %bb49 49 br i1 undef, label %bb51, label %bb104 50 51 bb51: ; preds = %bb50, %bb49 52 unreachable 53 54 bb104: ; preds = %bb50 55 br i1 undef, label %bb106, label %bb105 56 57 bb105: ; preds = %bb104 58 br i1 undef, label %bb106, label %bb161 59 60 bb106: ; preds = %bb105, %bb104 61 unreachable 62 63 bb161: ; preds = %bb105 64 br i1 false, label %bb163, label %bb162 65 66 bb162: ; preds = %bb161 67 br i1 undef, label %bb163, label %bb224 68 69 bb163: ; preds = %bb162, %bb161 70 unreachable 71 72 bb224: ; preds = %bb162 73 %0 = call i32 @SyFopen(i8* undef, i8* getelementptr inbounds ([2 x i8]* @.str41196, i32 0, i32 0)) nounwind ; <i32> [#uses=2] 74 br i1 false, label %bb297, label %bb300 75 76 bb297: ; preds = %bb224 77 unreachable 78 79 bb300: ; preds = %bb224 80 %1 = icmp eq i32 %offset.2, -1 ; <i1> [#uses=1] 81 br label %bb440 82 83 bb307: ; preds = %isdigit1498.exit67 84 br label %bb308 85 86 bb308: ; preds = %bb440, %bb307 87 br i1 undef, label %bb309, label %isdigit1498.exit67 88 89 isdigit1498.exit67: ; preds = %bb308 90 br i1 undef, label %bb309, label %bb307 91 92 bb309: ; preds = %isdigit1498.exit67, %bb308 93 br i1 undef, label %bb310, label %bb313 94 95 bb310: ; preds = %bb309 96 br label %bb313 97 98 bb313: ; preds = %bb310, %bb309 99 br i1 false, label %bb318, label %bb317 100 101 bb317: ; preds = %bb313 102 %2 = icmp sgt i8 undef, -1 ; <i1> [#uses=1] 103 br i1 %2, label %bb.i.i73, label %bb1.i.i74 104 105 bb.i.i73: ; preds = %bb317 106 br i1 false, label %bb318, label %bb329.outer 107 108 bb1.i.i74: ; preds = %bb317 109 unreachable 110 111 bb318: ; preds = %bb.i.i73, %bb313 112 ret void 113 114 bb329.outer: ; preds = %bb.i.i73 115 br i1 undef, label %bb333, label %bb329.us.us 116 117 bb329.us.us: ; preds = %bb329.us.us, %bb329.outer 118 br i1 undef, label %bb333, label %bb329.us.us 119 120 bb333: ; preds = %bb329.us.us, %bb329.outer 121 %match.0.lcssa = phi i32 [ undef, %bb329.us.us ], [ 2, %bb329.outer ] ; <i32> [#uses=2] 122 br i1 undef, label %bb335, label %bb388 123 124 bb335: ; preds = %bb333 125 %3 = and i1 undef, %1 ; <i1> [#uses=1] 126 br i1 %3, label %bb339, label %bb348 127 128 bb339: ; preds = %bb335 129 br i1 false, label %bb340, label %bb345 130 131 bb340: ; preds = %bb339 132 br i1 undef, label %return, label %bb341 133 134 bb341: ; preds = %bb340 135 ret void 136 137 bb345: ; preds = %bb345, %bb339 138 %4 = phi i8 [ %5, %bb345 ], [ undef, %bb339 ] ; <i8> [#uses=0] 139 %indvar670 = phi i32 [ %tmp673, %bb345 ], [ 0, %bb339 ] ; <i32> [#uses=1] 140 %tmp673 = add i32 %indvar670, 1 ; <i32> [#uses=2] 141 %scevgep674 = getelementptr [256 x i8]* %last, i32 0, i32 %tmp673 ; <i8*> [#uses=1] 142 %5 = load i8* %scevgep674, align 1 ; <i8> [#uses=1] 143 br i1 undef, label %bb347, label %bb345 144 145 bb347: ; preds = %bb345 146 br label %bb348 147 148 bb348: ; preds = %bb347, %bb335 149 br i1 false, label %bb352, label %bb356 150 151 bb352: ; preds = %bb348 152 unreachable 153 154 bb356: ; preds = %bb348 155 br i1 undef, label %bb360, label %bb369 156 157 bb360: ; preds = %bb356 158 br i1 false, label %bb361, label %bb366 159 160 bb361: ; preds = %bb360 161 br i1 undef, label %return, label %bb362 162 163 bb362: ; preds = %bb361 164 ret void 165 166 bb366: ; preds = %bb366, %bb360 167 %indvar662 = phi i32 [ %tmp665, %bb366 ], [ 0, %bb360 ] ; <i32> [#uses=1] 168 %tmp665 = add i32 %indvar662, 1 ; <i32> [#uses=2] 169 %scevgep666 = getelementptr [256 x i8]* %last2, i32 0, i32 %tmp665 ; <i8*> [#uses=1] 170 %6 = load i8* %scevgep666, align 1 ; <i8> [#uses=0] 171 br i1 false, label %bb368, label %bb366 172 173 bb368: ; preds = %bb366 174 br label %bb369 175 176 bb369: ; preds = %bb368, %bb356 177 br i1 undef, label %bb373, label %bb388 178 179 bb373: ; preds = %bb383, %bb369 180 %7 = call i8* @SyFgets(i8* undef, i32 %0) nounwind ; <i8*> [#uses=1] 181 %8 = icmp eq i8* %7, null ; <i1> [#uses=1] 182 br i1 %8, label %bb375, label %bb383 183 184 bb375: ; preds = %bb373 185 %9 = icmp eq i32 %storemerge, 0 ; <i1> [#uses=1] 186 br i1 %9, label %return, label %bb376 187 188 bb376: ; preds = %bb375 189 ret void 190 191 bb383: ; preds = %bb373 192 %10 = load i8* undef, align 1 ; <i8> [#uses=1] 193 %cond1 = icmp eq i8 %10, 46 ; <i1> [#uses=1] 194 br i1 %cond1, label %bb373, label %bb388 195 196 bb388: ; preds = %bb383, %bb369, %bb333 197 %match.1140 = phi i32 [ %match.0.lcssa, %bb369 ], [ 0, %bb333 ], [ %match.0.lcssa, %bb383 ] ; <i32> [#uses=1] 198 br label %bb391 199 200 bb390: ; preds = %isdigit1498.exit83, %bb392 201 %indvar.next725 = add i32 %indvar724, 1 ; <i32> [#uses=1] 202 br label %bb391 203 204 bb391: ; preds = %bb390, %bb388 205 %indvar724 = phi i32 [ %indvar.next725, %bb390 ], [ 0, %bb388 ] ; <i32> [#uses=2] 206 %11 = load i8* undef, align 1 ; <i8> [#uses=0] 207 br i1 false, label %bb395, label %bb392 208 209 bb392: ; preds = %bb391 210 br i1 undef, label %bb390, label %isdigit1498.exit83 211 212 isdigit1498.exit83: ; preds = %bb392 213 br i1 undef, label %bb390, label %bb395 214 215 bb394: ; preds = %isdigit1498.exit87 216 br label %bb395 217 218 bb395: ; preds = %bb394, %isdigit1498.exit83, %bb391 219 %storemerge14.sum = add i32 %indvar724, undef ; <i32> [#uses=1] 220 %p.26 = getelementptr [256 x i8]* %line, i32 0, i32 %storemerge14.sum ; <i8*> [#uses=1] 221 br i1 undef, label %bb400, label %isdigit1498.exit87 222 223 isdigit1498.exit87: ; preds = %bb395 224 br i1 false, label %bb400, label %bb394 225 226 bb400: ; preds = %isdigit1498.exit87, %bb395 227 br i1 undef, label %bb402, label %bb403 228 229 bb402: ; preds = %bb400 230 %12 = getelementptr inbounds i8* %p.26, i32 undef ; <i8*> [#uses=1] 231 br label %bb403 232 233 bb403: ; preds = %bb402, %bb400 234 %p.29 = phi i8* [ %12, %bb402 ], [ undef, %bb400 ] ; <i8*> [#uses=0] 235 br i1 undef, label %bb405, label %bb404 236 237 bb404: ; preds = %bb403 238 br i1 undef, label %bb405, label %bb407 239 240 bb405: ; preds = %bb404, %bb403 241 br i1 undef, label %return, label %bb406 242 243 bb406: ; preds = %bb405 244 call void @syStopraw(i32 %fin) nounwind 245 ret void 246 247 bb407: ; preds = %bb404 248 %cond = icmp eq i32 %match.1140, 2 ; <i1> [#uses=1] 249 br i1 %cond, label %bb408, label %bb428 250 251 bb408: ; preds = %bb407 252 unreachable 253 254 bb428: ; preds = %bb407 255 br label %bb440 256 257 bb440: ; preds = %bb428, %bb300 258 %13 = call i8* @SyFgets(i8* undef, i32 %0) nounwind ; <i8*> [#uses=0] 259 br i1 false, label %bb442, label %bb308 260 261 bb442: ; preds = %bb440 262 unreachable 263 264 return: ; preds = %bb405, %bb375, %bb361, %bb340 265 ret void 266 } 267