1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=wasm32 -wasm-keep-registers %s -o - | FileCheck %s
4 target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
6 define hidden void @one_dim(ptr nocapture noundef readonly %arg, ptr nocapture noundef readonly %arg1, ptr nocapture noundef writeonly %arg2) {
7 ; CHECK-LABEL: one_dim:
8 ; CHECK: .functype one_dim (i32, i32, i32) -> ()
9 ; CHECK-NEXT: .local i32, i32, i32
10 ; CHECK-NEXT: # %bb.0: # %bb
11 ; CHECK-NEXT: i32.const $push22=, 0
12 ; CHECK-NEXT: local.set 3, $pop22
13 ; CHECK-NEXT: .LBB0_1: # %bb4
14 ; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
15 ; CHECK-NEXT: loop # label0:
16 ; CHECK-NEXT: local.get $push27=, 2
17 ; CHECK-NEXT: local.get $push24=, 1
18 ; CHECK-NEXT: local.get $push23=, 3
19 ; CHECK-NEXT: i32.add $push21=, $pop24, $pop23
20 ; CHECK-NEXT: local.tee $push20=, 4, $pop21
21 ; CHECK-NEXT: i32.load16_s $push1=, 0($pop20)
22 ; CHECK-NEXT: local.get $push26=, 0
23 ; CHECK-NEXT: local.get $push25=, 3
24 ; CHECK-NEXT: i32.add $push19=, $pop26, $pop25
25 ; CHECK-NEXT: local.tee $push18=, 5, $pop19
26 ; CHECK-NEXT: i32.load16_s $push0=, 0($pop18)
27 ; CHECK-NEXT: i32.add $push2=, $pop1, $pop0
28 ; CHECK-NEXT: i32.store 0($pop27), $pop2
29 ; CHECK-NEXT: local.get $push28=, 2
30 ; CHECK-NEXT: i32.const $push17=, 4
31 ; CHECK-NEXT: i32.add $push8=, $pop28, $pop17
32 ; CHECK-NEXT: local.get $push29=, 4
33 ; CHECK-NEXT: i32.const $push16=, 2
34 ; CHECK-NEXT: i32.add $push5=, $pop29, $pop16
35 ; CHECK-NEXT: i32.load16_s $push6=, 0($pop5)
36 ; CHECK-NEXT: local.get $push30=, 5
37 ; CHECK-NEXT: i32.const $push15=, 2
38 ; CHECK-NEXT: i32.add $push3=, $pop30, $pop15
39 ; CHECK-NEXT: i32.load16_s $push4=, 0($pop3)
40 ; CHECK-NEXT: i32.add $push7=, $pop6, $pop4
41 ; CHECK-NEXT: i32.store 0($pop8), $pop7
42 ; CHECK-NEXT: local.get $push32=, 2
43 ; CHECK-NEXT: i32.const $push14=, 8
44 ; CHECK-NEXT: i32.add $push31=, $pop32, $pop14
45 ; CHECK-NEXT: local.set 2, $pop31
46 ; CHECK-NEXT: local.get $push33=, 3
47 ; CHECK-NEXT: i32.const $push13=, 4
48 ; CHECK-NEXT: i32.add $push12=, $pop33, $pop13
49 ; CHECK-NEXT: local.tee $push11=, 3, $pop12
50 ; CHECK-NEXT: i32.const $push10=, 20000
51 ; CHECK-NEXT: i32.ne $push9=, $pop11, $pop10
52 ; CHECK-NEXT: br_if 0, $pop9 # 0: up to label0
53 ; CHECK-NEXT: # %bb.2: # %bb3
54 ; CHECK-NEXT: end_loop
55 ; CHECK-NEXT: # fallthrough-return
62 bb4: ; preds = %bb4, %bb
63 %i = phi i32 [ 0, %bb ], [ %i22, %bb4 ]
64 %i5 = getelementptr inbounds i16, ptr %arg, i32 %i
65 %i6 = load i16, ptr %i5, align 2
66 %i7 = sext i16 %i6 to i32
67 %i8 = getelementptr inbounds i16, ptr %arg1, i32 %i
68 %i9 = load i16, ptr %i8, align 2
69 %i10 = sext i16 %i9 to i32
70 %i11 = add nsw i32 %i10, %i7
71 %i12 = getelementptr inbounds i32, ptr %arg2, i32 %i
72 store i32 %i11, ptr %i12, align 4
74 %i14 = getelementptr inbounds i16, ptr %arg, i32 %i13
75 %i15 = load i16, ptr %i14, align 2
76 %i16 = sext i16 %i15 to i32
77 %i17 = getelementptr inbounds i16, ptr %arg1, i32 %i13
78 %i18 = load i16, ptr %i17, align 2
79 %i19 = sext i16 %i18 to i32
80 %i20 = add nsw i32 %i19, %i16
81 %i21 = getelementptr inbounds i32, ptr %arg2, i32 %i13
82 store i32 %i20, ptr %i21, align 4
83 %i22 = add nuw nsw i32 %i, 2
84 %i23 = icmp eq i32 %i22, 10000
85 br i1 %i23, label %bb3, label %bb4
88 define hidden void @one_dim_no_inbound_loads(ptr nocapture noundef readonly %arg, ptr nocapture noundef readonly %arg1, ptr nocapture noundef writeonly %arg2) {
89 ; CHECK-LABEL: one_dim_no_inbound_loads:
90 ; CHECK: .functype one_dim_no_inbound_loads (i32, i32, i32) -> ()
91 ; CHECK-NEXT: .local i32, i32, i32
92 ; CHECK-NEXT: # %bb.0: # %bb
93 ; CHECK-NEXT: i32.const $push22=, 0
94 ; CHECK-NEXT: local.set 3, $pop22
95 ; CHECK-NEXT: .LBB1_1: # %bb4
96 ; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
97 ; CHECK-NEXT: loop # label1:
98 ; CHECK-NEXT: local.get $push27=, 2
99 ; CHECK-NEXT: local.get $push24=, 1
100 ; CHECK-NEXT: local.get $push23=, 3
101 ; CHECK-NEXT: i32.add $push21=, $pop24, $pop23
102 ; CHECK-NEXT: local.tee $push20=, 4, $pop21
103 ; CHECK-NEXT: i32.load16_s $push1=, 0($pop20)
104 ; CHECK-NEXT: local.get $push26=, 0
105 ; CHECK-NEXT: local.get $push25=, 3
106 ; CHECK-NEXT: i32.add $push19=, $pop26, $pop25
107 ; CHECK-NEXT: local.tee $push18=, 5, $pop19
108 ; CHECK-NEXT: i32.load16_s $push0=, 0($pop18)
109 ; CHECK-NEXT: i32.add $push2=, $pop1, $pop0
110 ; CHECK-NEXT: i32.store 0($pop27), $pop2
111 ; CHECK-NEXT: local.get $push28=, 2
112 ; CHECK-NEXT: i32.const $push17=, 4
113 ; CHECK-NEXT: i32.add $push8=, $pop28, $pop17
114 ; CHECK-NEXT: local.get $push29=, 4
115 ; CHECK-NEXT: i32.const $push16=, 2
116 ; CHECK-NEXT: i32.add $push5=, $pop29, $pop16
117 ; CHECK-NEXT: i32.load16_s $push6=, 0($pop5)
118 ; CHECK-NEXT: local.get $push30=, 5
119 ; CHECK-NEXT: i32.const $push15=, 2
120 ; CHECK-NEXT: i32.add $push3=, $pop30, $pop15
121 ; CHECK-NEXT: i32.load16_s $push4=, 0($pop3)
122 ; CHECK-NEXT: i32.add $push7=, $pop6, $pop4
123 ; CHECK-NEXT: i32.store 0($pop8), $pop7
124 ; CHECK-NEXT: local.get $push32=, 2
125 ; CHECK-NEXT: i32.const $push14=, 8
126 ; CHECK-NEXT: i32.add $push31=, $pop32, $pop14
127 ; CHECK-NEXT: local.set 2, $pop31
128 ; CHECK-NEXT: local.get $push33=, 3
129 ; CHECK-NEXT: i32.const $push13=, 4
130 ; CHECK-NEXT: i32.add $push12=, $pop33, $pop13
131 ; CHECK-NEXT: local.tee $push11=, 3, $pop12
132 ; CHECK-NEXT: i32.const $push10=, 20000
133 ; CHECK-NEXT: i32.ne $push9=, $pop11, $pop10
134 ; CHECK-NEXT: br_if 0, $pop9 # 0: up to label1
135 ; CHECK-NEXT: # %bb.2: # %bb3
136 ; CHECK-NEXT: end_loop
137 ; CHECK-NEXT: # fallthrough-return
144 bb4: ; preds = %bb4, %bb
145 %i = phi i32 [ 0, %bb ], [ %i22, %bb4 ]
146 %i5 = getelementptr i16, ptr %arg, i32 %i
147 %i6 = load i16, ptr %i5, align 2
148 %i7 = sext i16 %i6 to i32
149 %i8 = getelementptr i16, ptr %arg1, i32 %i
150 %i9 = load i16, ptr %i8, align 2
151 %i10 = sext i16 %i9 to i32
152 %i11 = add nsw i32 %i10, %i7
153 %i12 = getelementptr inbounds i32, ptr %arg2, i32 %i
154 store i32 %i11, ptr %i12, align 4
156 %i14 = getelementptr i16, ptr %arg, i32 %i13
157 %i15 = load i16, ptr %i14, align 2
158 %i16 = sext i16 %i15 to i32
159 %i17 = getelementptr i16, ptr %arg1, i32 %i13
160 %i18 = load i16, ptr %i17, align 2
161 %i19 = sext i16 %i18 to i32
162 %i20 = add nsw i32 %i19, %i16
163 %i21 = getelementptr inbounds i32, ptr %arg2, i32 %i13
164 store i32 %i20, ptr %i21, align 4
165 %i22 = add nuw nsw i32 %i, 2
166 %i23 = icmp eq i32 %i22, 10000
167 br i1 %i23, label %bb3, label %bb4
170 define hidden void @two_dims(ptr nocapture noundef readonly %arg, ptr nocapture noundef readonly %arg1, ptr nocapture noundef %arg2) {
171 ; CHECK-LABEL: two_dims:
172 ; CHECK: .functype two_dims (i32, i32, i32) -> ()
173 ; CHECK-NEXT: .local i32, i32, i32, i32, i32, i32, i32, i32
174 ; CHECK-NEXT: # %bb.0: # %bb
175 ; CHECK-NEXT: i32.const $push48=, 0
176 ; CHECK-NEXT: local.set 3, $pop48
177 ; CHECK-NEXT: .LBB2_1: # %bb3
178 ; CHECK-NEXT: # =>This Loop Header: Depth=1
179 ; CHECK-NEXT: # Child Loop BB2_2 Depth 2
180 ; CHECK-NEXT: loop # label2:
181 ; CHECK-NEXT: local.get $push50=, 2
182 ; CHECK-NEXT: local.get $push49=, 3
183 ; CHECK-NEXT: i32.const $push29=, 2
184 ; CHECK-NEXT: i32.shl $push28=, $pop49, $pop29
185 ; CHECK-NEXT: local.tee $push27=, 4, $pop28
186 ; CHECK-NEXT: i32.add $push26=, $pop50, $pop27
187 ; CHECK-NEXT: local.tee $push25=, 5, $pop26
188 ; CHECK-NEXT: i32.load $push51=, 0($pop25)
189 ; CHECK-NEXT: local.set 6, $pop51
190 ; CHECK-NEXT: local.get $push53=, 1
191 ; CHECK-NEXT: local.get $push52=, 4
192 ; CHECK-NEXT: i32.add $push0=, $pop53, $pop52
193 ; CHECK-NEXT: i32.load $push54=, 0($pop0)
194 ; CHECK-NEXT: local.set 7, $pop54
195 ; CHECK-NEXT: local.get $push56=, 0
196 ; CHECK-NEXT: local.get $push55=, 4
197 ; CHECK-NEXT: i32.add $push1=, $pop56, $pop55
198 ; CHECK-NEXT: i32.load $push57=, 0($pop1)
199 ; CHECK-NEXT: local.set 8, $pop57
200 ; CHECK-NEXT: i32.const $push58=, 0
201 ; CHECK-NEXT: local.set 4, $pop58
202 ; CHECK-NEXT: .LBB2_2: # %bb14
203 ; CHECK-NEXT: # Parent Loop BB2_1 Depth=1
204 ; CHECK-NEXT: # => This Inner Loop Header: Depth=2
205 ; CHECK-NEXT: loop # label3:
206 ; CHECK-NEXT: local.get $push60=, 7
207 ; CHECK-NEXT: local.get $push59=, 4
208 ; CHECK-NEXT: i32.add $push43=, $pop60, $pop59
209 ; CHECK-NEXT: local.tee $push42=, 9, $pop43
210 ; CHECK-NEXT: i32.const $push41=, 6
211 ; CHECK-NEXT: i32.add $push20=, $pop42, $pop41
212 ; CHECK-NEXT: i32.load16_s $push21=, 0($pop20)
213 ; CHECK-NEXT: local.get $push62=, 8
214 ; CHECK-NEXT: local.get $push61=, 4
215 ; CHECK-NEXT: i32.add $push40=, $pop62, $pop61
216 ; CHECK-NEXT: local.tee $push39=, 10, $pop40
217 ; CHECK-NEXT: i32.const $push38=, 6
218 ; CHECK-NEXT: i32.add $push18=, $pop39, $pop38
219 ; CHECK-NEXT: i32.load16_s $push19=, 0($pop18)
220 ; CHECK-NEXT: i32.add $push22=, $pop21, $pop19
221 ; CHECK-NEXT: local.get $push63=, 9
222 ; CHECK-NEXT: i32.const $push37=, 4
223 ; CHECK-NEXT: i32.add $push14=, $pop63, $pop37
224 ; CHECK-NEXT: i32.load16_s $push15=, 0($pop14)
225 ; CHECK-NEXT: local.get $push64=, 10
226 ; CHECK-NEXT: i32.const $push36=, 4
227 ; CHECK-NEXT: i32.add $push12=, $pop64, $pop36
228 ; CHECK-NEXT: i32.load16_s $push13=, 0($pop12)
229 ; CHECK-NEXT: i32.add $push16=, $pop15, $pop13
230 ; CHECK-NEXT: local.get $push65=, 9
231 ; CHECK-NEXT: i32.const $push35=, 2
232 ; CHECK-NEXT: i32.add $push8=, $pop65, $pop35
233 ; CHECK-NEXT: i32.load16_s $push9=, 0($pop8)
234 ; CHECK-NEXT: local.get $push66=, 10
235 ; CHECK-NEXT: i32.const $push34=, 2
236 ; CHECK-NEXT: i32.add $push6=, $pop66, $pop34
237 ; CHECK-NEXT: i32.load16_s $push7=, 0($pop6)
238 ; CHECK-NEXT: i32.add $push10=, $pop9, $pop7
239 ; CHECK-NEXT: local.get $push67=, 9
240 ; CHECK-NEXT: i32.load16_s $push3=, 0($pop67)
241 ; CHECK-NEXT: local.get $push68=, 10
242 ; CHECK-NEXT: i32.load16_s $push2=, 0($pop68)
243 ; CHECK-NEXT: i32.add $push4=, $pop3, $pop2
244 ; CHECK-NEXT: local.get $push69=, 6
245 ; CHECK-NEXT: i32.add $push5=, $pop4, $pop69
246 ; CHECK-NEXT: i32.add $push11=, $pop10, $pop5
247 ; CHECK-NEXT: i32.add $push17=, $pop16, $pop11
248 ; CHECK-NEXT: i32.add $push70=, $pop22, $pop17
249 ; CHECK-NEXT: local.set 6, $pop70
250 ; CHECK-NEXT: local.get $push71=, 4
251 ; CHECK-NEXT: i32.const $push33=, 8
252 ; CHECK-NEXT: i32.add $push32=, $pop71, $pop33
253 ; CHECK-NEXT: local.tee $push31=, 4, $pop32
254 ; CHECK-NEXT: i32.const $push30=, 20000
255 ; CHECK-NEXT: i32.ne $push23=, $pop31, $pop30
256 ; CHECK-NEXT: br_if 0, $pop23 # 0: up to label3
257 ; CHECK-NEXT: # %bb.3: # %bb11
258 ; CHECK-NEXT: # in Loop: Header=BB2_1 Depth=1
259 ; CHECK-NEXT: end_loop
260 ; CHECK-NEXT: local.get $push73=, 5
261 ; CHECK-NEXT: local.get $push72=, 6
262 ; CHECK-NEXT: i32.store 0($pop73), $pop72
263 ; CHECK-NEXT: local.get $push74=, 3
264 ; CHECK-NEXT: i32.const $push47=, 1
265 ; CHECK-NEXT: i32.add $push46=, $pop74, $pop47
266 ; CHECK-NEXT: local.tee $push45=, 3, $pop46
267 ; CHECK-NEXT: i32.const $push44=, 10000
268 ; CHECK-NEXT: i32.ne $push24=, $pop45, $pop44
269 ; CHECK-NEXT: br_if 0, $pop24 # 0: up to label2
270 ; CHECK-NEXT: # %bb.4: # %bb10
271 ; CHECK-NEXT: end_loop
272 ; CHECK-NEXT: # fallthrough-return
276 bb3: ; preds = %bb11, %bb
277 %i = phi i32 [ 0, %bb ], [ %i12, %bb11 ]
278 %i4 = getelementptr inbounds ptr, ptr %arg, i32 %i
279 %i5 = load ptr, ptr %i4, align 4
280 %i6 = getelementptr inbounds ptr, ptr %arg1, i32 %i
281 %i7 = load ptr, ptr %i6, align 4
282 %i8 = getelementptr inbounds i32, ptr %arg2, i32 %i
283 %i9 = load i32, ptr %i8, align 4
286 bb10: ; preds = %bb11
289 bb11: ; preds = %bb14
290 store i32 %i51, ptr %i8, align 4
291 %i12 = add nuw nsw i32 %i, 1
292 %i13 = icmp eq i32 %i12, 10000
293 br i1 %i13, label %bb10, label %bb3
295 bb14: ; preds = %bb14, %bb3
296 %i15 = phi i32 [ 0, %bb3 ], [ %i52, %bb14 ]
297 %i16 = phi i32 [ %i9, %bb3 ], [ %i51, %bb14 ]
298 %i17 = getelementptr inbounds i16, ptr %i5, i32 %i15
299 %i18 = load i16, ptr %i17, align 2
300 %i19 = sext i16 %i18 to i32
301 %i20 = getelementptr inbounds i16, ptr %i7, i32 %i15
302 %i21 = load i16, ptr %i20, align 2
303 %i22 = sext i16 %i21 to i32
304 %i23 = add nsw i32 %i22, %i19
305 %i24 = add nsw i32 %i23, %i16
306 %i25 = or i32 %i15, 1
307 %i26 = getelementptr inbounds i16, ptr %i5, i32 %i25
308 %i27 = load i16, ptr %i26, align 2
309 %i28 = sext i16 %i27 to i32
310 %i29 = getelementptr inbounds i16, ptr %i7, i32 %i25
311 %i30 = load i16, ptr %i29, align 2
312 %i31 = sext i16 %i30 to i32
313 %i32 = add nsw i32 %i31, %i28
314 %i33 = add nsw i32 %i32, %i24
315 %i34 = or i32 %i15, 2
316 %i35 = getelementptr inbounds i16, ptr %i5, i32 %i34
317 %i36 = load i16, ptr %i35, align 2
318 %i37 = sext i16 %i36 to i32
319 %i38 = getelementptr inbounds i16, ptr %i7, i32 %i34
320 %i39 = load i16, ptr %i38, align 2
321 %i40 = sext i16 %i39 to i32
322 %i41 = add nsw i32 %i40, %i37
323 %i42 = add nsw i32 %i41, %i33
324 %i43 = or i32 %i15, 3
325 %i44 = getelementptr inbounds i16, ptr %i5, i32 %i43
326 %i45 = load i16, ptr %i44, align 2
327 %i46 = sext i16 %i45 to i32
328 %i47 = getelementptr inbounds i16, ptr %i7, i32 %i43
329 %i48 = load i16, ptr %i47, align 2
330 %i49 = sext i16 %i48 to i32
331 %i50 = add nsw i32 %i49, %i46
332 %i51 = add nsw i32 %i50, %i42
333 %i52 = add nuw nsw i32 %i15, 4
334 %i53 = icmp eq i32 %i52, 10000
335 br i1 %i53, label %bb11, label %bb14
338 define hidden void @runtime(ptr nocapture noundef readonly %arg, ptr nocapture noundef readonly %arg1, ptr nocapture noundef writeonly %arg2, i32 noundef %arg3) {
339 ; CHECK-LABEL: runtime:
340 ; CHECK: .functype runtime (i32, i32, i32, i32) -> ()
341 ; CHECK-NEXT: .local i32, i32, i32, i32, i32
342 ; CHECK-NEXT: # %bb.0: # %bb
344 ; CHECK-NEXT: local.get $push32=, 3
345 ; CHECK-NEXT: i32.eqz $push64=, $pop32
346 ; CHECK-NEXT: br_if 0, $pop64 # 0: down to label4
347 ; CHECK-NEXT: # %bb.1: # %bb4
348 ; CHECK-NEXT: local.get $push34=, 3
349 ; CHECK-NEXT: i32.const $push0=, 1
350 ; CHECK-NEXT: i32.and $push33=, $pop34, $pop0
351 ; CHECK-NEXT: local.set 4, $pop33
352 ; CHECK-NEXT: i32.const $push35=, 0
353 ; CHECK-NEXT: local.set 5, $pop35
355 ; CHECK-NEXT: local.get $push36=, 3
356 ; CHECK-NEXT: i32.const $push20=, 1
357 ; CHECK-NEXT: i32.eq $push1=, $pop36, $pop20
358 ; CHECK-NEXT: br_if 0, $pop1 # 0: down to label5
359 ; CHECK-NEXT: # %bb.2: # %bb7
360 ; CHECK-NEXT: local.get $push38=, 3
361 ; CHECK-NEXT: i32.const $push2=, -2
362 ; CHECK-NEXT: i32.and $push37=, $pop38, $pop2
363 ; CHECK-NEXT: local.set 6, $pop37
364 ; CHECK-NEXT: i32.const $push39=, 0
365 ; CHECK-NEXT: local.set 5, $pop39
366 ; CHECK-NEXT: local.get $push40=, 0
367 ; CHECK-NEXT: local.set 3, $pop40
368 ; CHECK-NEXT: local.get $push41=, 1
369 ; CHECK-NEXT: local.set 7, $pop41
370 ; CHECK-NEXT: local.get $push42=, 2
371 ; CHECK-NEXT: local.set 8, $pop42
372 ; CHECK-NEXT: .LBB3_3: # %bb20
373 ; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
374 ; CHECK-NEXT: loop # label6:
375 ; CHECK-NEXT: local.get $push45=, 8
376 ; CHECK-NEXT: local.get $push43=, 3
377 ; CHECK-NEXT: f32.load $push4=, 0($pop43)
378 ; CHECK-NEXT: local.get $push44=, 7
379 ; CHECK-NEXT: f32.load $push3=, 0($pop44)
380 ; CHECK-NEXT: f32.add $push5=, $pop4, $pop3
381 ; CHECK-NEXT: f32.store 0($pop45), $pop5
382 ; CHECK-NEXT: local.get $push46=, 8
383 ; CHECK-NEXT: i32.const $push29=, 4
384 ; CHECK-NEXT: i32.add $push11=, $pop46, $pop29
385 ; CHECK-NEXT: local.get $push47=, 3
386 ; CHECK-NEXT: i32.const $push28=, 4
387 ; CHECK-NEXT: i32.add $push8=, $pop47, $pop28
388 ; CHECK-NEXT: f32.load $push9=, 0($pop8)
389 ; CHECK-NEXT: local.get $push48=, 7
390 ; CHECK-NEXT: i32.const $push27=, 4
391 ; CHECK-NEXT: i32.add $push6=, $pop48, $pop27
392 ; CHECK-NEXT: f32.load $push7=, 0($pop6)
393 ; CHECK-NEXT: f32.add $push10=, $pop9, $pop7
394 ; CHECK-NEXT: f32.store 0($pop11), $pop10
395 ; CHECK-NEXT: local.get $push50=, 3
396 ; CHECK-NEXT: i32.const $push26=, 8
397 ; CHECK-NEXT: i32.add $push49=, $pop50, $pop26
398 ; CHECK-NEXT: local.set 3, $pop49
399 ; CHECK-NEXT: local.get $push52=, 7
400 ; CHECK-NEXT: i32.const $push25=, 8
401 ; CHECK-NEXT: i32.add $push51=, $pop52, $pop25
402 ; CHECK-NEXT: local.set 7, $pop51
403 ; CHECK-NEXT: local.get $push54=, 8
404 ; CHECK-NEXT: i32.const $push24=, 8
405 ; CHECK-NEXT: i32.add $push53=, $pop54, $pop24
406 ; CHECK-NEXT: local.set 8, $pop53
407 ; CHECK-NEXT: local.get $push56=, 6
408 ; CHECK-NEXT: local.get $push55=, 5
409 ; CHECK-NEXT: i32.const $push23=, 2
410 ; CHECK-NEXT: i32.add $push22=, $pop55, $pop23
411 ; CHECK-NEXT: local.tee $push21=, 5, $pop22
412 ; CHECK-NEXT: i32.ne $push12=, $pop56, $pop21
413 ; CHECK-NEXT: br_if 0, $pop12 # 0: up to label6
414 ; CHECK-NEXT: .LBB3_4: # %bb9
415 ; CHECK-NEXT: end_loop
416 ; CHECK-NEXT: end_block # label5:
417 ; CHECK-NEXT: local.get $push57=, 4
418 ; CHECK-NEXT: i32.eqz $push65=, $pop57
419 ; CHECK-NEXT: br_if 0, $pop65 # 0: down to label4
420 ; CHECK-NEXT: # %bb.5: # %bb12
421 ; CHECK-NEXT: local.get $push59=, 2
422 ; CHECK-NEXT: local.get $push58=, 5
423 ; CHECK-NEXT: i32.const $push13=, 2
424 ; CHECK-NEXT: i32.shl $push31=, $pop58, $pop13
425 ; CHECK-NEXT: local.tee $push30=, 3, $pop31
426 ; CHECK-NEXT: i32.add $push19=, $pop59, $pop30
427 ; CHECK-NEXT: local.get $push61=, 0
428 ; CHECK-NEXT: local.get $push60=, 3
429 ; CHECK-NEXT: i32.add $push16=, $pop61, $pop60
430 ; CHECK-NEXT: f32.load $push17=, 0($pop16)
431 ; CHECK-NEXT: local.get $push63=, 1
432 ; CHECK-NEXT: local.get $push62=, 3
433 ; CHECK-NEXT: i32.add $push14=, $pop63, $pop62
434 ; CHECK-NEXT: f32.load $push15=, 0($pop14)
435 ; CHECK-NEXT: f32.add $push18=, $pop17, $pop15
436 ; CHECK-NEXT: f32.store 0($pop19), $pop18
437 ; CHECK-NEXT: .LBB3_6: # %bb19
438 ; CHECK-NEXT: end_block # label4:
439 ; CHECK-NEXT: # fallthrough-return
441 %i = icmp eq i32 %arg3, 0
442 br i1 %i, label %bb19, label %bb4
445 %i5 = and i32 %arg3, 1
446 %i6 = icmp eq i32 %arg3, 1
447 br i1 %i6, label %bb9, label %bb7
450 %i8 = and i32 %arg3, -2
453 bb9: ; preds = %bb20, %bb4
454 %i10 = phi i32 [ 0, %bb4 ], [ %i36, %bb20 ]
455 %i11 = icmp eq i32 %i5, 0
456 br i1 %i11, label %bb19, label %bb12
459 %i13 = getelementptr inbounds float, ptr %arg, i32 %i10
460 %i14 = load float, ptr %i13, align 4
461 %i15 = getelementptr inbounds float, ptr %arg1, i32 %i10
462 %i16 = load float, ptr %i15, align 4
463 %i17 = fadd float %i14, %i16
464 %i18 = getelementptr inbounds float, ptr %arg2, i32 %i10
465 store float %i17, ptr %i18, align 4
468 bb19: ; preds = %bb12, %bb9, %bb
471 bb20: ; preds = %bb20, %bb7
472 %i21 = phi i32 [ 0, %bb7 ], [ %i36, %bb20 ]
473 %i22 = phi i32 [ 0, %bb7 ], [ %i37, %bb20 ]
474 %i23 = getelementptr inbounds float, ptr %arg, i32 %i21
475 %i24 = load float, ptr %i23, align 4
476 %i25 = getelementptr inbounds float, ptr %arg1, i32 %i21
477 %i26 = load float, ptr %i25, align 4
478 %i27 = fadd float %i24, %i26
479 %i28 = getelementptr inbounds float, ptr %arg2, i32 %i21
480 store float %i27, ptr %i28, align 4
481 %i29 = or i32 %i21, 1
482 %i30 = getelementptr inbounds float, ptr %arg, i32 %i29
483 %i31 = load float, ptr %i30, align 4
484 %i32 = getelementptr inbounds float, ptr %arg1, i32 %i29
485 %i33 = load float, ptr %i32, align 4
486 %i34 = fadd float %i31, %i33
487 %i35 = getelementptr inbounds float, ptr %arg2, i32 %i29
488 store float %i34, ptr %i35, align 4
489 %i36 = add nuw i32 %i21, 2
490 %i37 = add i32 %i22, 2
491 %i38 = icmp eq i32 %i37, %i8
492 br i1 %i38, label %bb9, label %bb20