1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=slp-vectorizer,dce,instcombine -slp-threshold=-7 -pass-remarks-output=%t < %s | FileCheck %s
3 ; RUN: cat %t | FileCheck -check-prefix=YAML %s
4 ; RUN: opt -S -passes='slp-vectorizer,dce,instcombine' -slp-threshold=-7 -pass-remarks-output=%t < %s | FileCheck %s
5 ; RUN: cat %t | FileCheck -check-prefix=YAML %s
8 target datalayout = "e-m:e-i32:64-i128:128-n32:64-S128"
9 target triple = "aarch64--linux-gnu"
11 ; These tests check that we remove from consideration pairs of seed
12 ; getelementptrs when they are known to have a constant difference. Such pairs
13 ; are likely not good candidates for vectorization since one can be computed
14 ; from the other. We use an unprofitable threshold to force vectorization.
16 ; int getelementptr(int *g, int n, int w, int x, int y, int z) {
18 ; for (int i = 0; i < n ; ++i) {
19 ; sum += g[2*i + w]; sum += g[2*i + x];
20 ; sum += g[2*i + y]; sum += g[2*i + z];
26 ; YAML-LABEL: Function: getelementptr_4x32
28 ; YAML-NEXT: Pass: slp-vectorizer
29 ; YAML-NEXT: Name: VectorizedList
30 ; YAML-NEXT: Function: getelementptr_4x32
32 ; YAML-NEXT: - String: 'SLP vectorized with cost '
33 ; YAML-NEXT: - Cost: '4'
34 ; YAML-NEXT: - String: ' and with tree size '
35 ; YAML-NEXT: - TreeSize: '3'
38 ; YAML-NEXT: Pass: slp-vectorizer
39 ; YAML-NEXT: Name: VectorizedList
40 ; YAML-NEXT: Function: getelementptr_4x32
42 ; YAML-NEXT: - String: 'SLP vectorized with cost '
43 ; YAML-NEXT: - Cost: '6'
44 ; YAML-NEXT: - String: ' and with tree size '
45 ; YAML-NEXT: - TreeSize: '3'
47 define i32 @getelementptr_4x32(ptr nocapture readonly %g, i32 %n, i32 %x, i32 %y, i32 %z) {
48 ; CHECK-LABEL: @getelementptr_4x32(
50 ; CHECK-NEXT: [[CMP31:%.*]] = icmp sgt i32 [[N:%.*]], 0
51 ; CHECK-NEXT: br i1 [[CMP31]], label [[FOR_BODY_PREHEADER:%.*]], label [[FOR_COND_CLEANUP:%.*]]
52 ; CHECK: for.body.preheader:
53 ; CHECK-NEXT: [[TMP0:%.*]] = insertelement <2 x i32> <i32 0, i32 poison>, i32 [[X:%.*]], i64 1
54 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x i32> poison, i32 [[Y:%.*]], i64 0
55 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x i32> [[TMP1]], i32 [[Z:%.*]], i64 1
56 ; CHECK-NEXT: br label [[FOR_BODY:%.*]]
57 ; CHECK: for.cond.cleanup.loopexit:
58 ; CHECK-NEXT: br label [[FOR_COND_CLEANUP]]
59 ; CHECK: for.cond.cleanup:
60 ; CHECK-NEXT: [[SUM_0_LCSSA:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[ADD16:%.*]], [[FOR_COND_CLEANUP_LOOPEXIT:%.*]] ]
61 ; CHECK-NEXT: ret i32 [[SUM_0_LCSSA]]
63 ; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i32 [ 0, [[FOR_BODY_PREHEADER]] ], [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY]] ]
64 ; CHECK-NEXT: [[SUM_032:%.*]] = phi i32 [ 0, [[FOR_BODY_PREHEADER]] ], [ [[ADD16]], [[FOR_BODY]] ]
65 ; CHECK-NEXT: [[T4:%.*]] = shl nuw nsw i32 [[INDVARS_IV]], 1
66 ; CHECK-NEXT: [[TMP3:%.*]] = insertelement <2 x i32> poison, i32 [[T4]], i64 0
67 ; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <2 x i32> [[TMP3]], <2 x i32> poison, <2 x i32> zeroinitializer
68 ; CHECK-NEXT: [[TMP5:%.*]] = add nsw <2 x i32> [[TMP4]], [[TMP0]]
69 ; CHECK-NEXT: [[TMP6:%.*]] = extractelement <2 x i32> [[TMP5]], i64 0
70 ; CHECK-NEXT: [[TMP7:%.*]] = zext nneg i32 [[TMP6]] to i64
71 ; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[G:%.*]], i64 [[TMP7]]
72 ; CHECK-NEXT: [[T6:%.*]] = load i32, ptr [[ARRAYIDX]], align 4
73 ; CHECK-NEXT: [[ADD1:%.*]] = add nsw i32 [[T6]], [[SUM_032]]
74 ; CHECK-NEXT: [[TMP8:%.*]] = extractelement <2 x i32> [[TMP5]], i64 1
75 ; CHECK-NEXT: [[TMP9:%.*]] = sext i32 [[TMP8]] to i64
76 ; CHECK-NEXT: [[ARRAYIDX5:%.*]] = getelementptr inbounds i32, ptr [[G]], i64 [[TMP9]]
77 ; CHECK-NEXT: [[T8:%.*]] = load i32, ptr [[ARRAYIDX5]], align 4
78 ; CHECK-NEXT: [[ADD6:%.*]] = add nsw i32 [[ADD1]], [[T8]]
79 ; CHECK-NEXT: [[TMP10:%.*]] = add nsw <2 x i32> [[TMP4]], [[TMP2]]
80 ; CHECK-NEXT: [[TMP11:%.*]] = extractelement <2 x i32> [[TMP10]], i64 0
81 ; CHECK-NEXT: [[TMP12:%.*]] = sext i32 [[TMP11]] to i64
82 ; CHECK-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds i32, ptr [[G]], i64 [[TMP12]]
83 ; CHECK-NEXT: [[T10:%.*]] = load i32, ptr [[ARRAYIDX10]], align 4
84 ; CHECK-NEXT: [[ADD11:%.*]] = add nsw i32 [[ADD6]], [[T10]]
85 ; CHECK-NEXT: [[TMP13:%.*]] = extractelement <2 x i32> [[TMP10]], i64 1
86 ; CHECK-NEXT: [[TMP14:%.*]] = sext i32 [[TMP13]] to i64
87 ; CHECK-NEXT: [[ARRAYIDX15:%.*]] = getelementptr inbounds i32, ptr [[G]], i64 [[TMP14]]
88 ; CHECK-NEXT: [[T12:%.*]] = load i32, ptr [[ARRAYIDX15]], align 4
89 ; CHECK-NEXT: [[ADD16]] = add nsw i32 [[ADD11]], [[T12]]
90 ; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i32 [[INDVARS_IV]], 1
91 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i32 [[INDVARS_IV_NEXT]], [[N]]
92 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_COND_CLEANUP_LOOPEXIT]], label [[FOR_BODY]]
95 %cmp31 = icmp sgt i32 %n, 0
96 br i1 %cmp31, label %for.body.preheader, label %for.cond.cleanup
101 for.cond.cleanup.loopexit:
102 br label %for.cond.cleanup
105 %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add16, %for.cond.cleanup.loopexit ]
109 %indvars.iv = phi i32 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
110 %sum.032 = phi i32 [ 0, %for.body.preheader ], [ %add16, %for.body ]
111 %t4 = shl nsw i32 %indvars.iv, 1
112 %t5 = add nsw i32 %t4, 0
113 %arrayidx = getelementptr inbounds i32, ptr %g, i32 %t5
114 %t6 = load i32, ptr %arrayidx, align 4
115 %add1 = add nsw i32 %t6, %sum.032
116 %t7 = add nsw i32 %t4, %x
117 %arrayidx5 = getelementptr inbounds i32, ptr %g, i32 %t7
118 %t8 = load i32, ptr %arrayidx5, align 4
119 %add6 = add nsw i32 %add1, %t8
120 %t9 = add nsw i32 %t4, %y
121 %arrayidx10 = getelementptr inbounds i32, ptr %g, i32 %t9
122 %t10 = load i32, ptr %arrayidx10, align 4
123 %add11 = add nsw i32 %add6, %t10
124 %t11 = add nsw i32 %t4, %z
125 %arrayidx15 = getelementptr inbounds i32, ptr %g, i32 %t11
126 %t12 = load i32, ptr %arrayidx15, align 4
127 %add16 = add nsw i32 %add11, %t12
128 %indvars.iv.next = add nuw nsw i32 %indvars.iv, 1
129 %exitcond = icmp eq i32 %indvars.iv.next , %n
130 br i1 %exitcond, label %for.cond.cleanup.loopexit, label %for.body
133 ; YAML-LABEL: Function: getelementptr_2x32
135 ; YAML-NEXT: Pass: slp-vectorizer
136 ; YAML-NEXT: Name: VectorizedList
137 ; YAML-NEXT: Function: getelementptr_2x32
139 ; YAML-NEXT: - String: 'SLP vectorized with cost '
140 ; YAML-NEXT: - Cost: '6'
141 ; YAML-NEXT: - String: ' and with tree size '
142 ; YAML-NEXT: - TreeSize: '3'
144 define i32 @getelementptr_2x32(ptr nocapture readonly %g, i32 %n, i32 %x, i32 %y, i32 %z) {
145 ; CHECK-LABEL: @getelementptr_2x32(
147 ; CHECK-NEXT: [[CMP31:%.*]] = icmp sgt i32 [[N:%.*]], 0
148 ; CHECK-NEXT: br i1 [[CMP31]], label [[FOR_BODY_PREHEADER:%.*]], label [[FOR_COND_CLEANUP:%.*]]
149 ; CHECK: for.body.preheader:
150 ; CHECK-NEXT: [[TMP0:%.*]] = insertelement <2 x i32> poison, i32 [[Y:%.*]], i64 0
151 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x i32> [[TMP0]], i32 [[Z:%.*]], i64 1
152 ; CHECK-NEXT: br label [[FOR_BODY:%.*]]
153 ; CHECK: for.cond.cleanup.loopexit:
154 ; CHECK-NEXT: br label [[FOR_COND_CLEANUP]]
155 ; CHECK: for.cond.cleanup:
156 ; CHECK-NEXT: [[SUM_0_LCSSA:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[ADD16:%.*]], [[FOR_COND_CLEANUP_LOOPEXIT:%.*]] ]
157 ; CHECK-NEXT: ret i32 [[SUM_0_LCSSA]]
159 ; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i32 [ 0, [[FOR_BODY_PREHEADER]] ], [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY]] ]
160 ; CHECK-NEXT: [[SUM_032:%.*]] = phi i32 [ 0, [[FOR_BODY_PREHEADER]] ], [ [[ADD16]], [[FOR_BODY]] ]
161 ; CHECK-NEXT: [[T4:%.*]] = shl nuw nsw i32 [[INDVARS_IV]], 1
162 ; CHECK-NEXT: [[TMP2:%.*]] = zext nneg i32 [[T4]] to i64
163 ; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[G:%.*]], i64 [[TMP2]]
164 ; CHECK-NEXT: [[T6:%.*]] = load i32, ptr [[ARRAYIDX]], align 4
165 ; CHECK-NEXT: [[ADD1:%.*]] = add nsw i32 [[T6]], [[SUM_032]]
166 ; CHECK-NEXT: [[T7:%.*]] = or disjoint i32 [[T4]], 1
167 ; CHECK-NEXT: [[TMP3:%.*]] = zext nneg i32 [[T7]] to i64
168 ; CHECK-NEXT: [[ARRAYIDX5:%.*]] = getelementptr inbounds i32, ptr [[G]], i64 [[TMP3]]
169 ; CHECK-NEXT: [[T8:%.*]] = load i32, ptr [[ARRAYIDX5]], align 4
170 ; CHECK-NEXT: [[ADD6:%.*]] = add nsw i32 [[ADD1]], [[T8]]
171 ; CHECK-NEXT: [[TMP4:%.*]] = insertelement <2 x i32> poison, i32 [[T4]], i64 0
172 ; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <2 x i32> [[TMP4]], <2 x i32> poison, <2 x i32> zeroinitializer
173 ; CHECK-NEXT: [[TMP6:%.*]] = add nsw <2 x i32> [[TMP5]], [[TMP1]]
174 ; CHECK-NEXT: [[TMP7:%.*]] = extractelement <2 x i32> [[TMP6]], i64 0
175 ; CHECK-NEXT: [[TMP8:%.*]] = sext i32 [[TMP7]] to i64
176 ; CHECK-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds i32, ptr [[G]], i64 [[TMP8]]
177 ; CHECK-NEXT: [[T10:%.*]] = load i32, ptr [[ARRAYIDX10]], align 4
178 ; CHECK-NEXT: [[ADD11:%.*]] = add nsw i32 [[ADD6]], [[T10]]
179 ; CHECK-NEXT: [[TMP9:%.*]] = extractelement <2 x i32> [[TMP6]], i64 1
180 ; CHECK-NEXT: [[TMP10:%.*]] = sext i32 [[TMP9]] to i64
181 ; CHECK-NEXT: [[ARRAYIDX15:%.*]] = getelementptr inbounds i32, ptr [[G]], i64 [[TMP10]]
182 ; CHECK-NEXT: [[T12:%.*]] = load i32, ptr [[ARRAYIDX15]], align 4
183 ; CHECK-NEXT: [[ADD16]] = add nsw i32 [[ADD11]], [[T12]]
184 ; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i32 [[INDVARS_IV]], 1
185 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i32 [[INDVARS_IV_NEXT]], [[N]]
186 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_COND_CLEANUP_LOOPEXIT]], label [[FOR_BODY]]
189 %cmp31 = icmp sgt i32 %n, 0
190 br i1 %cmp31, label %for.body.preheader, label %for.cond.cleanup
195 for.cond.cleanup.loopexit:
196 br label %for.cond.cleanup
199 %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add16, %for.cond.cleanup.loopexit ]
203 %indvars.iv = phi i32 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
204 %sum.032 = phi i32 [ 0, %for.body.preheader ], [ %add16, %for.body ]
205 %t4 = shl nsw i32 %indvars.iv, 1
206 %t5 = add nsw i32 %t4, 0
207 %arrayidx = getelementptr inbounds i32, ptr %g, i32 %t5
208 %t6 = load i32, ptr %arrayidx, align 4
209 %add1 = add nsw i32 %t6, %sum.032
210 %t7 = add nsw i32 %t4, 1
211 %arrayidx5 = getelementptr inbounds i32, ptr %g, i32 %t7
212 %t8 = load i32, ptr %arrayidx5, align 4
213 %add6 = add nsw i32 %add1, %t8
214 %t9 = add nsw i32 %t4, %y
215 %arrayidx10 = getelementptr inbounds i32, ptr %g, i32 %t9
216 %t10 = load i32, ptr %arrayidx10, align 4
217 %add11 = add nsw i32 %add6, %t10
218 %t11 = add nsw i32 %t4, %z
219 %arrayidx15 = getelementptr inbounds i32, ptr %g, i32 %t11
220 %t12 = load i32, ptr %arrayidx15, align 4
221 %add16 = add nsw i32 %add11, %t12
222 %indvars.iv.next = add nuw nsw i32 %indvars.iv, 1
223 %exitcond = icmp eq i32 %indvars.iv.next , %n
224 br i1 %exitcond, label %for.cond.cleanup.loopexit, label %for.body
227 @global = internal global { ptr } zeroinitializer, align 8
229 ; Make sure we vectorize to maximize the load with when loading i16 and
230 ; extending it for compute operations.
231 define void @test_i16_extend(ptr %p.1, ptr %p.2, i32 %idx.i32) {
232 ; CHECK-LABEL: @test_i16_extend(
233 ; CHECK-NEXT: [[P_0:%.*]] = load ptr, ptr @global, align 8
234 ; CHECK-NEXT: [[IDX_0:%.*]] = zext i32 [[IDX_I32:%.*]] to i64
235 ; CHECK-NEXT: [[T53:%.*]] = getelementptr inbounds i16, ptr [[P_1:%.*]], i64 [[IDX_0]]
236 ; CHECK-NEXT: [[T56:%.*]] = getelementptr inbounds i16, ptr [[P_2:%.*]], i64 [[IDX_0]]
237 ; CHECK-NEXT: [[TMP1:%.*]] = load <8 x i16>, ptr [[T53]], align 2
238 ; CHECK-NEXT: [[TMP2:%.*]] = zext <8 x i16> [[TMP1]] to <8 x i32>
239 ; CHECK-NEXT: [[TMP3:%.*]] = load <8 x i16>, ptr [[T56]], align 2
240 ; CHECK-NEXT: [[TMP4:%.*]] = zext <8 x i16> [[TMP3]] to <8 x i32>
241 ; CHECK-NEXT: [[TMP5:%.*]] = sub nsw <8 x i32> [[TMP2]], [[TMP4]]
242 ; CHECK-NEXT: [[TMP6:%.*]] = extractelement <8 x i32> [[TMP5]], i64 0
243 ; CHECK-NEXT: [[TMP7:%.*]] = sext i32 [[TMP6]] to i64
244 ; CHECK-NEXT: [[T60:%.*]] = getelementptr inbounds i32, ptr [[P_0]], i64 [[TMP7]]
245 ; CHECK-NEXT: [[L_1:%.*]] = load i32, ptr [[T60]], align 4
246 ; CHECK-NEXT: [[TMP8:%.*]] = extractelement <8 x i32> [[TMP5]], i64 1
247 ; CHECK-NEXT: [[TMP9:%.*]] = sext i32 [[TMP8]] to i64
248 ; CHECK-NEXT: [[T71:%.*]] = getelementptr inbounds i32, ptr [[P_0]], i64 [[TMP9]]
249 ; CHECK-NEXT: [[L_2:%.*]] = load i32, ptr [[T71]], align 4
250 ; CHECK-NEXT: [[TMP10:%.*]] = extractelement <8 x i32> [[TMP5]], i64 2
251 ; CHECK-NEXT: [[TMP11:%.*]] = sext i32 [[TMP10]] to i64
252 ; CHECK-NEXT: [[T82:%.*]] = getelementptr inbounds i32, ptr [[P_0]], i64 [[TMP11]]
253 ; CHECK-NEXT: [[L_3:%.*]] = load i32, ptr [[T82]], align 4
254 ; CHECK-NEXT: [[TMP12:%.*]] = extractelement <8 x i32> [[TMP5]], i64 3
255 ; CHECK-NEXT: [[TMP13:%.*]] = sext i32 [[TMP12]] to i64
256 ; CHECK-NEXT: [[T93:%.*]] = getelementptr inbounds i32, ptr [[P_0]], i64 [[TMP13]]
257 ; CHECK-NEXT: [[L_4:%.*]] = load i32, ptr [[T93]], align 4
258 ; CHECK-NEXT: [[TMP14:%.*]] = extractelement <8 x i32> [[TMP5]], i64 4
259 ; CHECK-NEXT: [[TMP15:%.*]] = sext i32 [[TMP14]] to i64
260 ; CHECK-NEXT: [[T104:%.*]] = getelementptr inbounds i32, ptr [[P_0]], i64 [[TMP15]]
261 ; CHECK-NEXT: [[L_5:%.*]] = load i32, ptr [[T104]], align 4
262 ; CHECK-NEXT: [[TMP16:%.*]] = extractelement <8 x i32> [[TMP5]], i64 5
263 ; CHECK-NEXT: [[TMP17:%.*]] = sext i32 [[TMP16]] to i64
264 ; CHECK-NEXT: [[T115:%.*]] = getelementptr inbounds i32, ptr [[P_0]], i64 [[TMP17]]
265 ; CHECK-NEXT: [[L_6:%.*]] = load i32, ptr [[T115]], align 4
266 ; CHECK-NEXT: [[TMP18:%.*]] = extractelement <8 x i32> [[TMP5]], i64 6
267 ; CHECK-NEXT: [[TMP19:%.*]] = sext i32 [[TMP18]] to i64
268 ; CHECK-NEXT: [[T126:%.*]] = getelementptr inbounds i32, ptr [[P_0]], i64 [[TMP19]]
269 ; CHECK-NEXT: [[L_7:%.*]] = load i32, ptr [[T126]], align 4
270 ; CHECK-NEXT: [[TMP20:%.*]] = extractelement <8 x i32> [[TMP5]], i64 7
271 ; CHECK-NEXT: [[TMP21:%.*]] = sext i32 [[TMP20]] to i64
272 ; CHECK-NEXT: [[T137:%.*]] = getelementptr inbounds i32, ptr [[P_0]], i64 [[TMP21]]
273 ; CHECK-NEXT: [[L_8:%.*]] = load i32, ptr [[T137]], align 4
274 ; CHECK-NEXT: call void @use(i32 [[L_1]], i32 [[L_2]], i32 [[L_3]], i32 [[L_4]], i32 [[L_5]], i32 [[L_6]], i32 [[L_7]], i32 [[L_8]])
275 ; CHECK-NEXT: ret void
277 %p.0 = load ptr, ptr @global, align 8
279 %idx.0 = zext i32 %idx.i32 to i64
280 %idx.1 = add nsw i64 %idx.0, 1
281 %idx.2 = add nsw i64 %idx.0, 2
282 %idx.3 = add nsw i64 %idx.0, 3
283 %idx.4 = add nsw i64 %idx.0, 4
284 %idx.5 = add nsw i64 %idx.0, 5
285 %idx.6 = add nsw i64 %idx.0, 6
286 %idx.7 = add nsw i64 %idx.0, 7
288 %t53 = getelementptr inbounds i16, ptr %p.1, i64 %idx.0
289 %op1.l = load i16, ptr %t53, align 2
290 %op1.ext = zext i16 %op1.l to i64
291 %t56 = getelementptr inbounds i16, ptr %p.2, i64 %idx.0
292 %op2.l = load i16, ptr %t56, align 2
293 %op2.ext = zext i16 %op2.l to i64
294 %sub.1 = sub nsw i64 %op1.ext, %op2.ext
296 %t60 = getelementptr inbounds i32, ptr %p.0, i64 %sub.1
297 %l.1 = load i32, ptr %t60, align 4
299 %t64 = getelementptr inbounds i16, ptr %p.1, i64 %idx.1
300 %t65 = load i16, ptr %t64, align 2
301 %t66 = zext i16 %t65 to i64
302 %t67 = getelementptr inbounds i16, ptr %p.2, i64 %idx.1
303 %t68 = load i16, ptr %t67, align 2
304 %t69 = zext i16 %t68 to i64
305 %sub.2 = sub nsw i64 %t66, %t69
307 %t71 = getelementptr inbounds i32, ptr %p.0, i64 %sub.2
308 %l.2 = load i32, ptr %t71, align 4
310 %t75 = getelementptr inbounds i16, ptr %p.1, i64 %idx.2
311 %t76 = load i16, ptr %t75, align 2
312 %t77 = zext i16 %t76 to i64
313 %t78 = getelementptr inbounds i16, ptr %p.2, i64 %idx.2
314 %t79 = load i16, ptr %t78, align 2
315 %t80 = zext i16 %t79 to i64
316 %sub.3 = sub nsw i64 %t77, %t80
318 %t82 = getelementptr inbounds i32, ptr %p.0, i64 %sub.3
319 %l.3 = load i32, ptr %t82, align 4
321 %t86 = getelementptr inbounds i16, ptr %p.1, i64 %idx.3
322 %t87 = load i16, ptr %t86, align 2
323 %t88 = zext i16 %t87 to i64
324 %t89 = getelementptr inbounds i16, ptr %p.2, i64 %idx.3
325 %t90 = load i16, ptr %t89, align 2
326 %t91 = zext i16 %t90 to i64
327 %sub.4 = sub nsw i64 %t88, %t91
329 %t93 = getelementptr inbounds i32, ptr %p.0, i64 %sub.4
330 %l.4 = load i32, ptr %t93, align 4
332 %t97 = getelementptr inbounds i16, ptr %p.1, i64 %idx.4
333 %t98 = load i16, ptr %t97, align 2
334 %t99 = zext i16 %t98 to i64
335 %t100 = getelementptr inbounds i16, ptr %p.2, i64 %idx.4
336 %t101 = load i16, ptr %t100, align 2
337 %t102 = zext i16 %t101 to i64
338 %sub.5 = sub nsw i64 %t99, %t102
340 %t104 = getelementptr inbounds i32, ptr %p.0, i64 %sub.5
341 %l.5 = load i32, ptr %t104, align 4
343 %t108 = getelementptr inbounds i16, ptr %p.1, i64 %idx.5
344 %t109 = load i16, ptr %t108, align 2
345 %t110 = zext i16 %t109 to i64
346 %t111 = getelementptr inbounds i16, ptr %p.2, i64 %idx.5
347 %t112 = load i16, ptr %t111, align 2
348 %t113 = zext i16 %t112 to i64
349 %sub.6 = sub nsw i64 %t110, %t113
351 %t115 = getelementptr inbounds i32, ptr %p.0, i64 %sub.6
352 %l.6 = load i32, ptr %t115, align 4
354 %t119 = getelementptr inbounds i16, ptr %p.1, i64 %idx.6
355 %t120 = load i16, ptr %t119, align 2
356 %t121 = zext i16 %t120 to i64
357 %t122 = getelementptr inbounds i16, ptr %p.2, i64 %idx.6
358 %t123 = load i16, ptr %t122, align 2
359 %t124 = zext i16 %t123 to i64
360 %sub.7 = sub nsw i64 %t121, %t124
362 %t126 = getelementptr inbounds i32, ptr %p.0, i64 %sub.7
363 %l.7 = load i32, ptr %t126, align 4
365 %t130 = getelementptr inbounds i16, ptr %p.1, i64 %idx.7
366 %t131 = load i16, ptr %t130, align 2
367 %t132 = zext i16 %t131 to i64
368 %t133 = getelementptr inbounds i16, ptr %p.2, i64 %idx.7
369 %t134 = load i16, ptr %t133, align 2
370 %t135 = zext i16 %t134 to i64
371 %sub.8 = sub nsw i64 %t132, %t135
373 %t137 = getelementptr inbounds i32, ptr %p.0, i64 %sub.8
374 %l.8 = load i32, ptr %t137, align 4
376 call void @use(i32 %l.1, i32 %l.2, i32 %l.3, i32 %l.4, i32 %l.5, i32 %l.6, i32 %l.7, i32 %l.8)
380 declare void @use(i32, i32, i32, i32, i32, i32, i32, i32)