1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 2 3 declare noalias i8* @malloc(i32) nounwind 4 5 define internal void @gl_DrawPixels(i32 %width, i32 %height, i32 %format, i32 %type, i8* %pixels) nounwind { 6 entry: 7 br i1 undef, label %bb3.i, label %bb3 8 9 bb3.i: ; preds = %entry 10 unreachable 11 12 gl_error.exit: ; preds = %bb22 13 ret void 14 15 bb3: ; preds = %entry 16 br i1 false, label %bb5, label %bb4 17 18 bb4: ; preds = %bb3 19 br label %bb5 20 21 bb5: ; preds = %bb4, %bb3 22 br i1 undef, label %bb19, label %bb22 23 24 bb19: ; preds = %bb5 25 switch i32 %type, label %bb3.i6.i [ 26 i32 5120, label %bb1.i13 27 i32 5121, label %bb1.i13 28 i32 6656, label %bb9.i.i6 29 ] 30 31 bb9.i.i6: ; preds = %bb19 32 br label %bb1.i13 33 34 bb3.i6.i: ; preds = %bb19 35 unreachable 36 37 bb1.i13: ; preds = %bb9.i.i6, %bb19, %bb19 38 br i1 undef, label %bb3.i17, label %bb2.i16 39 40 bb2.i16: ; preds = %bb1.i13 41 unreachable 42 43 bb3.i17: ; preds = %bb1.i13 44 br i1 undef, label %bb4.i18, label %bb23.i 45 46 bb4.i18: ; preds = %bb3.i17 47 %0 = mul nsw i32 %height, %width 48 %1 = and i32 %0, 7 49 %not..i = icmp ne i32 %1, 0 50 %2 = zext i1 %not..i to i32 51 %storemerge2.i = add i32 0, %2 52 %3 = call noalias i8* @malloc(i32 %storemerge2.i) nounwind 53 br i1 undef, label %bb3.i9, label %bb9.i 54 55 bb9.i: ; preds = %bb4.i18 56 br i1 undef, label %bb13.i19, label %bb.i24.i 57 58 bb13.i19: ; preds = %bb9.i 59 br i1 undef, label %bb14.i20, label %bb15.i 60 61 bb14.i20: ; preds = %bb13.i19 62 unreachable 63 64 bb15.i: ; preds = %bb13.i19 65 unreachable 66 67 bb.i24.i: ; preds = %bb.i24.i, %bb9.i 68 %storemerge1.i21.i = phi i32 [ %4, %bb.i24.i ], [ 0, %bb9.i ] 69 %4 = add i32 %storemerge1.i21.i, 1 70 %exitcond47.i = icmp eq i32 %4, %storemerge2.i 71 br i1 %exitcond47.i, label %bb22, label %bb.i24.i 72 73 bb23.i: ; preds = %bb3.i17 74 unreachable 75 76 bb3.i9: ; preds = %bb4.i18 77 unreachable 78 79 bb22: ; preds = %bb.i24.i, %bb5 80 br i1 undef, label %gl_error.exit, label %bb23 81 82 bb23: ; preds = %bb22 83 ret void 84 } 85