1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp -verify-machineinstrs %s -o - | FileCheck %s
4 define arm_aapcs_vfpcc void @test_fadd(half* noalias nocapture readonly %A, half %B, half* noalias nocapture %C, i32 %n) {
5 ; CHECK-LABEL: test_fadd:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: cmp r2, #1
10 ; CHECK-NEXT: .LBB0_1: @ %vector.ph
11 ; CHECK-NEXT: vmov.f16 r3, s0
12 ; CHECK-NEXT: .LBB0_2: @ %vector.body
13 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
14 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16
15 ; CHECK-NEXT: subs r2, #8
16 ; CHECK-NEXT: vadd.f16 q0, q0, r3
17 ; CHECK-NEXT: vstrb.8 q0, [r1], #16
18 ; CHECK-NEXT: bne .LBB0_2
19 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
23 %cmp = icmp eq i32 %0, 0
24 tail call void @llvm.assume(i1 %cmp)
25 %cmp18 = icmp sgt i32 %n, 0
26 br i1 %cmp18, label %vector.ph, label %for.cond.cleanup
28 vector.ph: ; preds = %entry
29 %broadcast.splatinsert10 = insertelement <8 x half> undef, half %B, i32 0
30 %broadcast.splat11 = shufflevector <8 x half> %broadcast.splatinsert10, <8 x half> undef, <8 x i32> zeroinitializer
33 vector.body: ; preds = %vector.body, %vector.ph
34 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
35 %1 = getelementptr inbounds half, half* %A, i32 %index
36 %2 = bitcast half* %1 to <8 x half>*
37 %wide.load = load <8 x half>, <8 x half>* %2, align 4
38 %3 = fadd fast <8 x half> %wide.load, %broadcast.splat11
39 %4 = getelementptr inbounds half, half* %C, i32 %index
40 %5 = bitcast half* %4 to <8 x half>*
41 store <8 x half> %3, <8 x half>* %5, align 4
42 %index.next = add i32 %index, 8
43 %6 = icmp eq i32 %index.next, %n
44 br i1 %6, label %for.cond.cleanup, label %vector.body
46 for.cond.cleanup: ; preds = %vector.body, %entry
50 define arm_aapcs_vfpcc void @test_fadd_r(half* noalias nocapture readonly %A, half %B, half* noalias nocapture %C, i32 %n) {
51 ; CHECK-LABEL: test_fadd_r:
52 ; CHECK: @ %bb.0: @ %entry
53 ; CHECK-NEXT: cmp r2, #1
56 ; CHECK-NEXT: .LBB1_1: @ %vector.ph
57 ; CHECK-NEXT: vmov.f16 r3, s0
58 ; CHECK-NEXT: .LBB1_2: @ %vector.body
59 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
60 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16
61 ; CHECK-NEXT: subs r2, #8
62 ; CHECK-NEXT: vadd.f16 q0, q0, r3
63 ; CHECK-NEXT: vstrb.8 q0, [r1], #16
64 ; CHECK-NEXT: bne .LBB1_2
65 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
69 %cmp = icmp eq i32 %0, 0
70 tail call void @llvm.assume(i1 %cmp)
71 %cmp18 = icmp sgt i32 %n, 0
72 br i1 %cmp18, label %vector.ph, label %for.cond.cleanup
74 vector.ph: ; preds = %entry
75 %broadcast.splatinsert10 = insertelement <8 x half> undef, half %B, i32 0
76 %broadcast.splat11 = shufflevector <8 x half> %broadcast.splatinsert10, <8 x half> undef, <8 x i32> zeroinitializer
79 vector.body: ; preds = %vector.body, %vector.ph
80 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
81 %1 = getelementptr inbounds half, half* %A, i32 %index
82 %2 = bitcast half* %1 to <8 x half>*
83 %wide.load = load <8 x half>, <8 x half>* %2, align 4
84 %3 = fadd fast <8 x half> %broadcast.splat11, %wide.load
85 %4 = getelementptr inbounds half, half* %C, i32 %index
86 %5 = bitcast half* %4 to <8 x half>*
87 store <8 x half> %3, <8 x half>* %5, align 4
88 %index.next = add i32 %index, 8
89 %6 = icmp eq i32 %index.next, %n
90 br i1 %6, label %for.cond.cleanup, label %vector.body
92 for.cond.cleanup: ; preds = %vector.body, %entry
96 define arm_aapcs_vfpcc void @test_fmul(half* noalias nocapture readonly %A, half %B, half* noalias nocapture %C, i32 %n) {
97 ; CHECK-LABEL: test_fmul:
98 ; CHECK: @ %bb.0: @ %entry
99 ; CHECK-NEXT: cmp r2, #1
101 ; CHECK-NEXT: bxlt lr
102 ; CHECK-NEXT: .LBB2_1: @ %vector.ph
103 ; CHECK-NEXT: vmov.f16 r3, s0
104 ; CHECK-NEXT: .LBB2_2: @ %vector.body
105 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
106 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16
107 ; CHECK-NEXT: subs r2, #8
108 ; CHECK-NEXT: vmul.f16 q0, q0, r3
109 ; CHECK-NEXT: vstrb.8 q0, [r1], #16
110 ; CHECK-NEXT: bne .LBB2_2
111 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
115 %cmp = icmp eq i32 %0, 0
116 tail call void @llvm.assume(i1 %cmp)
117 %cmp18 = icmp sgt i32 %n, 0
118 br i1 %cmp18, label %vector.ph, label %for.cond.cleanup
120 vector.ph: ; preds = %entry
121 %broadcast.splatinsert10 = insertelement <8 x half> undef, half %B, i32 0
122 %broadcast.splat11 = shufflevector <8 x half> %broadcast.splatinsert10, <8 x half> undef, <8 x i32> zeroinitializer
123 br label %vector.body
125 vector.body: ; preds = %vector.body, %vector.ph
126 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
127 %1 = getelementptr inbounds half, half* %A, i32 %index
128 %2 = bitcast half* %1 to <8 x half>*
129 %wide.load = load <8 x half>, <8 x half>* %2, align 4
130 %3 = fmul fast <8 x half> %wide.load, %broadcast.splat11
131 %4 = getelementptr inbounds half, half* %C, i32 %index
132 %5 = bitcast half* %4 to <8 x half>*
133 store <8 x half> %3, <8 x half>* %5, align 4
134 %index.next = add i32 %index, 8
135 %6 = icmp eq i32 %index.next, %n
136 br i1 %6, label %for.cond.cleanup, label %vector.body
138 for.cond.cleanup: ; preds = %vector.body, %entry
142 define arm_aapcs_vfpcc void @test_fmul_r(half* noalias nocapture readonly %A, half %B, half* noalias nocapture %C, i32 %n) {
143 ; CHECK-LABEL: test_fmul_r:
144 ; CHECK: @ %bb.0: @ %entry
145 ; CHECK-NEXT: cmp r2, #1
147 ; CHECK-NEXT: bxlt lr
148 ; CHECK-NEXT: .LBB3_1: @ %vector.ph
149 ; CHECK-NEXT: vmov.f16 r3, s0
150 ; CHECK-NEXT: .LBB3_2: @ %vector.body
151 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
152 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16
153 ; CHECK-NEXT: subs r2, #8
154 ; CHECK-NEXT: vmul.f16 q0, q0, r3
155 ; CHECK-NEXT: vstrb.8 q0, [r1], #16
156 ; CHECK-NEXT: bne .LBB3_2
157 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
161 %cmp = icmp eq i32 %0, 0
162 tail call void @llvm.assume(i1 %cmp)
163 %cmp18 = icmp sgt i32 %n, 0
164 br i1 %cmp18, label %vector.ph, label %for.cond.cleanup
166 vector.ph: ; preds = %entry
167 %broadcast.splatinsert10 = insertelement <8 x half> undef, half %B, i32 0
168 %broadcast.splat11 = shufflevector <8 x half> %broadcast.splatinsert10, <8 x half> undef, <8 x i32> zeroinitializer
169 br label %vector.body
171 vector.body: ; preds = %vector.body, %vector.ph
172 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
173 %1 = getelementptr inbounds half, half* %A, i32 %index
174 %2 = bitcast half* %1 to <8 x half>*
175 %wide.load = load <8 x half>, <8 x half>* %2, align 4
176 %3 = fmul fast <8 x half> %broadcast.splat11, %wide.load
177 %4 = getelementptr inbounds half, half* %C, i32 %index
178 %5 = bitcast half* %4 to <8 x half>*
179 store <8 x half> %3, <8 x half>* %5, align 4
180 %index.next = add i32 %index, 8
181 %6 = icmp eq i32 %index.next, %n
182 br i1 %6, label %for.cond.cleanup, label %vector.body
184 for.cond.cleanup: ; preds = %vector.body, %entry
188 define arm_aapcs_vfpcc void @test_fsub(half* noalias nocapture readonly %A, half %B, half* noalias nocapture %C, i32 %n) {
189 ; CHECK-LABEL: test_fsub:
190 ; CHECK: @ %bb.0: @ %entry
191 ; CHECK-NEXT: cmp r2, #1
193 ; CHECK-NEXT: bxlt lr
194 ; CHECK-NEXT: .LBB4_1: @ %vector.ph
195 ; CHECK-NEXT: vmov.f16 r3, s0
196 ; CHECK-NEXT: .LBB4_2: @ %vector.body
197 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
198 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16
199 ; CHECK-NEXT: subs r2, #8
200 ; CHECK-NEXT: vsub.f16 q0, q0, r3
201 ; CHECK-NEXT: vstrb.8 q0, [r1], #16
202 ; CHECK-NEXT: bne .LBB4_2
203 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
207 %cmp = icmp eq i32 %0, 0
208 tail call void @llvm.assume(i1 %cmp)
209 %cmp18 = icmp sgt i32 %n, 0
210 br i1 %cmp18, label %vector.ph, label %for.cond.cleanup
212 vector.ph: ; preds = %entry
213 %broadcast.splatinsert10 = insertelement <8 x half> undef, half %B, i32 0
214 %broadcast.splat11 = shufflevector <8 x half> %broadcast.splatinsert10, <8 x half> undef, <8 x i32> zeroinitializer
215 br label %vector.body
217 vector.body: ; preds = %vector.body, %vector.ph
218 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
219 %1 = getelementptr inbounds half, half* %A, i32 %index
220 %2 = bitcast half* %1 to <8 x half>*
221 %wide.load = load <8 x half>, <8 x half>* %2, align 4
222 %3 = fsub fast <8 x half> %wide.load, %broadcast.splat11
223 %4 = getelementptr inbounds half, half* %C, i32 %index
224 %5 = bitcast half* %4 to <8 x half>*
225 store <8 x half> %3, <8 x half>* %5, align 4
226 %index.next = add i32 %index, 8
227 %6 = icmp eq i32 %index.next, %n
228 br i1 %6, label %for.cond.cleanup, label %vector.body
230 for.cond.cleanup: ; preds = %vector.body, %entry
234 define arm_aapcs_vfpcc void @test_fsub_r(half* noalias nocapture readonly %A, half %B, half* noalias nocapture %C, i32 %n) {
235 ; CHECK-LABEL: test_fsub_r:
236 ; CHECK: @ %bb.0: @ %entry
237 ; CHECK-NEXT: cmp r2, #1
239 ; CHECK-NEXT: bxlt lr
240 ; CHECK-NEXT: .LBB5_1: @ %vector.ph
241 ; CHECK-NEXT: vmov.f16 r3, s0
242 ; CHECK-NEXT: vdup.16 q0, r3
243 ; CHECK-NEXT: .LBB5_2: @ %vector.body
244 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
245 ; CHECK-NEXT: vldrw.u32 q1, [r0], #16
246 ; CHECK-NEXT: subs r2, #8
247 ; CHECK-NEXT: vsub.f16 q1, q0, q1
248 ; CHECK-NEXT: vstrb.8 q1, [r1], #16
249 ; CHECK-NEXT: bne .LBB5_2
250 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
254 %cmp = icmp eq i32 %0, 0
255 tail call void @llvm.assume(i1 %cmp)
256 %cmp18 = icmp sgt i32 %n, 0
257 br i1 %cmp18, label %vector.ph, label %for.cond.cleanup
259 vector.ph: ; preds = %entry
260 %broadcast.splatinsert10 = insertelement <8 x half> undef, half %B, i32 0
261 %broadcast.splat11 = shufflevector <8 x half> %broadcast.splatinsert10, <8 x half> undef, <8 x i32> zeroinitializer
262 br label %vector.body
264 vector.body: ; preds = %vector.body, %vector.ph
265 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
266 %1 = getelementptr inbounds half, half* %A, i32 %index
267 %2 = bitcast half* %1 to <8 x half>*
268 %wide.load = load <8 x half>, <8 x half>* %2, align 4
269 %3 = fsub fast <8 x half> %broadcast.splat11, %wide.load
270 %4 = getelementptr inbounds half, half* %C, i32 %index
271 %5 = bitcast half* %4 to <8 x half>*
272 store <8 x half> %3, <8 x half>* %5, align 4
273 %index.next = add i32 %index, 8
274 %6 = icmp eq i32 %index.next, %n
275 br i1 %6, label %for.cond.cleanup, label %vector.body
277 for.cond.cleanup: ; preds = %vector.body, %entry
282 define arm_aapcs_vfpcc void @test_fmas(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half %C, half* noalias nocapture %D, i32 %n) {
283 ; CHECK-LABEL: test_fmas:
284 ; CHECK: @ %bb.0: @ %entry
285 ; CHECK-NEXT: cmp r3, #1
287 ; CHECK-NEXT: bxlt lr
288 ; CHECK-NEXT: .LBB6_1: @ %vector.ph
289 ; CHECK-NEXT: vmov.f16 r12, s0
290 ; CHECK-NEXT: .LBB6_2: @ %vector.body
291 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
292 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16
293 ; CHECK-NEXT: vldrw.u32 q1, [r1], #16
294 ; CHECK-NEXT: subs r3, #8
295 ; CHECK-NEXT: vfmas.f16 q1, q0, r12
296 ; CHECK-NEXT: vstrb.8 q1, [r2], #16
297 ; CHECK-NEXT: bne .LBB6_2
298 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
302 %cmp = icmp eq i32 %0, 0
303 tail call void @llvm.assume(i1 %cmp)
304 %cmp110 = icmp sgt i32 %n, 0
305 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
307 vector.ph: ; preds = %entry
308 %broadcast.splatinsert13 = insertelement <8 x half> undef, half %C, i32 0
309 %broadcast.splat14 = shufflevector <8 x half> %broadcast.splatinsert13, <8 x half> undef, <8 x i32> zeroinitializer
310 br label %vector.body
312 vector.body: ; preds = %vector.body, %vector.ph
313 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
314 %1 = getelementptr inbounds half, half* %A, i32 %index
315 %2 = bitcast half* %1 to <8 x half>*
316 %wide.load = load <8 x half>, <8 x half>* %2, align 4
317 %3 = getelementptr inbounds half, half* %B, i32 %index
318 %4 = bitcast half* %3 to <8 x half>*
319 %wide.load12 = load <8 x half>, <8 x half>* %4, align 4
320 %5 = fmul fast <8 x half> %wide.load12, %wide.load
321 %6 = fadd fast <8 x half> %5, %broadcast.splat14
322 %7 = getelementptr inbounds half, half* %D, i32 %index
323 %8 = bitcast half* %7 to <8 x half>*
324 store <8 x half> %6, <8 x half>* %8, align 4
325 %index.next = add i32 %index, 8
326 %9 = icmp eq i32 %index.next, %n
327 br i1 %9, label %for.cond.cleanup, label %vector.body
329 for.cond.cleanup: ; preds = %vector.body, %entry
333 define arm_aapcs_vfpcc void @test_fmas_r(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half %C, half* noalias nocapture %D, i32 %n) {
334 ; CHECK-LABEL: test_fmas_r:
335 ; CHECK: @ %bb.0: @ %entry
336 ; CHECK-NEXT: cmp r3, #1
338 ; CHECK-NEXT: bxlt lr
339 ; CHECK-NEXT: .LBB7_1: @ %vector.ph
340 ; CHECK-NEXT: vmov.f16 r12, s0
341 ; CHECK-NEXT: .LBB7_2: @ %vector.body
342 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
343 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16
344 ; CHECK-NEXT: vldrw.u32 q1, [r1], #16
345 ; CHECK-NEXT: subs r3, #8
346 ; CHECK-NEXT: vfmas.f16 q1, q0, r12
347 ; CHECK-NEXT: vstrb.8 q1, [r2], #16
348 ; CHECK-NEXT: bne .LBB7_2
349 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
353 %cmp = icmp eq i32 %0, 0
354 tail call void @llvm.assume(i1 %cmp)
355 %cmp110 = icmp sgt i32 %n, 0
356 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
358 vector.ph: ; preds = %entry
359 %broadcast.splatinsert13 = insertelement <8 x half> undef, half %C, i32 0
360 %broadcast.splat14 = shufflevector <8 x half> %broadcast.splatinsert13, <8 x half> undef, <8 x i32> zeroinitializer
361 br label %vector.body
363 vector.body: ; preds = %vector.body, %vector.ph
364 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
365 %1 = getelementptr inbounds half, half* %A, i32 %index
366 %2 = bitcast half* %1 to <8 x half>*
367 %wide.load = load <8 x half>, <8 x half>* %2, align 4
368 %3 = getelementptr inbounds half, half* %B, i32 %index
369 %4 = bitcast half* %3 to <8 x half>*
370 %wide.load12 = load <8 x half>, <8 x half>* %4, align 4
371 %5 = fmul fast <8 x half> %wide.load12, %wide.load
372 %6 = fadd fast <8 x half> %broadcast.splat14, %5
373 %7 = getelementptr inbounds half, half* %D, i32 %index
374 %8 = bitcast half* %7 to <8 x half>*
375 store <8 x half> %6, <8 x half>* %8, align 4
376 %index.next = add i32 %index, 8
377 %9 = icmp eq i32 %index.next, %n
378 br i1 %9, label %for.cond.cleanup, label %vector.body
380 for.cond.cleanup: ; preds = %vector.body, %entry
384 define arm_aapcs_vfpcc void @test_fma(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half %C, half* noalias nocapture %D, i32 %n) {
385 ; CHECK-LABEL: test_fma:
386 ; CHECK: @ %bb.0: @ %entry
387 ; CHECK-NEXT: cmp r3, #1
389 ; CHECK-NEXT: bxlt lr
390 ; CHECK-NEXT: .LBB8_1: @ %vector.ph
391 ; CHECK-NEXT: vmov.f16 r12, s0
392 ; CHECK-NEXT: .LBB8_2: @ %vector.body
393 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
394 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16
395 ; CHECK-NEXT: vldrw.u32 q1, [r1], #16
396 ; CHECK-NEXT: subs r3, #8
397 ; CHECK-NEXT: vfma.f16 q1, q0, r12
398 ; CHECK-NEXT: vstrb.8 q1, [r2], #16
399 ; CHECK-NEXT: bne .LBB8_2
400 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
404 %cmp = icmp eq i32 %0, 0
405 tail call void @llvm.assume(i1 %cmp)
406 %cmp110 = icmp sgt i32 %n, 0
407 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
409 vector.ph: ; preds = %entry
410 %broadcast.splatinsert12 = insertelement <8 x half> undef, half %C, i32 0
411 %broadcast.splat13 = shufflevector <8 x half> %broadcast.splatinsert12, <8 x half> undef, <8 x i32> zeroinitializer
412 br label %vector.body
414 vector.body: ; preds = %vector.body, %vector.ph
415 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
416 %1 = getelementptr inbounds half, half* %A, i32 %index
417 %2 = bitcast half* %1 to <8 x half>*
418 %wide.load = load <8 x half>, <8 x half>* %2, align 4
419 %3 = fmul fast <8 x half> %wide.load, %broadcast.splat13
420 %4 = getelementptr inbounds half, half* %B, i32 %index
421 %5 = bitcast half* %4 to <8 x half>*
422 %wide.load14 = load <8 x half>, <8 x half>* %5, align 4
423 %6 = fadd fast <8 x half> %3, %wide.load14
424 %7 = getelementptr inbounds half, half* %D, i32 %index
425 %8 = bitcast half* %7 to <8 x half>*
426 store <8 x half> %6, <8 x half>* %8, align 4
427 %index.next = add i32 %index, 8
428 %9 = icmp eq i32 %index.next, %n
429 br i1 %9, label %for.cond.cleanup, label %vector.body
431 for.cond.cleanup: ; preds = %vector.body, %entry
435 define arm_aapcs_vfpcc void @test_fma_r(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half %C, half* noalias nocapture %D, i32 %n) {
436 ; CHECK-LABEL: test_fma_r:
437 ; CHECK: @ %bb.0: @ %entry
438 ; CHECK-NEXT: cmp r3, #1
440 ; CHECK-NEXT: bxlt lr
441 ; CHECK-NEXT: .LBB9_1: @ %vector.ph
442 ; CHECK-NEXT: vmov.f16 r12, s0
443 ; CHECK-NEXT: .LBB9_2: @ %vector.body
444 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
445 ; CHECK-NEXT: vldrw.u32 q0, [r0], #16
446 ; CHECK-NEXT: vldrw.u32 q1, [r1], #16
447 ; CHECK-NEXT: subs r3, #8
448 ; CHECK-NEXT: vfma.f16 q1, q0, r12
449 ; CHECK-NEXT: vstrb.8 q1, [r2], #16
450 ; CHECK-NEXT: bne .LBB9_2
451 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
455 %cmp = icmp eq i32 %0, 0
456 tail call void @llvm.assume(i1 %cmp)
457 %cmp110 = icmp sgt i32 %n, 0
458 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
460 vector.ph: ; preds = %entry
461 %broadcast.splatinsert12 = insertelement <8 x half> undef, half %C, i32 0
462 %broadcast.splat13 = shufflevector <8 x half> %broadcast.splatinsert12, <8 x half> undef, <8 x i32> zeroinitializer
463 br label %vector.body
465 vector.body: ; preds = %vector.body, %vector.ph
466 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
467 %1 = getelementptr inbounds half, half* %A, i32 %index
468 %2 = bitcast half* %1 to <8 x half>*
469 %wide.load = load <8 x half>, <8 x half>* %2, align 4
470 %3 = fmul fast <8 x half> %broadcast.splat13, %wide.load
471 %4 = getelementptr inbounds half, half* %B, i32 %index
472 %5 = bitcast half* %4 to <8 x half>*
473 %wide.load14 = load <8 x half>, <8 x half>* %5, align 4
474 %6 = fadd fast <8 x half> %3, %wide.load14
475 %7 = getelementptr inbounds half, half* %D, i32 %index
476 %8 = bitcast half* %7 to <8 x half>*
477 store <8 x half> %6, <8 x half>* %8, align 4
478 %index.next = add i32 %index, 8
479 %9 = icmp eq i32 %index.next, %n
480 br i1 %9, label %for.cond.cleanup, label %vector.body
482 for.cond.cleanup: ; preds = %vector.body, %entry
487 define arm_aapcs_vfpcc void @test_fmss(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half %C, half* noalias nocapture %D, i32 %n) {
488 ; CHECK-LABEL: test_fmss:
489 ; CHECK: @ %bb.0: @ %entry
490 ; CHECK-NEXT: cmp r3, #1
492 ; CHECK-NEXT: bxlt lr
493 ; CHECK-NEXT: .LBB10_1: @ %vector.ph
494 ; CHECK-NEXT: vmov.f16 r12, s0
495 ; CHECK-NEXT: vdup.16 q0, r12
496 ; CHECK-NEXT: vneg.f16 q0, q0
497 ; CHECK-NEXT: .LBB10_2: @ %vector.body
498 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
499 ; CHECK-NEXT: vldrw.u32 q1, [r0], #16
500 ; CHECK-NEXT: vldrw.u32 q2, [r1], #16
501 ; CHECK-NEXT: vmov q3, q0
502 ; CHECK-NEXT: subs r3, #8
503 ; CHECK-NEXT: vfma.f16 q3, q2, q1
504 ; CHECK-NEXT: vstrb.8 q3, [r2], #16
505 ; CHECK-NEXT: bne .LBB10_2
506 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
510 %cmp = icmp eq i32 %0, 0
511 tail call void @llvm.assume(i1 %cmp)
512 %cmp110 = icmp sgt i32 %n, 0
513 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
515 vector.ph: ; preds = %entry
516 %broadcast.splatinsert13 = insertelement <8 x half> undef, half %C, i32 0
517 %broadcast.splat14 = shufflevector <8 x half> %broadcast.splatinsert13, <8 x half> undef, <8 x i32> zeroinitializer
518 br label %vector.body
520 vector.body: ; preds = %vector.body, %vector.ph
521 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
522 %1 = getelementptr inbounds half, half* %A, i32 %index
523 %2 = bitcast half* %1 to <8 x half>*
524 %wide.load = load <8 x half>, <8 x half>* %2, align 4
525 %3 = getelementptr inbounds half, half* %B, i32 %index
526 %4 = bitcast half* %3 to <8 x half>*
527 %wide.load12 = load <8 x half>, <8 x half>* %4, align 4
528 %5 = fmul fast <8 x half> %wide.load12, %wide.load
529 %6 = fsub fast <8 x half> %5, %broadcast.splat14
530 %7 = getelementptr inbounds half, half* %D, i32 %index
531 %8 = bitcast half* %7 to <8 x half>*
532 store <8 x half> %6, <8 x half>* %8, align 4
533 %index.next = add i32 %index, 8
534 %9 = icmp eq i32 %index.next, %n
535 br i1 %9, label %for.cond.cleanup, label %vector.body
537 for.cond.cleanup: ; preds = %vector.body, %entry
541 define arm_aapcs_vfpcc void @test_fmss_r(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half %C, half* noalias nocapture %D, i32 %n) {
542 ; CHECK-LABEL: test_fmss_r:
543 ; CHECK: @ %bb.0: @ %entry
544 ; CHECK-NEXT: cmp r3, #1
546 ; CHECK-NEXT: bxlt lr
547 ; CHECK-NEXT: .LBB11_1: @ %vector.ph
548 ; CHECK-NEXT: vmov.f16 r12, s0
549 ; CHECK-NEXT: vdup.16 q0, r12
550 ; CHECK-NEXT: .LBB11_2: @ %vector.body
551 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
552 ; CHECK-NEXT: vldrw.u32 q1, [r0], #16
553 ; CHECK-NEXT: vldrw.u32 q2, [r1], #16
554 ; CHECK-NEXT: vmov q3, q0
555 ; CHECK-NEXT: subs r3, #8
556 ; CHECK-NEXT: vfms.f16 q3, q2, q1
557 ; CHECK-NEXT: vstrb.8 q3, [r2], #16
558 ; CHECK-NEXT: bne .LBB11_2
559 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
563 %cmp = icmp eq i32 %0, 0
564 tail call void @llvm.assume(i1 %cmp)
565 %cmp110 = icmp sgt i32 %n, 0
566 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
568 vector.ph: ; preds = %entry
569 %broadcast.splatinsert13 = insertelement <8 x half> undef, half %C, i32 0
570 %broadcast.splat14 = shufflevector <8 x half> %broadcast.splatinsert13, <8 x half> undef, <8 x i32> zeroinitializer
571 br label %vector.body
573 vector.body: ; preds = %vector.body, %vector.ph
574 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
575 %1 = getelementptr inbounds half, half* %A, i32 %index
576 %2 = bitcast half* %1 to <8 x half>*
577 %wide.load = load <8 x half>, <8 x half>* %2, align 4
578 %3 = getelementptr inbounds half, half* %B, i32 %index
579 %4 = bitcast half* %3 to <8 x half>*
580 %wide.load12 = load <8 x half>, <8 x half>* %4, align 4
581 %5 = fmul fast <8 x half> %wide.load12, %wide.load
582 %6 = fsub fast <8 x half> %broadcast.splat14, %5
583 %7 = getelementptr inbounds half, half* %D, i32 %index
584 %8 = bitcast half* %7 to <8 x half>*
585 store <8 x half> %6, <8 x half>* %8, align 4
586 %index.next = add i32 %index, 8
587 %9 = icmp eq i32 %index.next, %n
588 br i1 %9, label %for.cond.cleanup, label %vector.body
590 for.cond.cleanup: ; preds = %vector.body, %entry
594 define arm_aapcs_vfpcc void @test_fms(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half %C, half* noalias nocapture %D, i32 %n) {
595 ; CHECK-LABEL: test_fms:
596 ; CHECK: @ %bb.0: @ %entry
597 ; CHECK-NEXT: cmp r3, #1
599 ; CHECK-NEXT: bxlt lr
600 ; CHECK-NEXT: .LBB12_1: @ %vector.ph
601 ; CHECK-NEXT: vmov.f16 r12, s0
602 ; CHECK-NEXT: .LBB12_2: @ %vector.body
603 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
604 ; CHECK-NEXT: vldrw.u32 q0, [r1], #16
605 ; CHECK-NEXT: vldrw.u32 q1, [r0], #16
606 ; CHECK-NEXT: subs r3, #8
607 ; CHECK-NEXT: vneg.f16 q0, q0
608 ; CHECK-NEXT: vfma.f16 q0, q1, r12
609 ; CHECK-NEXT: vstrb.8 q0, [r2], #16
610 ; CHECK-NEXT: bne .LBB12_2
611 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
615 %cmp = icmp eq i32 %0, 0
616 tail call void @llvm.assume(i1 %cmp)
617 %cmp110 = icmp sgt i32 %n, 0
618 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
620 vector.ph: ; preds = %entry
621 %broadcast.splatinsert12 = insertelement <8 x half> undef, half %C, i32 0
622 %broadcast.splat13 = shufflevector <8 x half> %broadcast.splatinsert12, <8 x half> undef, <8 x i32> zeroinitializer
623 br label %vector.body
625 vector.body: ; preds = %vector.body, %vector.ph
626 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
627 %1 = getelementptr inbounds half, half* %A, i32 %index
628 %2 = bitcast half* %1 to <8 x half>*
629 %wide.load = load <8 x half>, <8 x half>* %2, align 4
630 %3 = fmul fast <8 x half> %wide.load, %broadcast.splat13
631 %4 = getelementptr inbounds half, half* %B, i32 %index
632 %5 = bitcast half* %4 to <8 x half>*
633 %wide.load14 = load <8 x half>, <8 x half>* %5, align 4
634 %6 = fsub fast <8 x half> %3, %wide.load14
635 %7 = getelementptr inbounds half, half* %D, i32 %index
636 %8 = bitcast half* %7 to <8 x half>*
637 store <8 x half> %6, <8 x half>* %8, align 4
638 %index.next = add i32 %index, 8
639 %9 = icmp eq i32 %index.next, %n
640 br i1 %9, label %for.cond.cleanup, label %vector.body
642 for.cond.cleanup: ; preds = %vector.body, %entry
646 define arm_aapcs_vfpcc void @test_fms_r(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half %C, half* noalias nocapture %D, i32 %n) {
647 ; CHECK-LABEL: test_fms_r:
648 ; CHECK: @ %bb.0: @ %entry
649 ; CHECK-NEXT: cmp r3, #1
651 ; CHECK-NEXT: bxlt lr
652 ; CHECK-NEXT: .LBB13_1: @ %vector.ph
653 ; CHECK-NEXT: vmov.f16 r12, s0
654 ; CHECK-NEXT: .LBB13_2: @ %vector.body
655 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
656 ; CHECK-NEXT: vldrw.u32 q0, [r1], #16
657 ; CHECK-NEXT: vldrw.u32 q1, [r0], #16
658 ; CHECK-NEXT: subs r3, #8
659 ; CHECK-NEXT: vneg.f16 q0, q0
660 ; CHECK-NEXT: vfma.f16 q0, q1, r12
661 ; CHECK-NEXT: vstrb.8 q0, [r2], #16
662 ; CHECK-NEXT: bne .LBB13_2
663 ; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup
667 %cmp = icmp eq i32 %0, 0
668 tail call void @llvm.assume(i1 %cmp)
669 %cmp110 = icmp sgt i32 %n, 0
670 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
672 vector.ph: ; preds = %entry
673 %broadcast.splatinsert12 = insertelement <8 x half> undef, half %C, i32 0
674 %broadcast.splat13 = shufflevector <8 x half> %broadcast.splatinsert12, <8 x half> undef, <8 x i32> zeroinitializer
675 br label %vector.body
677 vector.body: ; preds = %vector.body, %vector.ph
678 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
679 %1 = getelementptr inbounds half, half* %A, i32 %index
680 %2 = bitcast half* %1 to <8 x half>*
681 %wide.load = load <8 x half>, <8 x half>* %2, align 4
682 %3 = fmul fast <8 x half> %broadcast.splat13, %wide.load
683 %4 = getelementptr inbounds half, half* %B, i32 %index
684 %5 = bitcast half* %4 to <8 x half>*
685 %wide.load14 = load <8 x half>, <8 x half>* %5, align 4
686 %6 = fsub fast <8 x half> %3, %wide.load14
687 %7 = getelementptr inbounds half, half* %D, i32 %index
688 %8 = bitcast half* %7 to <8 x half>*
689 store <8 x half> %6, <8 x half>* %8, align 4
690 %index.next = add i32 %index, 8
691 %9 = icmp eq i32 %index.next, %n
692 br i1 %9, label %for.cond.cleanup, label %vector.body
694 for.cond.cleanup: ; preds = %vector.body, %entry
699 define dso_local void @test_nested(half* noalias nocapture %pInT1, half* noalias nocapture readonly %pOutT1, half* noalias nocapture readonly %pPRT_in, half* noalias nocapture readnone %pPRT_pDst, i32 %numRows, i32 %numCols, i32 %l) local_unnamed_addr #0 {
700 ; CHECK-LABEL: test_nested:
701 ; CHECK: @ %bb.0: @ %for.body.us.preheader
702 ; CHECK-NEXT: .save {r4, r5, r6, lr}
703 ; CHECK-NEXT: push {r4, r5, r6, lr}
704 ; CHECK-NEXT: ldrd lr, r12, [sp, #16]
705 ; CHECK-NEXT: lsl.w r3, r12, #1
706 ; CHECK-NEXT: .LBB14_1: @ %for.body.us
707 ; CHECK-NEXT: @ =>This Loop Header: Depth=1
708 ; CHECK-NEXT: @ Child Loop BB14_2 Depth 2
709 ; CHECK-NEXT: ldrh r4, [r1]
710 ; CHECK-NEXT: mov r5, r2
711 ; CHECK-NEXT: mov r6, r12
712 ; CHECK-NEXT: vdup.16 q0, r4
713 ; CHECK-NEXT: mov r4, r0
714 ; CHECK-NEXT: .LBB14_2: @ %vector.body
715 ; CHECK-NEXT: @ Parent Loop BB14_1 Depth=1
716 ; CHECK-NEXT: @ => This Inner Loop Header: Depth=2
717 ; CHECK-NEXT: vldrw.u32 q1, [r5], #16
718 ; CHECK-NEXT: vldrw.u32 q2, [r4]
719 ; CHECK-NEXT: subs r6, #8
720 ; CHECK-NEXT: vfms.f16 q2, q1, q0
721 ; CHECK-NEXT: vstrb.8 q2, [r4], #16
722 ; CHECK-NEXT: bne .LBB14_2
723 ; CHECK-NEXT: @ %bb.3: @ %for.cond6.for.end_crit_edge.us
724 ; CHECK-NEXT: @ in Loop: Header=BB14_1 Depth=1
725 ; CHECK-NEXT: add r0, r3
726 ; CHECK-NEXT: add r2, r3
727 ; CHECK-NEXT: adds r1, #2
728 ; CHECK-NEXT: le lr, .LBB14_1
729 ; CHECK-NEXT: @ %bb.4: @ %for.end14
730 ; CHECK-NEXT: pop {r4, r5, r6, pc}
731 for.body.us.preheader:
732 %cmp = icmp sgt i32 %numRows, 0
733 tail call void @llvm.assume(i1 %cmp)
734 %cmp1 = icmp sgt i32 %numCols, 0
735 tail call void @llvm.assume(i1 %cmp1)
736 %rem = and i32 %numCols, 7
737 %cmp2 = icmp eq i32 %rem, 0
738 tail call void @llvm.assume(i1 %cmp2)
739 %cmp3 = icmp slt i32 %l, %numCols
740 tail call void @llvm.assume(i1 %cmp3)
741 br label %for.body.us
743 for.body.us: ; preds = %for.cond6.for.end_crit_edge.us, %for.body.us.preheader
744 %pInT1.addr.038.us = phi half* [ %scevgep40, %for.cond6.for.end_crit_edge.us ], [ %pInT1, %for.body.us.preheader ]
745 %i.037.us = phi i32 [ %inc13.us, %for.cond6.for.end_crit_edge.us ], [ 0, %for.body.us.preheader ]
746 %pOutT1.addr.036.us = phi half* [ %incdec.ptr.us, %for.cond6.for.end_crit_edge.us ], [ %pOutT1, %for.body.us.preheader ]
747 %pPRT_in.addr.035.us = phi half* [ %scevgep, %for.cond6.for.end_crit_edge.us ], [ %pPRT_in, %for.body.us.preheader ]
748 %scevgep = getelementptr half, half* %pPRT_in.addr.035.us, i32 %numCols
749 %0 = load half, half* %pOutT1.addr.036.us, align 4
750 %broadcast.splatinsert47 = insertelement <8 x half> undef, half %0, i32 0
751 %broadcast.splat48 = shufflevector <8 x half> %broadcast.splatinsert47, <8 x half> undef, <8 x i32> zeroinitializer
752 br label %vector.body
754 vector.body: ; preds = %vector.body, %for.body.us
755 %index = phi i32 [ 0, %for.body.us ], [ %index.next, %vector.body ]
756 %next.gep = getelementptr half, half* %pInT1.addr.038.us, i32 %index
757 %next.gep45 = getelementptr half, half* %pPRT_in.addr.035.us, i32 %index
758 %1 = bitcast half* %next.gep to <8 x half>*
759 %wide.load = load <8 x half>, <8 x half>* %1, align 4
760 %2 = bitcast half* %next.gep45 to <8 x half>*
761 %wide.load46 = load <8 x half>, <8 x half>* %2, align 4
762 %3 = fmul fast <8 x half> %wide.load46, %broadcast.splat48
763 %4 = fsub fast <8 x half> %wide.load, %3
764 store <8 x half> %4, <8 x half>* %1, align 4
765 %index.next = add i32 %index, 8
766 %5 = icmp eq i32 %index.next, %numCols
767 br i1 %5, label %for.cond6.for.end_crit_edge.us, label %vector.body
769 for.cond6.for.end_crit_edge.us: ; preds = %vector.body
770 %incdec.ptr.us = getelementptr inbounds half, half* %pOutT1.addr.036.us, i32 1
771 %scevgep40 = getelementptr half, half* %pInT1.addr.038.us, i32 %numCols
772 %inc13.us = add nuw nsw i32 %i.037.us, 1
773 %exitcond41 = icmp eq i32 %inc13.us, %numRows
774 br i1 %exitcond41, label %for.end14, label %for.body.us
776 for.end14: ; preds = %for.cond6.for.end_crit_edge.us
780 %struct.arm_fir_instance_f32 = type { i16, half*, half* }
781 define void @arm_fir_f32_1_4_mve(%struct.arm_fir_instance_f32* nocapture readonly %S, half* nocapture readonly %pSrc, half* %pDst, i32 %blockSize) {
782 ; CHECK-LABEL: arm_fir_f32_1_4_mve:
783 ; CHECK: @ %bb.0: @ %entry
784 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
785 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
786 ; CHECK-NEXT: .pad #16
787 ; CHECK-NEXT: sub sp, #16
788 ; CHECK-NEXT: ldrh.w r9, [r0]
789 ; CHECK-NEXT: ldr.w r10, [r0, #4]
790 ; CHECK-NEXT: sub.w r6, r9, #1
791 ; CHECK-NEXT: cmp r6, #3
792 ; CHECK-NEXT: bhi .LBB15_6
793 ; CHECK-NEXT: @ %bb.1: @ %if.then
794 ; CHECK-NEXT: ldr r7, [r0, #8]
795 ; CHECK-NEXT: add.w r4, r10, r6, lsl #1
796 ; CHECK-NEXT: lsrs r5, r3, #2
797 ; CHECK-NEXT: ldrh.w r8, [r7, #6]
798 ; CHECK-NEXT: ldrh.w r12, [r7, #4]
799 ; CHECK-NEXT: ldrh r6, [r7, #2]
800 ; CHECK-NEXT: ldrh r7, [r7]
801 ; CHECK-NEXT: wls lr, r5, .LBB15_5
802 ; CHECK-NEXT: @ %bb.2: @ %while.body.lr.ph
803 ; CHECK-NEXT: str.w r9, [sp, #12] @ 4-byte Spill
804 ; CHECK-NEXT: bic r5, r3, #3
805 ; CHECK-NEXT: add.w r9, r10, #2
806 ; CHECK-NEXT: str r5, [sp] @ 4-byte Spill
807 ; CHECK-NEXT: add.w r5, r2, r5, lsl #1
808 ; CHECK-NEXT: str r5, [sp, #4] @ 4-byte Spill
809 ; CHECK-NEXT: str r1, [sp, #8] @ 4-byte Spill
810 ; CHECK-NEXT: .LBB15_3: @ %while.body
811 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
812 ; CHECK-NEXT: vldrw.u32 q0, [r1], #8
813 ; CHECK-NEXT: sub.w r11, r9, #2
814 ; CHECK-NEXT: add.w r5, r9, #2
815 ; CHECK-NEXT: vstrb.8 q0, [r4], #8
816 ; CHECK-NEXT: vldrw.u32 q0, [r11]
817 ; CHECK-NEXT: vldrw.u32 q1, [r9]
818 ; CHECK-NEXT: vmul.f16 q0, q0, r7
819 ; CHECK-NEXT: vfma.f16 q0, q1, r6
820 ; CHECK-NEXT: vldrw.u32 q1, [r5]
821 ; CHECK-NEXT: vfma.f16 q0, q1, r12
822 ; CHECK-NEXT: vldrw.u32 q1, [r9, #4]
823 ; CHECK-NEXT: add.w r9, r9, #8
824 ; CHECK-NEXT: vfma.f16 q0, q1, r8
825 ; CHECK-NEXT: vstrb.8 q0, [r2], #8
826 ; CHECK-NEXT: le lr, .LBB15_3
827 ; CHECK-NEXT: @ %bb.4: @ %while.end.loopexit
828 ; CHECK-NEXT: ldr r2, [sp] @ 4-byte Reload
829 ; CHECK-NEXT: ldr r1, [sp, #8] @ 4-byte Reload
830 ; CHECK-NEXT: ldr.w r9, [sp, #12] @ 4-byte Reload
831 ; CHECK-NEXT: add.w r10, r10, r2, lsl #1
832 ; CHECK-NEXT: add.w r1, r1, r2, lsl #1
833 ; CHECK-NEXT: ldr r2, [sp, #4] @ 4-byte Reload
834 ; CHECK-NEXT: .LBB15_5: @ %while.end
835 ; CHECK-NEXT: and r5, r3, #3
836 ; CHECK-NEXT: vldrw.u32 q0, [r1]
837 ; CHECK-NEXT: vctp.16 r5
839 ; CHECK-NEXT: vstrht.16 q0, [r4]
840 ; CHECK-NEXT: vldrw.u32 q0, [r10]
841 ; CHECK-NEXT: add.w r1, r10, #2
842 ; CHECK-NEXT: vldrw.u32 q1, [r1]
843 ; CHECK-NEXT: add.w r1, r10, #6
844 ; CHECK-NEXT: vmul.f16 q0, q0, r7
845 ; CHECK-NEXT: vfma.f16 q0, q1, r6
846 ; CHECK-NEXT: vldrw.u32 q1, [r10, #4]
847 ; CHECK-NEXT: vfma.f16 q0, q1, r12
848 ; CHECK-NEXT: vldrw.u32 q1, [r1]
849 ; CHECK-NEXT: vfma.f16 q0, q1, r8
851 ; CHECK-NEXT: vstrht.16 q0, [r2]
852 ; CHECK-NEXT: ldr.w r10, [r0, #4]
853 ; CHECK-NEXT: .LBB15_6: @ %if.end
854 ; CHECK-NEXT: add.w r0, r10, r3, lsl #1
855 ; CHECK-NEXT: lsr.w r1, r9, #2
856 ; CHECK-NEXT: wls lr, r1, .LBB15_10
857 ; CHECK-NEXT: @ %bb.7: @ %while.body51.preheader
858 ; CHECK-NEXT: bic r2, r9, #3
859 ; CHECK-NEXT: adds r1, r2, r3
860 ; CHECK-NEXT: mov r3, r10
861 ; CHECK-NEXT: add.w r1, r10, r1, lsl #1
862 ; CHECK-NEXT: .LBB15_8: @ %while.body51
863 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
864 ; CHECK-NEXT: vldrw.u32 q0, [r0], #8
865 ; CHECK-NEXT: vstrb.8 q0, [r3], #8
866 ; CHECK-NEXT: le lr, .LBB15_8
867 ; CHECK-NEXT: @ %bb.9: @ %while.end55.loopexit
868 ; CHECK-NEXT: add.w r10, r10, r2, lsl #1
869 ; CHECK-NEXT: mov r0, r1
870 ; CHECK-NEXT: .LBB15_10: @ %while.end55
871 ; CHECK-NEXT: ands r1, r9, #3
872 ; CHECK-NEXT: beq .LBB15_12
873 ; CHECK-NEXT: @ %bb.11: @ %if.then59
874 ; CHECK-NEXT: vldrw.u32 q0, [r0]
875 ; CHECK-NEXT: vctp.16 r1
877 ; CHECK-NEXT: vstrht.16 q0, [r10]
878 ; CHECK-NEXT: .LBB15_12: @ %if.end61
879 ; CHECK-NEXT: add sp, #16
880 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
882 %pState1 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 1
883 %0 = load half*, half** %pState1, align 4
884 %pCoeffs2 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 2
885 %1 = load half*, half** %pCoeffs2, align 4
886 %numTaps3 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 0
887 %2 = load i16, i16* %numTaps3, align 4
888 %conv = zext i16 %2 to i32
889 %sub = add nsw i32 %conv, -1
890 %cmp = icmp ult i32 %sub, 4
891 br i1 %cmp, label %if.then, label %if.end
893 if.then: ; preds = %entry
894 %arrayidx = getelementptr inbounds half, half* %0, i32 %sub
895 %incdec.ptr = getelementptr inbounds half, half* %1, i32 1
896 %3 = load half, half* %1, align 4
897 %incdec.ptr6 = getelementptr inbounds half, half* %1, i32 2
898 %4 = load half, half* %incdec.ptr, align 4
899 %incdec.ptr7 = getelementptr inbounds half, half* %1, i32 3
900 %5 = load half, half* %incdec.ptr6, align 4
901 %6 = load half, half* %incdec.ptr7, align 4
902 %shr = lshr i32 %blockSize, 2
903 %cmp9146 = icmp eq i32 %shr, 0
904 %.pre161 = insertelement <8 x half> undef, half %3, i32 0
905 %.pre162 = shufflevector <8 x half> %.pre161, <8 x half> undef, <8 x i32> zeroinitializer
906 %.pre163 = insertelement <8 x half> undef, half %4, i32 0
907 %.pre164 = shufflevector <8 x half> %.pre163, <8 x half> undef, <8 x i32> zeroinitializer
908 %.pre165 = insertelement <8 x half> undef, half %5, i32 0
909 %.pre166 = shufflevector <8 x half> %.pre165, <8 x half> undef, <8 x i32> zeroinitializer
910 %.pre167 = insertelement <8 x half> undef, half %6, i32 0
911 %.pre168 = shufflevector <8 x half> %.pre167, <8 x half> undef, <8 x i32> zeroinitializer
912 br i1 %cmp9146, label %while.end, label %while.body.lr.ph
914 while.body.lr.ph: ; preds = %if.then
915 %7 = and i32 %blockSize, -4
916 %scevgep158 = getelementptr half, half* %pDst, i32 %7
919 while.body: ; preds = %while.body.lr.ph, %while.body
920 %pStateCur.0151 = phi half* [ %arrayidx, %while.body.lr.ph ], [ %add.ptr, %while.body ]
921 %pSamples.0150 = phi half* [ %0, %while.body.lr.ph ], [ %add.ptr24, %while.body ]
922 %pOutput.0149 = phi half* [ %pDst, %while.body.lr.ph ], [ %add.ptr23, %while.body ]
923 %pTempSrc.0148 = phi half* [ %pSrc, %while.body.lr.ph ], [ %add.ptr11, %while.body ]
924 %blkCnt.0147 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec, %while.body ]
925 %8 = bitcast half* %pTempSrc.0148 to <8 x half>*
926 %9 = load <8 x half>, <8 x half>* %8, align 4
927 %10 = bitcast half* %pStateCur.0151 to <8 x half>*
928 store <8 x half> %9, <8 x half>* %10, align 4
929 %add.ptr = getelementptr inbounds half, half* %pStateCur.0151, i32 4
930 %add.ptr11 = getelementptr inbounds half, half* %pTempSrc.0148, i32 4
931 %11 = bitcast half* %pSamples.0150 to <8 x half>*
932 %12 = load <8 x half>, <8 x half>* %11, align 4
933 %13 = fmul fast <8 x half> %12, %.pre162
934 %arrayidx12 = getelementptr inbounds half, half* %pSamples.0150, i32 1
935 %14 = bitcast half* %arrayidx12 to <8 x half>*
936 %15 = load <8 x half>, <8 x half>* %14, align 4
937 %mul = fmul fast <8 x half> %15, %.pre164
938 %add = fadd fast <8 x half> %mul, %13
939 %arrayidx13 = getelementptr inbounds half, half* %pSamples.0150, i32 2
940 %16 = bitcast half* %arrayidx13 to <8 x half>*
941 %17 = load <8 x half>, <8 x half>* %16, align 4
942 %mul16 = fmul fast <8 x half> %17, %.pre166
943 %add17 = fadd fast <8 x half> %add, %mul16
944 %arrayidx18 = getelementptr inbounds half, half* %pSamples.0150, i32 3
945 %18 = bitcast half* %arrayidx18 to <8 x half>*
946 %19 = load <8 x half>, <8 x half>* %18, align 4
947 %mul21 = fmul fast <8 x half> %19, %.pre168
948 %add22 = fadd fast <8 x half> %add17, %mul21
949 %20 = bitcast half* %pOutput.0149 to <8 x half>*
950 store <8 x half> %add22, <8 x half>* %20, align 4
951 %add.ptr23 = getelementptr inbounds half, half* %pOutput.0149, i32 4
952 %add.ptr24 = getelementptr inbounds half, half* %pSamples.0150, i32 4
953 %dec = add nsw i32 %blkCnt.0147, -1
954 %cmp9 = icmp eq i32 %dec, 0
955 br i1 %cmp9, label %while.end.loopexit, label %while.body
957 while.end.loopexit: ; preds = %while.body
958 %scevgep157 = getelementptr half, half* %pSrc, i32 %7
959 %scevgep159 = getelementptr half, half* %0, i32 %7
962 while.end: ; preds = %if.then, %while.end.loopexit
963 %pTempSrc.0.lcssa = phi half* [ %scevgep157, %while.end.loopexit ], [ %pSrc, %if.then ]
964 %pOutput.0.lcssa = phi half* [ %scevgep158, %while.end.loopexit ], [ %pDst, %if.then ]
965 %pSamples.0.lcssa = phi half* [ %scevgep159, %while.end.loopexit ], [ %0, %if.then ]
966 %pStateCur.0.lcssa = phi half* [ %add.ptr, %while.end.loopexit ], [ %arrayidx, %if.then ]
967 %and = and i32 %blockSize, 3
968 %21 = tail call <8 x i1> @llvm.arm.mve.vctp16(i32 %and)
969 %22 = bitcast half* %pTempSrc.0.lcssa to <8 x half>*
970 %23 = load <8 x half>, <8 x half>* %22, align 4
971 %24 = bitcast half* %pStateCur.0.lcssa to <8 x half>*
972 tail call void @llvm.masked.store.v8f16.p0v8f16(<8 x half> %23, <8 x half>* %24, i32 4, <8 x i1> %21)
973 %25 = bitcast half* %pSamples.0.lcssa to <8 x half>*
974 %26 = load <8 x half>, <8 x half>* %25, align 4
975 %27 = fmul fast <8 x half> %26, %.pre162
976 %arrayidx29 = getelementptr inbounds half, half* %pSamples.0.lcssa, i32 1
977 %28 = bitcast half* %arrayidx29 to <8 x half>*
978 %29 = load <8 x half>, <8 x half>* %28, align 4
979 %mul32 = fmul fast <8 x half> %29, %.pre164
980 %add33 = fadd fast <8 x half> %mul32, %27
981 %arrayidx34 = getelementptr inbounds half, half* %pSamples.0.lcssa, i32 2
982 %30 = bitcast half* %arrayidx34 to <8 x half>*
983 %31 = load <8 x half>, <8 x half>* %30, align 4
984 %mul37 = fmul fast <8 x half> %31, %.pre166
985 %add38 = fadd fast <8 x half> %add33, %mul37
986 %arrayidx39 = getelementptr inbounds half, half* %pSamples.0.lcssa, i32 3
987 %32 = bitcast half* %arrayidx39 to <8 x half>*
988 %33 = load <8 x half>, <8 x half>* %32, align 4
989 %mul42 = fmul fast <8 x half> %33, %.pre168
990 %add43 = fadd fast <8 x half> %add38, %mul42
991 %34 = bitcast half* %pOutput.0.lcssa to <8 x half>*
992 tail call void @llvm.masked.store.v8f16.p0v8f16(<8 x half> %add43, <8 x half>* %34, i32 4, <8 x i1> %21)
993 %.pre = load half*, half** %pState1, align 4
996 if.end: ; preds = %while.end, %entry
997 %35 = phi half* [ %.pre, %while.end ], [ %0, %entry ]
998 %arrayidx45 = getelementptr inbounds half, half* %35, i32 %blockSize
999 %shr47 = lshr i32 %conv, 2
1000 %cmp49141 = icmp eq i32 %shr47, 0
1001 br i1 %cmp49141, label %while.end55, label %while.body51.preheader
1003 while.body51.preheader: ; preds = %if.end
1004 %36 = and i32 %conv, 65532
1005 %37 = add i32 %36, %blockSize
1006 %scevgep = getelementptr half, half* %35, i32 %37
1007 br label %while.body51
1009 while.body51: ; preds = %while.body51.preheader, %while.body51
1010 %pTempSrc.1144 = phi half* [ %add.ptr52, %while.body51 ], [ %arrayidx45, %while.body51.preheader ]
1011 %pTempDest.0143 = phi half* [ %add.ptr53, %while.body51 ], [ %35, %while.body51.preheader ]
1012 %blkCnt.1142 = phi i32 [ %dec54, %while.body51 ], [ %shr47, %while.body51.preheader ]
1013 %38 = bitcast half* %pTempSrc.1144 to <8 x half>*
1014 %39 = load <8 x half>, <8 x half>* %38, align 4
1015 %40 = bitcast half* %pTempDest.0143 to <8 x half>*
1016 store <8 x half> %39, <8 x half>* %40, align 4
1017 %add.ptr52 = getelementptr inbounds half, half* %pTempSrc.1144, i32 4
1018 %add.ptr53 = getelementptr inbounds half, half* %pTempDest.0143, i32 4
1019 %dec54 = add nsw i32 %blkCnt.1142, -1
1020 %cmp49 = icmp eq i32 %dec54, 0
1021 br i1 %cmp49, label %while.end55.loopexit, label %while.body51
1023 while.end55.loopexit: ; preds = %while.body51
1024 %scevgep156 = getelementptr half, half* %35, i32 %36
1025 br label %while.end55
1027 while.end55: ; preds = %while.end55.loopexit, %if.end
1028 %pTempDest.0.lcssa = phi half* [ %35, %if.end ], [ %scevgep156, %while.end55.loopexit ]
1029 %pTempSrc.1.lcssa = phi half* [ %arrayidx45, %if.end ], [ %scevgep, %while.end55.loopexit ]
1030 %and56 = and i32 %conv, 3
1031 %cmp57 = icmp eq i32 %and56, 0
1032 br i1 %cmp57, label %if.end61, label %if.then59
1034 if.then59: ; preds = %while.end55
1035 %41 = tail call <8 x i1> @llvm.arm.mve.vctp16(i32 %and56)
1036 %42 = bitcast half* %pTempSrc.1.lcssa to <8 x half>*
1037 %43 = load <8 x half>, <8 x half>* %42, align 4
1038 %44 = bitcast half* %pTempDest.0.lcssa to <8 x half>*
1039 tail call void @llvm.masked.store.v8f16.p0v8f16(<8 x half> %43, <8 x half>* %44, i32 4, <8 x i1> %41)
1042 if.end61: ; preds = %while.end55, %if.then59
1047 define void @fir(%struct.arm_fir_instance_f32* nocapture readonly %S, half* nocapture readonly %pSrc, half* nocapture %pDst, i32 %blockSize) {
1049 ; CHECK: @ %bb.0: @ %entry
1050 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
1051 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
1052 ; CHECK-NEXT: .pad #24
1053 ; CHECK-NEXT: sub sp, #24
1054 ; CHECK-NEXT: cmp r3, #8
1055 ; CHECK-NEXT: str r1, [sp, #20] @ 4-byte Spill
1056 ; CHECK-NEXT: blo.w .LBB16_12
1057 ; CHECK-NEXT: @ %bb.1: @ %entry
1058 ; CHECK-NEXT: lsrs.w r12, r3, #2
1059 ; CHECK-NEXT: beq.w .LBB16_12
1060 ; CHECK-NEXT: @ %bb.2: @ %while.body.lr.ph
1061 ; CHECK-NEXT: ldrh r4, [r0]
1062 ; CHECK-NEXT: movs r1, #1
1063 ; CHECK-NEXT: ldrd r5, r3, [r0, #4]
1064 ; CHECK-NEXT: sub.w r0, r4, #8
1065 ; CHECK-NEXT: add.w r7, r0, r0, lsr #29
1066 ; CHECK-NEXT: and r0, r0, #7
1067 ; CHECK-NEXT: asrs r6, r7, #3
1068 ; CHECK-NEXT: cmp r6, #1
1070 ; CHECK-NEXT: asrgt r1, r7, #3
1071 ; CHECK-NEXT: add.w r7, r5, r4, lsl #1
1072 ; CHECK-NEXT: str r1, [sp] @ 4-byte Spill
1073 ; CHECK-NEXT: subs r1, r7, #2
1074 ; CHECK-NEXT: rsbs r7, r4, #0
1075 ; CHECK-NEXT: str r7, [sp, #8] @ 4-byte Spill
1076 ; CHECK-NEXT: add.w r7, r3, #16
1077 ; CHECK-NEXT: str r4, [sp, #12] @ 4-byte Spill
1078 ; CHECK-NEXT: str r7, [sp, #4] @ 4-byte Spill
1079 ; CHECK-NEXT: str r0, [sp, #16] @ 4-byte Spill
1080 ; CHECK-NEXT: b .LBB16_5
1081 ; CHECK-NEXT: .LBB16_3: @ %for.end
1082 ; CHECK-NEXT: @ in Loop: Header=BB16_5 Depth=1
1083 ; CHECK-NEXT: ldr r0, [sp, #16] @ 4-byte Reload
1084 ; CHECK-NEXT: wls lr, r0, .LBB16_4
1085 ; CHECK-NEXT: b .LBB16_9
1086 ; CHECK-NEXT: .LBB16_4: @ %while.end
1087 ; CHECK-NEXT: @ in Loop: Header=BB16_5 Depth=1
1088 ; CHECK-NEXT: ldr r0, [sp, #8] @ 4-byte Reload
1089 ; CHECK-NEXT: subs.w r12, r12, #1
1090 ; CHECK-NEXT: vstrb.8 q0, [r2], #8
1091 ; CHECK-NEXT: add.w r0, r5, r0, lsl #1
1092 ; CHECK-NEXT: add.w r5, r0, #8
1093 ; CHECK-NEXT: beq.w .LBB16_12
1094 ; CHECK-NEXT: .LBB16_5: @ %while.body
1095 ; CHECK-NEXT: @ =>This Loop Header: Depth=1
1096 ; CHECK-NEXT: @ Child Loop BB16_7 Depth 2
1097 ; CHECK-NEXT: @ Child Loop BB16_10 Depth 2
1098 ; CHECK-NEXT: ldr r0, [sp, #20] @ 4-byte Reload
1099 ; CHECK-NEXT: ldrh.w lr, [r3, #14]
1100 ; CHECK-NEXT: vldrw.u32 q0, [r0], #8
1101 ; CHECK-NEXT: ldrh.w r8, [r3, #12]
1102 ; CHECK-NEXT: ldrh r7, [r3, #10]
1103 ; CHECK-NEXT: ldrh r4, [r3, #8]
1104 ; CHECK-NEXT: ldrh r6, [r3, #6]
1105 ; CHECK-NEXT: ldrh.w r9, [r3, #4]
1106 ; CHECK-NEXT: ldrh.w r11, [r3, #2]
1107 ; CHECK-NEXT: ldrh.w r10, [r3]
1108 ; CHECK-NEXT: vstrb.8 q0, [r1], #8
1109 ; CHECK-NEXT: vldrw.u32 q0, [r5]
1110 ; CHECK-NEXT: str r0, [sp, #20] @ 4-byte Spill
1111 ; CHECK-NEXT: adds r0, r5, #2
1112 ; CHECK-NEXT: vldrw.u32 q1, [r0]
1113 ; CHECK-NEXT: vmul.f16 q0, q0, r10
1114 ; CHECK-NEXT: adds r0, r5, #6
1115 ; CHECK-NEXT: vfma.f16 q0, q1, r11
1116 ; CHECK-NEXT: vldrw.u32 q1, [r5, #4]
1117 ; CHECK-NEXT: vfma.f16 q0, q1, r9
1118 ; CHECK-NEXT: vldrw.u32 q1, [r0]
1119 ; CHECK-NEXT: add.w r0, r5, #10
1120 ; CHECK-NEXT: vfma.f16 q0, q1, r6
1121 ; CHECK-NEXT: vldrw.u32 q1, [r5, #8]
1122 ; CHECK-NEXT: vfma.f16 q0, q1, r4
1123 ; CHECK-NEXT: vldrw.u32 q1, [r0]
1124 ; CHECK-NEXT: add.w r0, r5, #14
1125 ; CHECK-NEXT: vfma.f16 q0, q1, r7
1126 ; CHECK-NEXT: vldrw.u32 q1, [r5, #12]
1127 ; CHECK-NEXT: adds r5, #16
1128 ; CHECK-NEXT: vfma.f16 q0, q1, r8
1129 ; CHECK-NEXT: vldrw.u32 q1, [r0]
1130 ; CHECK-NEXT: ldr r0, [sp, #12] @ 4-byte Reload
1131 ; CHECK-NEXT: vfma.f16 q0, q1, lr
1132 ; CHECK-NEXT: cmp r0, #16
1133 ; CHECK-NEXT: blo .LBB16_8
1134 ; CHECK-NEXT: @ %bb.6: @ %for.body.preheader
1135 ; CHECK-NEXT: @ in Loop: Header=BB16_5 Depth=1
1136 ; CHECK-NEXT: ldr r0, [sp] @ 4-byte Reload
1137 ; CHECK-NEXT: dls lr, r0
1138 ; CHECK-NEXT: ldr r6, [sp, #4] @ 4-byte Reload
1139 ; CHECK-NEXT: .LBB16_7: @ %for.body
1140 ; CHECK-NEXT: @ Parent Loop BB16_5 Depth=1
1141 ; CHECK-NEXT: @ => This Inner Loop Header: Depth=2
1142 ; CHECK-NEXT: ldrh r0, [r6], #16
1143 ; CHECK-NEXT: vldrw.u32 q1, [r5]
1144 ; CHECK-NEXT: adds r4, r5, #2
1145 ; CHECK-NEXT: vfma.f16 q0, q1, r0
1146 ; CHECK-NEXT: vldrw.u32 q1, [r4]
1147 ; CHECK-NEXT: ldrh r0, [r6, #-14]
1148 ; CHECK-NEXT: adds r4, r5, #6
1149 ; CHECK-NEXT: vfma.f16 q0, q1, r0
1150 ; CHECK-NEXT: ldrh r0, [r6, #-12]
1151 ; CHECK-NEXT: vldrw.u32 q1, [r5, #4]
1152 ; CHECK-NEXT: vfma.f16 q0, q1, r0
1153 ; CHECK-NEXT: vldrw.u32 q1, [r4]
1154 ; CHECK-NEXT: ldrh r0, [r6, #-10]
1155 ; CHECK-NEXT: add.w r4, r5, #10
1156 ; CHECK-NEXT: vfma.f16 q0, q1, r0
1157 ; CHECK-NEXT: ldrh r0, [r6, #-8]
1158 ; CHECK-NEXT: vldrw.u32 q1, [r5, #8]
1159 ; CHECK-NEXT: vfma.f16 q0, q1, r0
1160 ; CHECK-NEXT: vldrw.u32 q1, [r4]
1161 ; CHECK-NEXT: ldrh r0, [r6, #-6]
1162 ; CHECK-NEXT: ldrh r4, [r6, #-2]
1163 ; CHECK-NEXT: vfma.f16 q0, q1, r0
1164 ; CHECK-NEXT: ldrh r0, [r6, #-4]
1165 ; CHECK-NEXT: vldrw.u32 q1, [r5, #12]
1166 ; CHECK-NEXT: vfma.f16 q0, q1, r0
1167 ; CHECK-NEXT: add.w r0, r5, #14
1168 ; CHECK-NEXT: vldrw.u32 q1, [r0]
1169 ; CHECK-NEXT: adds r5, #16
1170 ; CHECK-NEXT: vfma.f16 q0, q1, r4
1171 ; CHECK-NEXT: le lr, .LBB16_7
1172 ; CHECK-NEXT: b .LBB16_3
1173 ; CHECK-NEXT: .LBB16_8: @ in Loop: Header=BB16_5 Depth=1
1174 ; CHECK-NEXT: ldr r6, [sp, #4] @ 4-byte Reload
1175 ; CHECK-NEXT: b .LBB16_3
1176 ; CHECK-NEXT: .LBB16_9: @ %while.body76.preheader
1177 ; CHECK-NEXT: @ in Loop: Header=BB16_5 Depth=1
1178 ; CHECK-NEXT: mov r0, r5
1179 ; CHECK-NEXT: .LBB16_10: @ %while.body76
1180 ; CHECK-NEXT: @ Parent Loop BB16_5 Depth=1
1181 ; CHECK-NEXT: @ => This Inner Loop Header: Depth=2
1182 ; CHECK-NEXT: ldrh r4, [r6], #2
1183 ; CHECK-NEXT: vldrh.u16 q1, [r0], #2
1184 ; CHECK-NEXT: vfma.f16 q0, q1, r4
1185 ; CHECK-NEXT: le lr, .LBB16_10
1186 ; CHECK-NEXT: @ %bb.11: @ %while.end.loopexit
1187 ; CHECK-NEXT: @ in Loop: Header=BB16_5 Depth=1
1188 ; CHECK-NEXT: ldr r0, [sp, #16] @ 4-byte Reload
1189 ; CHECK-NEXT: add.w r5, r5, r0, lsl #1
1190 ; CHECK-NEXT: b .LBB16_4
1191 ; CHECK-NEXT: .LBB16_12: @ %if.end
1192 ; CHECK-NEXT: add sp, #24
1193 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
1195 %pState1 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 1
1196 %0 = load half*, half** %pState1, align 4
1197 %pCoeffs2 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 2
1198 %1 = load half*, half** %pCoeffs2, align 4
1199 %numTaps3 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 0
1200 %2 = load i16, i16* %numTaps3, align 4
1201 %conv = zext i16 %2 to i32
1202 %cmp = icmp ugt i32 %blockSize, 7
1203 br i1 %cmp, label %if.then, label %if.end
1205 if.then: ; preds = %entry
1206 %shr = lshr i32 %blockSize, 2
1207 %cmp5217 = icmp eq i32 %shr, 0
1208 br i1 %cmp5217, label %if.end, label %while.body.lr.ph
1210 while.body.lr.ph: ; preds = %if.then
1211 %sub = add nsw i32 %conv, -1
1212 %arrayidx = getelementptr inbounds half, half* %0, i32 %sub
1213 %incdec.ptr = getelementptr inbounds half, half* %1, i32 1
1214 %incdec.ptr7 = getelementptr inbounds half, half* %1, i32 2
1215 %incdec.ptr8 = getelementptr inbounds half, half* %1, i32 3
1216 %incdec.ptr9 = getelementptr inbounds half, half* %1, i32 4
1217 %incdec.ptr10 = getelementptr inbounds half, half* %1, i32 5
1218 %incdec.ptr11 = getelementptr inbounds half, half* %1, i32 6
1219 %incdec.ptr12 = getelementptr inbounds half, half* %1, i32 7
1220 %sub37 = add nsw i32 %conv, -8
1221 %div = sdiv i32 %sub37, 8
1222 %pCoeffsCur.0199 = getelementptr inbounds half, half* %1, i32 8
1223 %cmp38201 = icmp ugt i16 %2, 15
1224 %and = and i32 %sub37, 7
1225 %cmp74210 = icmp eq i32 %and, 0
1226 %idx.neg = sub nsw i32 0, %conv
1227 %3 = icmp sgt i32 %div, 1
1228 %smax = select i1 %3, i32 %div, i32 1
1229 br label %while.body
1231 while.body: ; preds = %while.body.lr.ph, %while.end
1232 %blkCnt.0222 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec84, %while.end ]
1233 %pStateCur.0221 = phi half* [ %arrayidx, %while.body.lr.ph ], [ %add.ptr, %while.end ]
1234 %pSamples.0220 = phi half* [ %0, %while.body.lr.ph ], [ %add.ptr83, %while.end ]
1235 %pTempSrc.0219 = phi half* [ %pSrc, %while.body.lr.ph ], [ %add.ptr14, %while.end ]
1236 %pOutput.0218 = phi half* [ %pDst, %while.body.lr.ph ], [ %add.ptr81, %while.end ]
1237 %4 = load half, half* %1, align 4
1238 %5 = load half, half* %incdec.ptr, align 4
1239 %6 = load half, half* %incdec.ptr7, align 4
1240 %7 = load half, half* %incdec.ptr8, align 4
1241 %8 = load half, half* %incdec.ptr9, align 4
1242 %9 = load half, half* %incdec.ptr10, align 4
1243 %10 = load half, half* %incdec.ptr11, align 4
1244 %11 = load half, half* %incdec.ptr12, align 4
1245 %12 = bitcast half* %pTempSrc.0219 to <8 x half>*
1246 %13 = load <8 x half>, <8 x half>* %12, align 4
1247 %14 = bitcast half* %pStateCur.0221 to <8 x half>*
1248 store <8 x half> %13, <8 x half>* %14, align 4
1249 %add.ptr = getelementptr inbounds half, half* %pStateCur.0221, i32 4
1250 %add.ptr14 = getelementptr inbounds half, half* %pTempSrc.0219, i32 4
1251 %15 = bitcast half* %pSamples.0220 to <8 x half>*
1252 %16 = load <8 x half>, <8 x half>* %15, align 4
1253 %.splatinsert = insertelement <8 x half> undef, half %4, i32 0
1254 %.splat = shufflevector <8 x half> %.splatinsert, <8 x half> undef, <8 x i32> zeroinitializer
1255 %17 = fmul fast <8 x half> %16, %.splat
1256 %arrayidx15 = getelementptr inbounds half, half* %pSamples.0220, i32 1
1257 %18 = bitcast half* %arrayidx15 to <8 x half>*
1258 %19 = load <8 x half>, <8 x half>* %18, align 4
1259 %.splatinsert16 = insertelement <8 x half> undef, half %5, i32 0
1260 %.splat17 = shufflevector <8 x half> %.splatinsert16, <8 x half> undef, <8 x i32> zeroinitializer
1261 %20 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %19, <8 x half> %.splat17, <8 x half> %17)
1262 %arrayidx18 = getelementptr inbounds half, half* %pSamples.0220, i32 2
1263 %21 = bitcast half* %arrayidx18 to <8 x half>*
1264 %22 = load <8 x half>, <8 x half>* %21, align 4
1265 %.splatinsert19 = insertelement <8 x half> undef, half %6, i32 0
1266 %.splat20 = shufflevector <8 x half> %.splatinsert19, <8 x half> undef, <8 x i32> zeroinitializer
1267 %23 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %22, <8 x half> %.splat20, <8 x half> %20)
1268 %arrayidx21 = getelementptr inbounds half, half* %pSamples.0220, i32 3
1269 %24 = bitcast half* %arrayidx21 to <8 x half>*
1270 %25 = load <8 x half>, <8 x half>* %24, align 4
1271 %.splatinsert22 = insertelement <8 x half> undef, half %7, i32 0
1272 %.splat23 = shufflevector <8 x half> %.splatinsert22, <8 x half> undef, <8 x i32> zeroinitializer
1273 %26 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %25, <8 x half> %.splat23, <8 x half> %23)
1274 %arrayidx24 = getelementptr inbounds half, half* %pSamples.0220, i32 4
1275 %27 = bitcast half* %arrayidx24 to <8 x half>*
1276 %28 = load <8 x half>, <8 x half>* %27, align 4
1277 %.splatinsert25 = insertelement <8 x half> undef, half %8, i32 0
1278 %.splat26 = shufflevector <8 x half> %.splatinsert25, <8 x half> undef, <8 x i32> zeroinitializer
1279 %29 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %28, <8 x half> %.splat26, <8 x half> %26)
1280 %arrayidx27 = getelementptr inbounds half, half* %pSamples.0220, i32 5
1281 %30 = bitcast half* %arrayidx27 to <8 x half>*
1282 %31 = load <8 x half>, <8 x half>* %30, align 4
1283 %.splatinsert28 = insertelement <8 x half> undef, half %9, i32 0
1284 %.splat29 = shufflevector <8 x half> %.splatinsert28, <8 x half> undef, <8 x i32> zeroinitializer
1285 %32 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %31, <8 x half> %.splat29, <8 x half> %29)
1286 %arrayidx30 = getelementptr inbounds half, half* %pSamples.0220, i32 6
1287 %33 = bitcast half* %arrayidx30 to <8 x half>*
1288 %34 = load <8 x half>, <8 x half>* %33, align 4
1289 %.splatinsert31 = insertelement <8 x half> undef, half %10, i32 0
1290 %.splat32 = shufflevector <8 x half> %.splatinsert31, <8 x half> undef, <8 x i32> zeroinitializer
1291 %35 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %34, <8 x half> %.splat32, <8 x half> %32)
1292 %arrayidx33 = getelementptr inbounds half, half* %pSamples.0220, i32 7
1293 %36 = bitcast half* %arrayidx33 to <8 x half>*
1294 %37 = load <8 x half>, <8 x half>* %36, align 4
1295 %.splatinsert34 = insertelement <8 x half> undef, half %11, i32 0
1296 %.splat35 = shufflevector <8 x half> %.splatinsert34, <8 x half> undef, <8 x i32> zeroinitializer
1297 %38 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %37, <8 x half> %.splat35, <8 x half> %35)
1298 %pSamples.1200 = getelementptr inbounds half, half* %pSamples.0220, i32 8
1299 br i1 %cmp38201, label %for.body, label %for.end
1301 for.body: ; preds = %while.body, %for.body
1302 %pSamples.1207 = phi half* [ %pSamples.1, %for.body ], [ %pSamples.1200, %while.body ]
1303 %pCoeffsCur.0206 = phi half* [ %pCoeffsCur.0, %for.body ], [ %pCoeffsCur.0199, %while.body ]
1304 %.pn205 = phi half* [ %pCoeffsCur.0206, %for.body ], [ %1, %while.body ]
1305 %i.0204 = phi i32 [ %inc, %for.body ], [ 0, %while.body ]
1306 %vecAcc0.0203 = phi <8 x half> [ %70, %for.body ], [ %38, %while.body ]
1307 %pSamples.0.pn202 = phi half* [ %pSamples.1207, %for.body ], [ %pSamples.0220, %while.body ]
1308 %incdec.ptr40 = getelementptr inbounds half, half* %.pn205, i32 9
1309 %39 = load half, half* %pCoeffsCur.0206, align 4
1310 %incdec.ptr41 = getelementptr inbounds half, half* %.pn205, i32 10
1311 %40 = load half, half* %incdec.ptr40, align 4
1312 %incdec.ptr42 = getelementptr inbounds half, half* %.pn205, i32 11
1313 %41 = load half, half* %incdec.ptr41, align 4
1314 %incdec.ptr43 = getelementptr inbounds half, half* %.pn205, i32 12
1315 %42 = load half, half* %incdec.ptr42, align 4
1316 %incdec.ptr44 = getelementptr inbounds half, half* %.pn205, i32 13
1317 %43 = load half, half* %incdec.ptr43, align 4
1318 %incdec.ptr45 = getelementptr inbounds half, half* %.pn205, i32 14
1319 %44 = load half, half* %incdec.ptr44, align 4
1320 %incdec.ptr46 = getelementptr inbounds half, half* %.pn205, i32 15
1321 %45 = load half, half* %incdec.ptr45, align 4
1322 %46 = load half, half* %incdec.ptr46, align 4
1323 %47 = bitcast half* %pSamples.1207 to <8 x half>*
1324 %48 = load <8 x half>, <8 x half>* %47, align 4
1325 %.splatinsert48 = insertelement <8 x half> undef, half %39, i32 0
1326 %.splat49 = shufflevector <8 x half> %.splatinsert48, <8 x half> undef, <8 x i32> zeroinitializer
1327 %49 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %48, <8 x half> %.splat49, <8 x half> %vecAcc0.0203)
1328 %arrayidx50 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 9
1329 %50 = bitcast half* %arrayidx50 to <8 x half>*
1330 %51 = load <8 x half>, <8 x half>* %50, align 4
1331 %.splatinsert51 = insertelement <8 x half> undef, half %40, i32 0
1332 %.splat52 = shufflevector <8 x half> %.splatinsert51, <8 x half> undef, <8 x i32> zeroinitializer
1333 %52 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %51, <8 x half> %.splat52, <8 x half> %49)
1334 %arrayidx53 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 10
1335 %53 = bitcast half* %arrayidx53 to <8 x half>*
1336 %54 = load <8 x half>, <8 x half>* %53, align 4
1337 %.splatinsert54 = insertelement <8 x half> undef, half %41, i32 0
1338 %.splat55 = shufflevector <8 x half> %.splatinsert54, <8 x half> undef, <8 x i32> zeroinitializer
1339 %55 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %54, <8 x half> %.splat55, <8 x half> %52)
1340 %arrayidx56 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 11
1341 %56 = bitcast half* %arrayidx56 to <8 x half>*
1342 %57 = load <8 x half>, <8 x half>* %56, align 4
1343 %.splatinsert57 = insertelement <8 x half> undef, half %42, i32 0
1344 %.splat58 = shufflevector <8 x half> %.splatinsert57, <8 x half> undef, <8 x i32> zeroinitializer
1345 %58 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %57, <8 x half> %.splat58, <8 x half> %55)
1346 %arrayidx59 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 12
1347 %59 = bitcast half* %arrayidx59 to <8 x half>*
1348 %60 = load <8 x half>, <8 x half>* %59, align 4
1349 %.splatinsert60 = insertelement <8 x half> undef, half %43, i32 0
1350 %.splat61 = shufflevector <8 x half> %.splatinsert60, <8 x half> undef, <8 x i32> zeroinitializer
1351 %61 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %60, <8 x half> %.splat61, <8 x half> %58)
1352 %arrayidx62 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 13
1353 %62 = bitcast half* %arrayidx62 to <8 x half>*
1354 %63 = load <8 x half>, <8 x half>* %62, align 4
1355 %.splatinsert63 = insertelement <8 x half> undef, half %44, i32 0
1356 %.splat64 = shufflevector <8 x half> %.splatinsert63, <8 x half> undef, <8 x i32> zeroinitializer
1357 %64 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %63, <8 x half> %.splat64, <8 x half> %61)
1358 %arrayidx65 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 14
1359 %65 = bitcast half* %arrayidx65 to <8 x half>*
1360 %66 = load <8 x half>, <8 x half>* %65, align 4
1361 %.splatinsert66 = insertelement <8 x half> undef, half %45, i32 0
1362 %.splat67 = shufflevector <8 x half> %.splatinsert66, <8 x half> undef, <8 x i32> zeroinitializer
1363 %67 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %66, <8 x half> %.splat67, <8 x half> %64)
1364 %arrayidx68 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 15
1365 %68 = bitcast half* %arrayidx68 to <8 x half>*
1366 %69 = load <8 x half>, <8 x half>* %68, align 4
1367 %.splatinsert69 = insertelement <8 x half> undef, half %46, i32 0
1368 %.splat70 = shufflevector <8 x half> %.splatinsert69, <8 x half> undef, <8 x i32> zeroinitializer
1369 %70 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %69, <8 x half> %.splat70, <8 x half> %67)
1370 %inc = add nuw nsw i32 %i.0204, 1
1371 %pCoeffsCur.0 = getelementptr inbounds half, half* %pCoeffsCur.0206, i32 8
1372 %pSamples.1 = getelementptr inbounds half, half* %pSamples.1207, i32 8
1373 %exitcond = icmp eq i32 %inc, %smax
1374 br i1 %exitcond, label %for.end, label %for.body
1376 for.end: ; preds = %for.body, %while.body
1377 %vecAcc0.0.lcssa = phi <8 x half> [ %38, %while.body ], [ %70, %for.body ]
1378 %pCoeffsCur.0.lcssa = phi half* [ %pCoeffsCur.0199, %while.body ], [ %pCoeffsCur.0, %for.body ]
1379 %pSamples.1.lcssa = phi half* [ %pSamples.1200, %while.body ], [ %pSamples.1, %for.body ]
1380 br i1 %cmp74210, label %while.end, label %while.body76
1382 while.body76: ; preds = %for.end, %while.body76
1383 %pCoeffsCur.1214 = phi half* [ %incdec.ptr77, %while.body76 ], [ %pCoeffsCur.0.lcssa, %for.end ]
1384 %vecAcc0.1213 = phi <8 x half> [ %74, %while.body76 ], [ %vecAcc0.0.lcssa, %for.end ]
1385 %numCnt.0212 = phi i32 [ %dec, %while.body76 ], [ %and, %for.end ]
1386 %pSamples.2211 = phi half* [ %incdec.ptr80, %while.body76 ], [ %pSamples.1.lcssa, %for.end ]
1387 %incdec.ptr77 = getelementptr inbounds half, half* %pCoeffsCur.1214, i32 1
1388 %71 = load half, half* %pCoeffsCur.1214, align 4
1389 %72 = bitcast half* %pSamples.2211 to <8 x half>*
1390 %73 = load <8 x half>, <8 x half>* %72, align 4
1391 %.splatinsert78 = insertelement <8 x half> undef, half %71, i32 0
1392 %.splat79 = shufflevector <8 x half> %.splatinsert78, <8 x half> undef, <8 x i32> zeroinitializer
1393 %74 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %73, <8 x half> %.splat79, <8 x half> %vecAcc0.1213)
1394 %incdec.ptr80 = getelementptr inbounds half, half* %pSamples.2211, i32 1
1395 %dec = add nsw i32 %numCnt.0212, -1
1396 %cmp74 = icmp sgt i32 %numCnt.0212, 1
1397 br i1 %cmp74, label %while.body76, label %while.end.loopexit
1399 while.end.loopexit: ; preds = %while.body76
1400 %scevgep = getelementptr half, half* %pSamples.1.lcssa, i32 %and
1403 while.end: ; preds = %while.end.loopexit, %for.end
1404 %pSamples.2.lcssa = phi half* [ %pSamples.1.lcssa, %for.end ], [ %scevgep, %while.end.loopexit ]
1405 %vecAcc0.1.lcssa = phi <8 x half> [ %vecAcc0.0.lcssa, %for.end ], [ %74, %while.end.loopexit ]
1406 %75 = bitcast half* %pOutput.0218 to <8 x half>*
1407 store <8 x half> %vecAcc0.1.lcssa, <8 x half>* %75, align 4
1408 %add.ptr81 = getelementptr inbounds half, half* %pOutput.0218, i32 4
1409 %add.ptr82 = getelementptr inbounds half, half* %pSamples.2.lcssa, i32 4
1410 %add.ptr83 = getelementptr inbounds half, half* %add.ptr82, i32 %idx.neg
1411 %dec84 = add nsw i32 %blkCnt.0222, -1
1412 %cmp5 = icmp eq i32 %dec84, 0
1413 br i1 %cmp5, label %if.end, label %while.body
1415 if.end: ; preds = %while.end, %if.then, %entry
1419 %struct.arm_biquad_cascade_df2T_instance_f16 = type { i8, half*, half* }
1420 define void @arm_biquad_cascade_df2T_f16(%struct.arm_biquad_cascade_df2T_instance_f16* nocapture readonly %S, half* nocapture readonly %pSrc, half* nocapture %pDst, i32 %blockSize) {
1421 ; CHECK-LABEL: arm_biquad_cascade_df2T_f16:
1422 ; CHECK: @ %bb.0: @ %entry
1423 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, lr}
1424 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, lr}
1425 ; CHECK-NEXT: .pad #4
1426 ; CHECK-NEXT: sub sp, #4
1427 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
1428 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
1429 ; CHECK-NEXT: ldrd r12, r6, [r0, #4]
1430 ; CHECK-NEXT: vmov.i32 q0, #0x0
1431 ; CHECK-NEXT: ldrb r0, [r0]
1432 ; CHECK-NEXT: and r8, r3, #1
1433 ; CHECK-NEXT: vldr.16 s0, .LCPI17_0
1434 ; CHECK-NEXT: lsr.w r9, r3, #1
1435 ; CHECK-NEXT: b .LBB17_3
1436 ; CHECK-NEXT: .LBB17_1: @ %if.else
1437 ; CHECK-NEXT: @ in Loop: Header=BB17_3 Depth=1
1438 ; CHECK-NEXT: vmovx.f16 s5, s4
1439 ; CHECK-NEXT: vstr.16 s4, [r12]
1440 ; CHECK-NEXT: .LBB17_2: @ %if.end
1441 ; CHECK-NEXT: @ in Loop: Header=BB17_3 Depth=1
1442 ; CHECK-NEXT: vstr.16 s5, [r12, #2]
1443 ; CHECK-NEXT: adds r6, #10
1444 ; CHECK-NEXT: subs r0, #1
1445 ; CHECK-NEXT: add.w r12, r12, #4
1446 ; CHECK-NEXT: mov r1, r2
1447 ; CHECK-NEXT: beq .LBB17_8
1448 ; CHECK-NEXT: .LBB17_3: @ %do.body
1449 ; CHECK-NEXT: @ =>This Loop Header: Depth=1
1450 ; CHECK-NEXT: @ Child Loop BB17_5 Depth 2
1451 ; CHECK-NEXT: vldrh.u16 q2, [r6]
1452 ; CHECK-NEXT: movs r5, #0
1453 ; CHECK-NEXT: vmov q4, q2
1454 ; CHECK-NEXT: vshlc q4, r5, #16
1455 ; CHECK-NEXT: vldrh.u16 q3, [r6, #4]
1456 ; CHECK-NEXT: vmov q5, q3
1457 ; CHECK-NEXT: vshlc q5, r5, #16
1458 ; CHECK-NEXT: vldrh.u16 q1, [r12]
1459 ; CHECK-NEXT: vmov.f32 s5, s1
1460 ; CHECK-NEXT: mov r5, r2
1461 ; CHECK-NEXT: wls lr, r9, .LBB17_6
1462 ; CHECK-NEXT: @ %bb.4: @ %while.body.preheader
1463 ; CHECK-NEXT: @ in Loop: Header=BB17_3 Depth=1
1464 ; CHECK-NEXT: mov r5, r2
1465 ; CHECK-NEXT: .LBB17_5: @ %while.body
1466 ; CHECK-NEXT: @ Parent Loop BB17_3 Depth=1
1467 ; CHECK-NEXT: @ => This Inner Loop Header: Depth=2
1468 ; CHECK-NEXT: ldrh r7, [r1], #4
1469 ; CHECK-NEXT: vmov r3, s0
1470 ; CHECK-NEXT: vfma.f16 q1, q2, r7
1471 ; CHECK-NEXT: ldrh r4, [r1, #-2]
1472 ; CHECK-NEXT: vmov.u16 r7, q1[0]
1473 ; CHECK-NEXT: vfma.f16 q1, q3, r7
1474 ; CHECK-NEXT: vins.f16 s5, s0
1475 ; CHECK-NEXT: vfma.f16 q1, q4, r4
1476 ; CHECK-NEXT: vmov.u16 r4, q1[1]
1477 ; CHECK-NEXT: vfma.f16 q1, q5, r4
1478 ; CHECK-NEXT: strh r4, [r5, #2]
1479 ; CHECK-NEXT: vmov.f32 s4, s5
1480 ; CHECK-NEXT: strh r7, [r5], #4
1481 ; CHECK-NEXT: vmov.16 q1[2], r3
1482 ; CHECK-NEXT: le lr, .LBB17_5
1483 ; CHECK-NEXT: .LBB17_6: @ %while.end
1484 ; CHECK-NEXT: @ in Loop: Header=BB17_3 Depth=1
1485 ; CHECK-NEXT: cmp.w r8, #0
1486 ; CHECK-NEXT: beq .LBB17_1
1487 ; CHECK-NEXT: @ %bb.7: @ %if.then
1488 ; CHECK-NEXT: @ in Loop: Header=BB17_3 Depth=1
1489 ; CHECK-NEXT: ldrh r1, [r1]
1490 ; CHECK-NEXT: vfma.f16 q1, q2, r1
1491 ; CHECK-NEXT: vmov.u16 r1, q1[0]
1492 ; CHECK-NEXT: vfma.f16 q1, q3, r1
1493 ; CHECK-NEXT: strh r1, [r5]
1494 ; CHECK-NEXT: vmovx.f16 s2, s4
1495 ; CHECK-NEXT: vstr.16 s2, [r12]
1496 ; CHECK-NEXT: b .LBB17_2
1497 ; CHECK-NEXT: .LBB17_8: @ %do.end
1498 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
1499 ; CHECK-NEXT: add sp, #4
1500 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, pc}
1501 ; CHECK-NEXT: .p2align 1
1502 ; CHECK-NEXT: @ %bb.9:
1503 ; CHECK-NEXT: .LCPI17_0:
1504 ; CHECK-NEXT: .short 0x0000 @ half 0
1506 %pState1 = getelementptr inbounds %struct.arm_biquad_cascade_df2T_instance_f16, %struct.arm_biquad_cascade_df2T_instance_f16* %S, i32 0, i32 1
1507 %0 = load half*, half** %pState1, align 4
1508 %numStages = getelementptr inbounds %struct.arm_biquad_cascade_df2T_instance_f16, %struct.arm_biquad_cascade_df2T_instance_f16* %S, i32 0, i32 0
1509 %1 = load i8, i8* %numStages, align 4
1510 %conv = zext i8 %1 to i32
1511 %pCoeffs = getelementptr inbounds %struct.arm_biquad_cascade_df2T_instance_f16, %struct.arm_biquad_cascade_df2T_instance_f16* %S, i32 0, i32 2
1512 %2 = load half*, half** %pCoeffs, align 4
1513 %div = lshr i32 %blockSize, 1
1514 %cmp.not90 = icmp eq i32 %div, 0
1515 %and = and i32 %blockSize, 1
1516 %tobool.not = icmp eq i32 %and, 0
1519 do.body: ; preds = %if.end, %entry
1520 %stage.0 = phi i32 [ %conv, %entry ], [ %dec23, %if.end ]
1521 %pCurCoeffs.0 = phi half* [ %2, %entry ], [ %add.ptr2, %if.end ]
1522 %pState.0 = phi half* [ %0, %entry ], [ %pState.1, %if.end ]
1523 %pIn.0 = phi half* [ %pSrc, %entry ], [ %pDst, %if.end ]
1524 %3 = bitcast half* %pCurCoeffs.0 to <8 x half>*
1525 %4 = load <8 x half>, <8 x half>* %3, align 2
1526 %add.ptr = getelementptr inbounds half, half* %pCurCoeffs.0, i32 2
1527 %5 = bitcast half* %add.ptr to <8 x half>*
1528 %6 = load <8 x half>, <8 x half>* %5, align 2
1529 %add.ptr2 = getelementptr inbounds half, half* %pCurCoeffs.0, i32 5
1530 %7 = bitcast half* %pState.0 to <8 x half>*
1531 %8 = load <8 x half>, <8 x half>* %7, align 2
1532 %9 = shufflevector <8 x half> %8, <8 x half> <half poison, half poison, half 0xH0000, half 0xH0000, half poison, half poison, half poison, half poison>, <8 x i32> <i32 0, i32 1, i32 10, i32 11, i32 4, i32 5, i32 6, i32 7>
1533 %10 = bitcast <8 x half> %4 to <8 x i16>
1534 %11 = tail call { i32, <8 x i16> } @llvm.arm.mve.vshlc.v8i16(<8 x i16> %10, i32 0, i32 16)
1535 %12 = extractvalue { i32, <8 x i16> } %11, 0
1536 %13 = extractvalue { i32, <8 x i16> } %11, 1
1537 %14 = bitcast <8 x i16> %13 to <8 x half>
1538 %15 = bitcast <8 x half> %6 to <8 x i16>
1539 %16 = tail call { i32, <8 x i16> } @llvm.arm.mve.vshlc.v8i16(<8 x i16> %15, i32 %12, i32 16)
1540 %17 = extractvalue { i32, <8 x i16> } %16, 1
1541 %18 = bitcast <8 x i16> %17 to <8 x half>
1542 br i1 %cmp.not90, label %while.end, label %while.body
1544 while.body: ; preds = %do.body, %while.body
1545 %pIn.194 = phi half* [ %incdec.ptr4, %while.body ], [ %pIn.0, %do.body ]
1546 %state.093 = phi <8 x half> [ %30, %while.body ], [ %9, %do.body ]
1547 %pOut.192 = phi half* [ %incdec.ptr12, %while.body ], [ %pDst, %do.body ]
1548 %sample.091 = phi i32 [ %dec, %while.body ], [ %div, %do.body ]
1549 %incdec.ptr = getelementptr inbounds half, half* %pIn.194, i32 1
1550 %19 = load half, half* %pIn.194, align 2
1551 %incdec.ptr4 = getelementptr inbounds half, half* %pIn.194, i32 2
1552 %20 = load half, half* %incdec.ptr, align 2
1553 %.splatinsert = insertelement <8 x half> poison, half %19, i32 0
1554 %.splat = shufflevector <8 x half> %.splatinsert, <8 x half> poison, <8 x i32> zeroinitializer
1555 %21 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %4, <8 x half> %.splat, <8 x half> %state.093)
1556 %22 = extractelement <8 x half> %21, i32 0
1557 %.splat6 = shufflevector <8 x half> %21, <8 x half> poison, <8 x i32> zeroinitializer
1558 %23 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %6, <8 x half> %.splat6, <8 x half> %21)
1559 %24 = insertelement <8 x half> %23, half 0xH0000, i32 3
1560 %.splatinsert7 = insertelement <8 x half> poison, half %20, i32 0
1561 %.splat8 = shufflevector <8 x half> %.splatinsert7, <8 x half> poison, <8 x i32> zeroinitializer
1562 %25 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %14, <8 x half> %.splat8, <8 x half> %24)
1563 %26 = extractelement <8 x half> %25, i32 1
1564 %.splat10 = shufflevector <8 x half> %25, <8 x half> undef, <8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
1565 %27 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %18, <8 x half> %.splat10, <8 x half> %25)
1566 %28 = shufflevector <8 x half> %27, <8 x half> undef, <8 x i32> <i32 2, i32 undef, i32 undef, i32 3, i32 4, i32 5, i32 6, i32 7>
1567 %29 = insertelement <8 x half> %28, half 0xH0000, i32 2
1568 %30 = shufflevector <8 x half> %29, <8 x half> %27, <8 x i32> <i32 0, i32 11, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1569 %incdec.ptr11 = getelementptr inbounds half, half* %pOut.192, i32 1
1570 store half %22, half* %pOut.192, align 2
1571 %incdec.ptr12 = getelementptr inbounds half, half* %pOut.192, i32 2
1572 store half %26, half* %incdec.ptr11, align 2
1573 %dec = add nsw i32 %sample.091, -1
1574 %cmp.not = icmp eq i32 %dec, 0
1575 br i1 %cmp.not, label %while.end, label %while.body
1577 while.end: ; preds = %while.body, %do.body
1578 %pOut.1.lcssa = phi half* [ %pDst, %do.body ], [ %incdec.ptr12, %while.body ]
1579 %state.0.lcssa = phi <8 x half> [ %9, %do.body ], [ %30, %while.body ]
1580 %pIn.1.lcssa = phi half* [ %pIn.0, %do.body ], [ %incdec.ptr4, %while.body ]
1581 br i1 %tobool.not, label %if.else, label %if.then
1583 if.then: ; preds = %while.end
1584 %31 = load half, half* %pIn.1.lcssa, align 2
1585 %.splatinsert14 = insertelement <8 x half> poison, half %31, i32 0
1586 %.splat15 = shufflevector <8 x half> %.splatinsert14, <8 x half> poison, <8 x i32> zeroinitializer
1587 %32 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %4, <8 x half> %.splat15, <8 x half> %state.0.lcssa)
1588 %33 = extractelement <8 x half> %32, i32 0
1589 %.splat17 = shufflevector <8 x half> %32, <8 x half> poison, <8 x i32> zeroinitializer
1590 %34 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %6, <8 x half> %.splat17, <8 x half> %32)
1591 store half %33, half* %pOut.1.lcssa, align 2
1592 %35 = extractelement <8 x half> %34, i32 1
1593 store half %35, half* %pState.0, align 2
1594 %36 = extractelement <8 x half> %34, i32 2
1597 if.else: ; preds = %while.end
1598 %37 = extractelement <8 x half> %state.0.lcssa, i32 0
1599 store half %37, half* %pState.0, align 2
1600 %38 = extractelement <8 x half> %state.0.lcssa, i32 1
1603 if.end: ; preds = %if.else, %if.then
1604 %.sink = phi half [ %38, %if.else ], [ %36, %if.then ]
1605 %39 = getelementptr inbounds half, half* %pState.0, i32 1
1606 store half %.sink, half* %39, align 2
1607 %pState.1 = getelementptr inbounds half, half* %pState.0, i32 2
1608 %dec23 = add i32 %stage.0, -1
1609 %cmp24.not = icmp eq i32 %dec23, 0
1610 br i1 %cmp24.not, label %do.end, label %do.body
1612 do.end: ; preds = %if.end
1616 define arm_aapcs_vfpcc half @vecAddAcrossF16Mve(<8 x half> %in) {
1617 ; CHECK-LABEL: vecAddAcrossF16Mve:
1618 ; CHECK: @ %bb.0: @ %entry
1619 ; CHECK-NEXT: vrev32.16 q1, q0
1620 ; CHECK-NEXT: vadd.f16 q0, q1, q0
1621 ; CHECK-NEXT: vrev64.32 q1, q0
1622 ; CHECK-NEXT: vadd.f16 q0, q0, q1
1623 ; CHECK-NEXT: vadd.f16 s0, s0, s2
1626 %0 = shufflevector <8 x half> %in, <8 x half> poison, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
1627 %1 = fadd fast <8 x half> %0, %in
1628 %2 = bitcast <8 x half> %1 to <4 x i32>
1629 %3 = shufflevector <4 x i32> %2, <4 x i32> poison, <4 x i32> <i32 1, i32 undef, i32 3, i32 undef>
1630 %4 = bitcast <4 x i32> %3 to <8 x half>
1631 %5 = fadd fast <8 x half> %1, %4
1632 %6 = extractelement <8 x half> %5, i32 0
1633 %7 = extractelement <8 x half> %5, i32 4
1634 %add = fadd fast half %6, %7
1638 declare { i32, <8 x i16> } @llvm.arm.mve.vshlc.v8i16(<8 x i16>, i32, i32)
1639 declare void @llvm.assume(i1)
1640 declare <8 x i1> @llvm.arm.mve.vctp16(i32)
1641 declare <8 x half> @llvm.fma.v8f16(<8 x half>, <8 x half>, <8 x half>)
1642 declare void @llvm.masked.store.v8f16.p0v8f16(<8 x half>, <8 x half>*, i32 immarg, <8 x i1>)