1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -slp-vectorizer -S -mtriple=x86_64-apple-macosx10.10.0 -mattr=+sse4.2 | FileCheck %s
8 ;int test1(unsigned int *p) {
11 ; for (int y = 0; y < 2; y++) {
12 ; // Inner loop gets unrolled
13 ; for (int x = 0; x < 8; x++) {
16 ; // Dummy call to keep outer loop alive
22 define i32 @test(i32* nocapture readonly %p) {
25 ; CHECK-NEXT: [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i64 1
26 ; CHECK-NEXT: [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 2
27 ; CHECK-NEXT: [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 3
28 ; CHECK-NEXT: [[ARRAYIDX_4:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
29 ; CHECK-NEXT: [[ARRAYIDX_5:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 5
30 ; CHECK-NEXT: [[ARRAYIDX_6:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 6
31 ; CHECK-NEXT: [[ARRAYIDX_7:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 7
32 ; CHECK-NEXT: br label [[FOR_BODY:%.*]]
34 ; CHECK-NEXT: [[SUM:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[OP_EXTRA:%.*]], [[FOR_BODY]] ]
35 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i32* [[P]] to <8 x i32>*
36 ; CHECK-NEXT: [[TMP1:%.*]] = load <8 x i32>, <8 x i32>* [[TMP0]], align 4
37 ; CHECK-NEXT: [[TMP2:%.*]] = mul <8 x i32> [[TMP1]], <i32 42, i32 42, i32 42, i32 42, i32 42, i32 42, i32 42, i32 42>
38 ; CHECK-NEXT: [[ADD:%.*]] = add i32 undef, [[SUM]]
39 ; CHECK-NEXT: [[ADD_1:%.*]] = add i32 undef, [[ADD]]
40 ; CHECK-NEXT: [[ADD_2:%.*]] = add i32 undef, [[ADD_1]]
41 ; CHECK-NEXT: [[ADD_3:%.*]] = add i32 undef, [[ADD_2]]
42 ; CHECK-NEXT: [[ADD_4:%.*]] = add i32 undef, [[ADD_3]]
43 ; CHECK-NEXT: [[ADD_5:%.*]] = add i32 undef, [[ADD_4]]
44 ; CHECK-NEXT: [[ADD_6:%.*]] = add i32 undef, [[ADD_5]]
45 ; CHECK-NEXT: [[RDX_SHUF:%.*]] = shufflevector <8 x i32> [[TMP2]], <8 x i32> undef, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef>
46 ; CHECK-NEXT: [[BIN_RDX:%.*]] = add <8 x i32> [[TMP2]], [[RDX_SHUF]]
47 ; CHECK-NEXT: [[RDX_SHUF1:%.*]] = shufflevector <8 x i32> [[BIN_RDX]], <8 x i32> undef, <8 x i32> <i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
48 ; CHECK-NEXT: [[BIN_RDX2:%.*]] = add <8 x i32> [[BIN_RDX]], [[RDX_SHUF1]]
49 ; CHECK-NEXT: [[RDX_SHUF3:%.*]] = shufflevector <8 x i32> [[BIN_RDX2]], <8 x i32> undef, <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
50 ; CHECK-NEXT: [[BIN_RDX4:%.*]] = add <8 x i32> [[BIN_RDX2]], [[RDX_SHUF3]]
51 ; CHECK-NEXT: [[TMP3:%.*]] = extractelement <8 x i32> [[BIN_RDX4]], i32 0
52 ; CHECK-NEXT: [[OP_EXTRA]] = add i32 [[TMP3]], [[SUM]]
53 ; CHECK-NEXT: [[ADD_7:%.*]] = add i32 undef, [[ADD_6]]
54 ; CHECK-NEXT: br i1 true, label [[FOR_END:%.*]], label [[FOR_BODY]]
56 ; CHECK-NEXT: ret i32 [[OP_EXTRA]]
59 %arrayidx.1 = getelementptr inbounds i32, i32* %p, i64 1
60 %arrayidx.2 = getelementptr inbounds i32, i32* %p, i64 2
61 %arrayidx.3 = getelementptr inbounds i32, i32* %p, i64 3
62 %arrayidx.4 = getelementptr inbounds i32, i32* %p, i64 4
63 %arrayidx.5 = getelementptr inbounds i32, i32* %p, i64 5
64 %arrayidx.6 = getelementptr inbounds i32, i32* %p, i64 6
65 %arrayidx.7 = getelementptr inbounds i32, i32* %p, i64 7
69 %sum = phi i32 [ 0, %entry ], [ %add.7, %for.body ]
70 %tmp = load i32, i32* %p, align 4
71 %mul = mul i32 %tmp, 42
72 %add = add i32 %mul, %sum
73 %tmp5 = load i32, i32* %arrayidx.1, align 4
74 %mul.1 = mul i32 %tmp5, 42
75 %add.1 = add i32 %mul.1, %add
76 %tmp6 = load i32, i32* %arrayidx.2, align 4
77 %mul.2 = mul i32 %tmp6, 42
78 %add.2 = add i32 %mul.2, %add.1
79 %tmp7 = load i32, i32* %arrayidx.3, align 4
80 %mul.3 = mul i32 %tmp7, 42
81 %add.3 = add i32 %mul.3, %add.2
82 %tmp8 = load i32, i32* %arrayidx.4, align 4
83 %mul.4 = mul i32 %tmp8, 42
84 %add.4 = add i32 %mul.4, %add.3
85 %tmp9 = load i32, i32* %arrayidx.5, align 4
86 %mul.5 = mul i32 %tmp9, 42
87 %add.5 = add i32 %mul.5, %add.4
88 %tmp10 = load i32, i32* %arrayidx.6, align 4
89 %mul.6 = mul i32 %tmp10, 42
90 %add.6 = add i32 %mul.6, %add.5
91 %tmp11 = load i32, i32* %arrayidx.7, align 4
92 %mul.7 = mul i32 %tmp11, 42
93 %add.7 = add i32 %mul.7, %add.6
94 br i1 true, label %for.end, label %for.body
102 ;int test2(unsigned int *p, unsigned int *q) {
105 ; for (int y = 0; y < 2; y++) {
106 ; // Inner loop gets unrolled
107 ; for (int x = 0; x < 8; x++) {
108 ; sum += p[x] * q[x];
110 ; // Dummy call to keep outer loop alive
116 define i32 @test2(i32* nocapture readonly %p, i32* nocapture readonly %q) {
117 ; CHECK-LABEL: @test2(
119 ; CHECK-NEXT: [[ARRAYIDX_P_1:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i64 1
120 ; CHECK-NEXT: [[ARRAYIDX_P_2:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 2
121 ; CHECK-NEXT: [[ARRAYIDX_P_3:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 3
122 ; CHECK-NEXT: [[ARRAYIDX_P_4:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
123 ; CHECK-NEXT: [[ARRAYIDX_P_5:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 5
124 ; CHECK-NEXT: [[ARRAYIDX_P_6:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 6
125 ; CHECK-NEXT: [[ARRAYIDX_P_7:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 7
126 ; CHECK-NEXT: [[ARRAYIDX_Q_1:%.*]] = getelementptr inbounds i32, i32* [[Q:%.*]], i64 1
127 ; CHECK-NEXT: [[ARRAYIDX_Q_2:%.*]] = getelementptr inbounds i32, i32* [[Q]], i64 2
128 ; CHECK-NEXT: [[ARRAYIDX_Q_3:%.*]] = getelementptr inbounds i32, i32* [[Q]], i64 3
129 ; CHECK-NEXT: [[ARRAYIDX_Q_4:%.*]] = getelementptr inbounds i32, i32* [[Q]], i64 4
130 ; CHECK-NEXT: [[ARRAYIDX_Q_5:%.*]] = getelementptr inbounds i32, i32* [[Q]], i64 5
131 ; CHECK-NEXT: [[ARRAYIDX_Q_6:%.*]] = getelementptr inbounds i32, i32* [[Q]], i64 6
132 ; CHECK-NEXT: [[ARRAYIDX_Q_7:%.*]] = getelementptr inbounds i32, i32* [[Q]], i64 7
133 ; CHECK-NEXT: br label [[FOR_BODY:%.*]]
135 ; CHECK-NEXT: [[SUM:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[OP_EXTRA:%.*]], [[FOR_BODY]] ]
136 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i32* [[P]] to <8 x i32>*
137 ; CHECK-NEXT: [[TMP1:%.*]] = load <8 x i32>, <8 x i32>* [[TMP0]], align 4
138 ; CHECK-NEXT: [[TMP2:%.*]] = bitcast i32* [[Q]] to <8 x i32>*
139 ; CHECK-NEXT: [[TMP3:%.*]] = load <8 x i32>, <8 x i32>* [[TMP2]], align 4
140 ; CHECK-NEXT: [[TMP4:%.*]] = mul <8 x i32> [[TMP1]], [[TMP3]]
141 ; CHECK-NEXT: [[ADD:%.*]] = add i32 undef, [[SUM]]
142 ; CHECK-NEXT: [[ADD_1:%.*]] = add i32 undef, [[ADD]]
143 ; CHECK-NEXT: [[ADD_2:%.*]] = add i32 undef, [[ADD_1]]
144 ; CHECK-NEXT: [[ADD_3:%.*]] = add i32 undef, [[ADD_2]]
145 ; CHECK-NEXT: [[ADD_4:%.*]] = add i32 undef, [[ADD_3]]
146 ; CHECK-NEXT: [[ADD_5:%.*]] = add i32 undef, [[ADD_4]]
147 ; CHECK-NEXT: [[ADD_6:%.*]] = add i32 undef, [[ADD_5]]
148 ; CHECK-NEXT: [[RDX_SHUF:%.*]] = shufflevector <8 x i32> [[TMP4]], <8 x i32> undef, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef>
149 ; CHECK-NEXT: [[BIN_RDX:%.*]] = add <8 x i32> [[TMP4]], [[RDX_SHUF]]
150 ; CHECK-NEXT: [[RDX_SHUF1:%.*]] = shufflevector <8 x i32> [[BIN_RDX]], <8 x i32> undef, <8 x i32> <i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
151 ; CHECK-NEXT: [[BIN_RDX2:%.*]] = add <8 x i32> [[BIN_RDX]], [[RDX_SHUF1]]
152 ; CHECK-NEXT: [[RDX_SHUF3:%.*]] = shufflevector <8 x i32> [[BIN_RDX2]], <8 x i32> undef, <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
153 ; CHECK-NEXT: [[BIN_RDX4:%.*]] = add <8 x i32> [[BIN_RDX2]], [[RDX_SHUF3]]
154 ; CHECK-NEXT: [[TMP5:%.*]] = extractelement <8 x i32> [[BIN_RDX4]], i32 0
155 ; CHECK-NEXT: [[OP_EXTRA]] = add i32 [[TMP5]], [[SUM]]
156 ; CHECK-NEXT: [[ADD_7:%.*]] = add i32 undef, [[ADD_6]]
157 ; CHECK-NEXT: br i1 true, label [[FOR_END:%.*]], label [[FOR_BODY]]
159 ; CHECK-NEXT: ret i32 [[OP_EXTRA]]
162 %arrayidx.p.1 = getelementptr inbounds i32, i32* %p, i64 1
163 %arrayidx.p.2 = getelementptr inbounds i32, i32* %p, i64 2
164 %arrayidx.p.3 = getelementptr inbounds i32, i32* %p, i64 3
165 %arrayidx.p.4 = getelementptr inbounds i32, i32* %p, i64 4
166 %arrayidx.p.5 = getelementptr inbounds i32, i32* %p, i64 5
167 %arrayidx.p.6 = getelementptr inbounds i32, i32* %p, i64 6
168 %arrayidx.p.7 = getelementptr inbounds i32, i32* %p, i64 7
170 %arrayidx.q.1 = getelementptr inbounds i32, i32* %q, i64 1
171 %arrayidx.q.2 = getelementptr inbounds i32, i32* %q, i64 2
172 %arrayidx.q.3 = getelementptr inbounds i32, i32* %q, i64 3
173 %arrayidx.q.4 = getelementptr inbounds i32, i32* %q, i64 4
174 %arrayidx.q.5 = getelementptr inbounds i32, i32* %q, i64 5
175 %arrayidx.q.6 = getelementptr inbounds i32, i32* %q, i64 6
176 %arrayidx.q.7 = getelementptr inbounds i32, i32* %q, i64 7
180 %sum = phi i32 [ 0, %entry ], [ %add.7, %for.body ]
181 %tmpp = load i32, i32* %p, align 4
182 %tmpq = load i32, i32* %q, align 4
183 %mul = mul i32 %tmpp, %tmpq
184 %add = add i32 %mul, %sum
185 %tmp5p = load i32, i32* %arrayidx.p.1, align 4
186 %tmp5q = load i32, i32* %arrayidx.q.1, align 4
187 %mul.1 = mul i32 %tmp5p, %tmp5q
188 %add.1 = add i32 %mul.1, %add
189 %tmp6p = load i32, i32* %arrayidx.p.2, align 4
190 %tmp6q = load i32, i32* %arrayidx.q.2, align 4
191 %mul.2 = mul i32 %tmp6p, %tmp6q
192 %add.2 = add i32 %mul.2, %add.1
193 %tmp7p = load i32, i32* %arrayidx.p.3, align 4
194 %tmp7q = load i32, i32* %arrayidx.q.3, align 4
195 %mul.3 = mul i32 %tmp7p, %tmp7q
196 %add.3 = add i32 %mul.3, %add.2
197 %tmp8p = load i32, i32* %arrayidx.p.4, align 4
198 %tmp8q = load i32, i32* %arrayidx.q.4, align 4
199 %mul.4 = mul i32 %tmp8p, %tmp8q
200 %add.4 = add i32 %mul.4, %add.3
201 %tmp9p = load i32, i32* %arrayidx.p.5, align 4
202 %tmp9q = load i32, i32* %arrayidx.q.5, align 4
203 %mul.5 = mul i32 %tmp9p, %tmp9q
204 %add.5 = add i32 %mul.5, %add.4
205 %tmp10p = load i32, i32* %arrayidx.p.6, align 4
206 %tmp10q = load i32, i32* %arrayidx.q.6, align 4
207 %mul.6 = mul i32 %tmp10p, %tmp10q
208 %add.6 = add i32 %mul.6, %add.5
209 %tmp11p = load i32, i32* %arrayidx.p.7, align 4
210 %tmp11q = load i32, i32* %arrayidx.q.7, align 4
211 %mul.7 = mul i32 %tmp11p, %tmp11q
212 %add.7 = add i32 %mul.7, %add.6
213 br i1 true, label %for.end, label %for.body
221 ;int test3(unsigned int *p, unsigned int *q) {
224 ; for (int y = 0; y < 2; y++) {
225 ; // Inner loop gets unrolled
226 ; for (int x = 0; x < 8; x++) {
227 ; sum += p[x] * q[7-x];
229 ; // Dummy call to keep outer loop alive
235 define i32 @test3(i32* nocapture readonly %p, i32* nocapture readonly %q) {
236 ; CHECK-LABEL: @test3(
238 ; CHECK-NEXT: [[ARRAYIDX_P_1:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i64 1
239 ; CHECK-NEXT: [[ARRAYIDX_P_2:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 2
240 ; CHECK-NEXT: [[ARRAYIDX_P_3:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 3
241 ; CHECK-NEXT: [[ARRAYIDX_P_4:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
242 ; CHECK-NEXT: [[ARRAYIDX_P_5:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 5
243 ; CHECK-NEXT: [[ARRAYIDX_P_6:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 6
244 ; CHECK-NEXT: [[ARRAYIDX_P_7:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 7
245 ; CHECK-NEXT: [[ARRAYIDX_Q_1:%.*]] = getelementptr inbounds i32, i32* [[Q:%.*]], i64 1
246 ; CHECK-NEXT: [[ARRAYIDX_Q_2:%.*]] = getelementptr inbounds i32, i32* [[Q]], i64 2
247 ; CHECK-NEXT: [[ARRAYIDX_Q_3:%.*]] = getelementptr inbounds i32, i32* [[Q]], i64 3
248 ; CHECK-NEXT: [[ARRAYIDX_Q_4:%.*]] = getelementptr inbounds i32, i32* [[Q]], i64 4
249 ; CHECK-NEXT: [[ARRAYIDX_Q_5:%.*]] = getelementptr inbounds i32, i32* [[Q]], i64 5
250 ; CHECK-NEXT: [[ARRAYIDX_Q_6:%.*]] = getelementptr inbounds i32, i32* [[Q]], i64 6
251 ; CHECK-NEXT: [[ARRAYIDX_Q_7:%.*]] = getelementptr inbounds i32, i32* [[Q]], i64 7
252 ; CHECK-NEXT: br label [[FOR_BODY:%.*]]
254 ; CHECK-NEXT: [[SUM:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[OP_EXTRA:%.*]], [[FOR_BODY]] ]
255 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i32* [[P]] to <8 x i32>*
256 ; CHECK-NEXT: [[TMP1:%.*]] = load <8 x i32>, <8 x i32>* [[TMP0]], align 4
257 ; CHECK-NEXT: [[REORDER_SHUFFLE:%.*]] = shufflevector <8 x i32> [[TMP1]], <8 x i32> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
258 ; CHECK-NEXT: [[TMP2:%.*]] = bitcast i32* [[Q]] to <8 x i32>*
259 ; CHECK-NEXT: [[TMP3:%.*]] = load <8 x i32>, <8 x i32>* [[TMP2]], align 4
260 ; CHECK-NEXT: [[TMP4:%.*]] = mul <8 x i32> [[REORDER_SHUFFLE]], [[TMP3]]
261 ; CHECK-NEXT: [[ADD:%.*]] = add i32 undef, [[SUM]]
262 ; CHECK-NEXT: [[ADD_1:%.*]] = add i32 undef, [[ADD]]
263 ; CHECK-NEXT: [[ADD_2:%.*]] = add i32 undef, [[ADD_1]]
264 ; CHECK-NEXT: [[ADD_3:%.*]] = add i32 undef, [[ADD_2]]
265 ; CHECK-NEXT: [[ADD_4:%.*]] = add i32 undef, [[ADD_3]]
266 ; CHECK-NEXT: [[ADD_5:%.*]] = add i32 undef, [[ADD_4]]
267 ; CHECK-NEXT: [[ADD_6:%.*]] = add i32 undef, [[ADD_5]]
268 ; CHECK-NEXT: [[RDX_SHUF:%.*]] = shufflevector <8 x i32> [[TMP4]], <8 x i32> undef, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef>
269 ; CHECK-NEXT: [[BIN_RDX:%.*]] = add <8 x i32> [[TMP4]], [[RDX_SHUF]]
270 ; CHECK-NEXT: [[RDX_SHUF1:%.*]] = shufflevector <8 x i32> [[BIN_RDX]], <8 x i32> undef, <8 x i32> <i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
271 ; CHECK-NEXT: [[BIN_RDX2:%.*]] = add <8 x i32> [[BIN_RDX]], [[RDX_SHUF1]]
272 ; CHECK-NEXT: [[RDX_SHUF3:%.*]] = shufflevector <8 x i32> [[BIN_RDX2]], <8 x i32> undef, <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
273 ; CHECK-NEXT: [[BIN_RDX4:%.*]] = add <8 x i32> [[BIN_RDX2]], [[RDX_SHUF3]]
274 ; CHECK-NEXT: [[TMP5:%.*]] = extractelement <8 x i32> [[BIN_RDX4]], i32 0
275 ; CHECK-NEXT: [[OP_EXTRA]] = add i32 [[TMP5]], [[SUM]]
276 ; CHECK-NEXT: [[ADD_7:%.*]] = add i32 undef, [[ADD_6]]
277 ; CHECK-NEXT: br i1 true, label [[FOR_END:%.*]], label [[FOR_BODY]]
279 ; CHECK-NEXT: ret i32 [[OP_EXTRA]]
282 %arrayidx.p.1 = getelementptr inbounds i32, i32* %p, i64 1
283 %arrayidx.p.2 = getelementptr inbounds i32, i32* %p, i64 2
284 %arrayidx.p.3 = getelementptr inbounds i32, i32* %p, i64 3
285 %arrayidx.p.4 = getelementptr inbounds i32, i32* %p, i64 4
286 %arrayidx.p.5 = getelementptr inbounds i32, i32* %p, i64 5
287 %arrayidx.p.6 = getelementptr inbounds i32, i32* %p, i64 6
288 %arrayidx.p.7 = getelementptr inbounds i32, i32* %p, i64 7
290 %arrayidx.q.1 = getelementptr inbounds i32, i32* %q, i64 1
291 %arrayidx.q.2 = getelementptr inbounds i32, i32* %q, i64 2
292 %arrayidx.q.3 = getelementptr inbounds i32, i32* %q, i64 3
293 %arrayidx.q.4 = getelementptr inbounds i32, i32* %q, i64 4
294 %arrayidx.q.5 = getelementptr inbounds i32, i32* %q, i64 5
295 %arrayidx.q.6 = getelementptr inbounds i32, i32* %q, i64 6
296 %arrayidx.q.7 = getelementptr inbounds i32, i32* %q, i64 7
300 %sum = phi i32 [ 0, %entry ], [ %add.7, %for.body ]
301 %tmpp = load i32, i32* %p, align 4
302 %tmpq = load i32, i32* %arrayidx.q.7, align 4
303 %mul = mul i32 %tmpp, %tmpq
304 %add = add i32 %mul, %sum
305 %tmp5p = load i32, i32* %arrayidx.p.1, align 4
306 %tmp5q = load i32, i32* %arrayidx.q.6, align 4
307 %mul.1 = mul i32 %tmp5p, %tmp5q
308 %add.1 = add i32 %mul.1, %add
309 %tmp6p = load i32, i32* %arrayidx.p.2, align 4
310 %tmp6q = load i32, i32* %arrayidx.q.5, align 4
311 %mul.2 = mul i32 %tmp6p, %tmp6q
312 %add.2 = add i32 %mul.2, %add.1
313 %tmp7p = load i32, i32* %arrayidx.p.3, align 4
314 %tmp7q = load i32, i32* %arrayidx.q.4, align 4
315 %mul.3 = mul i32 %tmp7p, %tmp7q
316 %add.3 = add i32 %mul.3, %add.2
317 %tmp8p = load i32, i32* %arrayidx.p.4, align 4
318 %tmp8q = load i32, i32* %arrayidx.q.3, align 4
319 %mul.4 = mul i32 %tmp8p, %tmp8q
320 %add.4 = add i32 %mul.4, %add.3
321 %tmp9p = load i32, i32* %arrayidx.p.5, align 4
322 %tmp9q = load i32, i32* %arrayidx.q.2, align 4
323 %mul.5 = mul i32 %tmp9p, %tmp9q
324 %add.5 = add i32 %mul.5, %add.4
325 %tmp10p = load i32, i32* %arrayidx.p.6, align 4
326 %tmp10q = load i32, i32* %arrayidx.q.1, align 4
327 %mul.6 = mul i32 %tmp10p, %tmp10q
328 %add.6 = add i32 %mul.6, %add.5
329 %tmp11p = load i32, i32* %arrayidx.p.7, align 4
330 %tmp11q = load i32, i32* %q, align 4
331 %mul.7 = mul i32 %tmp11p, %tmp11q
332 %add.7 = add i32 %mul.7, %add.6
333 br i1 true, label %for.end, label %for.body