1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin10
3 declare noalias i8* @malloc(i32) nounwind
5 define internal void @gl_DrawPixels(i32 %width, i32 %height, i32 %format, i32 %type, i8* %pixels) nounwind {
7 br i1 undef, label %bb3.i, label %bb3
9 bb3.i: ; preds = %entry
12 gl_error.exit: ; preds = %bb22
16 br i1 false, label %bb5, label %bb4
21 bb5: ; preds = %bb4, %bb3
22 br i1 undef, label %bb19, label %bb22
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
31 bb9.i.i6: ; preds = %bb19
34 bb3.i6.i: ; preds = %bb19
37 bb1.i13: ; preds = %bb9.i.i6, %bb19, %bb19
38 br i1 undef, label %bb3.i17, label %bb2.i16
40 bb2.i16: ; preds = %bb1.i13
43 bb3.i17: ; preds = %bb1.i13
44 br i1 undef, label %bb4.i18, label %bb23.i
46 bb4.i18: ; preds = %bb3.i17
47 %0 = mul nsw i32 %height, %width
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
55 bb9.i: ; preds = %bb4.i18
56 br i1 undef, label %bb13.i19, label %bb.i24.i
58 bb13.i19: ; preds = %bb9.i
59 br i1 undef, label %bb14.i20, label %bb15.i
61 bb14.i20: ; preds = %bb13.i19
64 bb15.i: ; preds = %bb13.i19
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
73 bb23.i: ; preds = %bb3.i17
76 bb3.i9: ; preds = %bb4.i18
79 bb22: ; preds = %bb.i24.i, %bb5
80 br i1 undef, label %gl_error.exit, label %bb23