1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -break-anti-dependencies=none | FileCheck %s
3 %struct.pix_pos = type { i32, i32, i32, i32, i32, i32 }
5 @getNeighbour = external global void (i32, i32, i32, i32, %struct.pix_pos*)*, align 4 ; <void (i32, i32, i32, i32, %struct.pix_pos*)**> [#uses=2]
7 define arm_apcscc void @t() nounwind {
14 %pix_a.i294 = alloca [4 x %struct.pix_pos], align 4 ; <[4 x %struct.pix_pos]*> [#uses=2]
15 br i1 undef, label %land.rhs, label %lor.end
17 land.rhs: ; preds = %entry
20 lor.end: ; preds = %land.rhs, %entry
21 switch i32 0, label %if.end371 [
22 i32 10, label %if.then366
23 i32 14, label %if.then366
26 if.then366: ; preds = %lor.end, %lor.end
29 if.end371: ; preds = %lor.end
30 %arrayidx56.2.i = getelementptr [4 x %struct.pix_pos]* %pix_a.i294, i32 0, i32 2 ; <%struct.pix_pos*> [#uses=1]
31 %arrayidx56.3.i = getelementptr [4 x %struct.pix_pos]* %pix_a.i294, i32 0, i32 3 ; <%struct.pix_pos*> [#uses=1]
32 br i1 undef, label %for.body1857, label %for.end4557
34 for.body1857: ; preds = %if.end371
35 br i1 undef, label %if.then1867, label %for.cond1933
37 if.then1867: ; preds = %for.body1857
40 for.cond1933: ; preds = %for.body1857
41 br i1 undef, label %for.body1940, label %if.then4493
43 for.body1940: ; preds = %for.cond1933
44 %shl = shl i32 undef, 2 ; <i32> [#uses=1]
45 %shl1959 = shl i32 undef, 2 ; <i32> [#uses=4]
46 br i1 undef, label %if.then1992, label %if.else2003
48 if.then1992: ; preds = %for.body1940
49 %tmp14.i302 = load i32* undef ; <i32> [#uses=4]
50 %add.i307452 = or i32 %shl1959, 1 ; <i32> [#uses=1]
51 %sub.i308 = add i32 %shl, -1 ; <i32> [#uses=4]
52 call arm_apcscc void undef(i32 %tmp14.i302, i32 %sub.i308, i32 %shl1959, i32 0, %struct.pix_pos* undef) nounwind
53 %tmp49.i309 = load void (i32, i32, i32, i32, %struct.pix_pos*)** @getNeighbour ; <void (i32, i32, i32, i32, %struct.pix_pos*)*> [#uses=1]
54 call arm_apcscc void %tmp49.i309(i32 %tmp14.i302, i32 %sub.i308, i32 %add.i307452, i32 0, %struct.pix_pos* null) nounwind
55 %tmp49.1.i = load void (i32, i32, i32, i32, %struct.pix_pos*)** @getNeighbour ; <void (i32, i32, i32, i32, %struct.pix_pos*)*> [#uses=1]
56 call arm_apcscc void %tmp49.1.i(i32 %tmp14.i302, i32 %sub.i308, i32 undef, i32 0, %struct.pix_pos* %arrayidx56.2.i) nounwind
57 call arm_apcscc void undef(i32 %tmp14.i302, i32 %sub.i308, i32 undef, i32 0, %struct.pix_pos* %arrayidx56.3.i) nounwind
60 if.else2003: ; preds = %for.body1940
61 switch i32 undef, label %if.then2015 [
62 i32 10, label %if.then4382
63 i32 14, label %if.then4382
66 if.then2015: ; preds = %if.else2003
67 br i1 undef, label %if.else2298, label %if.then2019
69 if.then2019: ; preds = %if.then2015
70 br i1 undef, label %if.then2065, label %if.else2081
72 if.then2065: ; preds = %if.then2019
75 if.else2081: ; preds = %if.then2019
78 if.end2128: ; preds = %if.else2081, %if.then2065
81 if.else2298: ; preds = %if.then2015
82 br i1 undef, label %land.lhs.true2813, label %cond.end2841
84 land.lhs.true2813: ; preds = %if.else2298
85 br i1 undef, label %cond.end2841, label %cond.true2824
87 cond.true2824: ; preds = %land.lhs.true2813
88 br label %cond.end2841
90 cond.end2841: ; preds = %cond.true2824, %land.lhs.true2813, %if.else2298
91 br i1 undef, label %for.cond2882.preheader, label %for.cond2940.preheader
93 for.cond2882.preheader: ; preds = %cond.end2841
94 %mul3693 = shl i32 undef, 1 ; <i32> [#uses=2]
95 br i1 undef, label %if.then3689, label %if.else3728
97 for.cond2940.preheader: ; preds = %cond.end2841
100 for.inc3040: ; preds = %for.inc3040, %for.cond2940.preheader
101 br label %for.inc3040
103 if.then3689: ; preds = %for.cond2882.preheader
104 %add3695 = add nsw i32 %mul3693, %shl1959 ; <i32> [#uses=1]
105 %mul3697 = shl i32 %add3695, 2 ; <i32> [#uses=2]
106 %arrayidx3705 = getelementptr inbounds i16* undef, i32 1 ; <i16*> [#uses=1]
107 %tmp3706 = load i16* %arrayidx3705 ; <i16> [#uses=1]
108 %conv3707 = sext i16 %tmp3706 to i32 ; <i32> [#uses=1]
109 %add3708 = add nsw i32 %conv3707, %mul3697 ; <i32> [#uses=1]
110 %arrayidx3724 = getelementptr inbounds i16* null, i32 1 ; <i16*> [#uses=1]
111 %tmp3725 = load i16* %arrayidx3724 ; <i16> [#uses=1]
112 %conv3726 = sext i16 %tmp3725 to i32 ; <i32> [#uses=1]
113 %add3727 = add nsw i32 %conv3726, %mul3697 ; <i32> [#uses=1]
116 if.else3728: ; preds = %for.cond2882.preheader
117 %mul3733 = add i32 %shl1959, 1073741816 ; <i32> [#uses=1]
118 %add3735 = add nsw i32 %mul3733, %mul3693 ; <i32> [#uses=1]
119 %mul3737 = shl i32 %add3735, 2 ; <i32> [#uses=2]
120 %tmp3746 = load i16* undef ; <i16> [#uses=1]
121 %conv3747 = sext i16 %tmp3746 to i32 ; <i32> [#uses=1]
122 %add3748 = add nsw i32 %conv3747, %mul3737 ; <i32> [#uses=1]
123 %arrayidx3765 = getelementptr inbounds i16* null, i32 1 ; <i16*> [#uses=1]
124 %tmp3766 = load i16* %arrayidx3765 ; <i16> [#uses=1]
125 %conv3767 = sext i16 %tmp3766 to i32 ; <i32> [#uses=1]
126 %add3768 = add nsw i32 %conv3767, %mul3737 ; <i32> [#uses=1]
129 if.end3770: ; preds = %if.else3728, %if.then3689
130 %vec2_y.1 = phi i32 [ %add3727, %if.then3689 ], [ %add3768, %if.else3728 ] ; <i32> [#uses=0]
131 %vec1_y.2 = phi i32 [ %add3708, %if.then3689 ], [ %add3748, %if.else3728 ] ; <i32> [#uses=0]
134 if.then4382: ; preds = %if.else2003, %if.else2003
135 switch i32 undef, label %if.then4394 [
136 i32 10, label %if.else4400
137 i32 14, label %if.else4400
140 if.then4394: ; preds = %if.then4382
143 if.else4400: ; preds = %if.then4382, %if.then4382
144 br label %for.cond4451.preheader
146 for.cond4451.preheader: ; preds = %for.cond4451.preheader, %if.else4400
147 br label %for.cond4451.preheader
149 if.then4493: ; preds = %for.cond1933
152 for.end4557: ; preds = %if.end371