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
3
4define arm_aapcs_vfpcc void @test_fadd(float* noalias nocapture readonly %A, float %B, float* noalias nocapture %C, i32 %n) {
5; CHECK-LABEL: test_fadd:
6; CHECK:       @ %bb.0: @ %entry
7; CHECK-NEXT:    cmp r2, #1
8; CHECK-NEXT:    it lt
9; CHECK-NEXT:    bxlt lr
10; CHECK-NEXT:  .LBB0_1: @ %vector.ph
11; CHECK-NEXT:    vmov 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, #4
16; CHECK-NEXT:    vadd.f32 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
20; CHECK-NEXT:    bx lr
21entry:
22  %0 = and i32 %n, 7
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
27
28vector.ph:                                        ; preds = %entry
29  %broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0
30  %broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
31  br label %vector.body
32
33vector.body:                                      ; preds = %vector.body, %vector.ph
34  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
35  %1 = getelementptr inbounds float, float* %A, i32 %index
36  %2 = bitcast float* %1 to <4 x float>*
37  %wide.load = load <4 x float>, <4 x float>* %2, align 4
38  %3 = fadd fast <4 x float> %wide.load, %broadcast.splat11
39  %4 = getelementptr inbounds float, float* %C, i32 %index
40  %5 = bitcast float* %4 to <4 x float>*
41  store <4 x float> %3, <4 x float>* %5, align 4
42  %index.next = add i32 %index, 4
43  %6 = icmp eq i32 %index.next, %n
44  br i1 %6, label %for.cond.cleanup, label %vector.body
45
46for.cond.cleanup:                                 ; preds = %vector.body, %entry
47  ret void
48}
49
50define arm_aapcs_vfpcc void @test_fadd_r(float* noalias nocapture readonly %A, float %B, float* noalias nocapture %C, i32 %n) {
51; CHECK-LABEL: test_fadd_r:
52; CHECK:       @ %bb.0: @ %entry
53; CHECK-NEXT:    cmp r2, #1
54; CHECK-NEXT:    it lt
55; CHECK-NEXT:    bxlt lr
56; CHECK-NEXT:  .LBB1_1: @ %vector.ph
57; CHECK-NEXT:    vmov 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, #4
62; CHECK-NEXT:    vadd.f32 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
66; CHECK-NEXT:    bx lr
67entry:
68  %0 = and i32 %n, 7
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
73
74vector.ph:                                        ; preds = %entry
75  %broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0
76  %broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
77  br label %vector.body
78
79vector.body:                                      ; preds = %vector.body, %vector.ph
80  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
81  %1 = getelementptr inbounds float, float* %A, i32 %index
82  %2 = bitcast float* %1 to <4 x float>*
83  %wide.load = load <4 x float>, <4 x float>* %2, align 4
84  %3 = fadd fast <4 x float> %broadcast.splat11, %wide.load
85  %4 = getelementptr inbounds float, float* %C, i32 %index
86  %5 = bitcast float* %4 to <4 x float>*
87  store <4 x float> %3, <4 x float>* %5, align 4
88  %index.next = add i32 %index, 4
89  %6 = icmp eq i32 %index.next, %n
90  br i1 %6, label %for.cond.cleanup, label %vector.body
91
92for.cond.cleanup:                                 ; preds = %vector.body, %entry
93  ret void
94}
95
96define arm_aapcs_vfpcc void @test_fmul(float* noalias nocapture readonly %A, float %B, float* noalias nocapture %C, i32 %n) {
97; CHECK-LABEL: test_fmul:
98; CHECK:       @ %bb.0: @ %entry
99; CHECK-NEXT:    cmp r2, #1
100; CHECK-NEXT:    it lt
101; CHECK-NEXT:    bxlt lr
102; CHECK-NEXT:  .LBB2_1: @ %vector.ph
103; CHECK-NEXT:    vmov 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, #4
108; CHECK-NEXT:    vmul.f32 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
112; CHECK-NEXT:    bx lr
113entry:
114  %0 = and i32 %n, 7
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
119
120vector.ph:                                        ; preds = %entry
121  %broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0
122  %broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
123  br label %vector.body
124
125vector.body:                                      ; preds = %vector.body, %vector.ph
126  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
127  %1 = getelementptr inbounds float, float* %A, i32 %index
128  %2 = bitcast float* %1 to <4 x float>*
129  %wide.load = load <4 x float>, <4 x float>* %2, align 4
130  %3 = fmul fast <4 x float> %wide.load, %broadcast.splat11
131  %4 = getelementptr inbounds float, float* %C, i32 %index
132  %5 = bitcast float* %4 to <4 x float>*
133  store <4 x float> %3, <4 x float>* %5, align 4
134  %index.next = add i32 %index, 4
135  %6 = icmp eq i32 %index.next, %n
136  br i1 %6, label %for.cond.cleanup, label %vector.body
137
138for.cond.cleanup:                                 ; preds = %vector.body, %entry
139  ret void
140}
141
142define arm_aapcs_vfpcc void @test_fmul_r(float* noalias nocapture readonly %A, float %B, float* noalias nocapture %C, i32 %n) {
143; CHECK-LABEL: test_fmul_r:
144; CHECK:       @ %bb.0: @ %entry
145; CHECK-NEXT:    cmp r2, #1
146; CHECK-NEXT:    it lt
147; CHECK-NEXT:    bxlt lr
148; CHECK-NEXT:  .LBB3_1: @ %vector.ph
149; CHECK-NEXT:    vmov 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, #4
154; CHECK-NEXT:    vmul.f32 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
158; CHECK-NEXT:    bx lr
159entry:
160  %0 = and i32 %n, 7
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
165
166vector.ph:                                        ; preds = %entry
167  %broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0
168  %broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
169  br label %vector.body
170
171vector.body:                                      ; preds = %vector.body, %vector.ph
172  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
173  %1 = getelementptr inbounds float, float* %A, i32 %index
174  %2 = bitcast float* %1 to <4 x float>*
175  %wide.load = load <4 x float>, <4 x float>* %2, align 4
176  %3 = fmul fast <4 x float> %broadcast.splat11, %wide.load
177  %4 = getelementptr inbounds float, float* %C, i32 %index
178  %5 = bitcast float* %4 to <4 x float>*
179  store <4 x float> %3, <4 x float>* %5, align 4
180  %index.next = add i32 %index, 4
181  %6 = icmp eq i32 %index.next, %n
182  br i1 %6, label %for.cond.cleanup, label %vector.body
183
184for.cond.cleanup:                                 ; preds = %vector.body, %entry
185  ret void
186}
187
188define arm_aapcs_vfpcc void @test_fsub(float* noalias nocapture readonly %A, float %B, float* noalias nocapture %C, i32 %n) {
189; CHECK-LABEL: test_fsub:
190; CHECK:       @ %bb.0: @ %entry
191; CHECK-NEXT:    cmp r2, #1
192; CHECK-NEXT:    it lt
193; CHECK-NEXT:    bxlt lr
194; CHECK-NEXT:  .LBB4_1: @ %vector.ph
195; CHECK-NEXT:    vmov 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, #4
200; CHECK-NEXT:    vsub.f32 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
204; CHECK-NEXT:    bx lr
205entry:
206  %0 = and i32 %n, 7
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
211
212vector.ph:                                        ; preds = %entry
213  %broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0
214  %broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
215  br label %vector.body
216
217vector.body:                                      ; preds = %vector.body, %vector.ph
218  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
219  %1 = getelementptr inbounds float, float* %A, i32 %index
220  %2 = bitcast float* %1 to <4 x float>*
221  %wide.load = load <4 x float>, <4 x float>* %2, align 4
222  %3 = fsub fast <4 x float> %wide.load, %broadcast.splat11
223  %4 = getelementptr inbounds float, float* %C, i32 %index
224  %5 = bitcast float* %4 to <4 x float>*
225  store <4 x float> %3, <4 x float>* %5, align 4
226  %index.next = add i32 %index, 4
227  %6 = icmp eq i32 %index.next, %n
228  br i1 %6, label %for.cond.cleanup, label %vector.body
229
230for.cond.cleanup:                                 ; preds = %vector.body, %entry
231  ret void
232}
233
234define arm_aapcs_vfpcc void @test_fsub_r(float* noalias nocapture readonly %A, float %B, float* noalias nocapture %C, i32 %n) {
235; CHECK-LABEL: test_fsub_r:
236; CHECK:       @ %bb.0: @ %entry
237; CHECK-NEXT:    cmp r2, #1
238; CHECK-NEXT:    it lt
239; CHECK-NEXT:    bxlt lr
240; CHECK-NEXT:  .LBB5_1: @ %vector.ph
241; CHECK-NEXT:    vmov r3, s0
242; CHECK-NEXT:    vdup.32 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, #4
247; CHECK-NEXT:    vsub.f32 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
251; CHECK-NEXT:    bx lr
252entry:
253  %0 = and i32 %n, 7
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
258
259vector.ph:                                        ; preds = %entry
260  %broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0
261  %broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
262  br label %vector.body
263
264vector.body:                                      ; preds = %vector.body, %vector.ph
265  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
266  %1 = getelementptr inbounds float, float* %A, i32 %index
267  %2 = bitcast float* %1 to <4 x float>*
268  %wide.load = load <4 x float>, <4 x float>* %2, align 4
269  %3 = fsub fast <4 x float> %broadcast.splat11, %wide.load
270  %4 = getelementptr inbounds float, float* %C, i32 %index
271  %5 = bitcast float* %4 to <4 x float>*
272  store <4 x float> %3, <4 x float>* %5, align 4
273  %index.next = add i32 %index, 4
274  %6 = icmp eq i32 %index.next, %n
275  br i1 %6, label %for.cond.cleanup, label %vector.body
276
277for.cond.cleanup:                                 ; preds = %vector.body, %entry
278  ret void
279}
280
281
282define arm_aapcs_vfpcc void @test_fmas(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float %C, float* noalias nocapture %D, i32 %n) {
283; CHECK-LABEL: test_fmas:
284; CHECK:       @ %bb.0: @ %entry
285; CHECK-NEXT:    cmp r3, #1
286; CHECK-NEXT:    it lt
287; CHECK-NEXT:    bxlt lr
288; CHECK-NEXT:  .LBB6_1: @ %vector.ph
289; CHECK-NEXT:    vmov 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, #4
295; CHECK-NEXT:    vfmas.f32 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
299; CHECK-NEXT:    bx lr
300entry:
301  %0 = and i32 %n, 7
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
306
307vector.ph:                                        ; preds = %entry
308  %broadcast.splatinsert13 = insertelement <4 x float> undef, float %C, i32 0
309  %broadcast.splat14 = shufflevector <4 x float> %broadcast.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer
310  br label %vector.body
311
312vector.body:                                      ; preds = %vector.body, %vector.ph
313  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
314  %1 = getelementptr inbounds float, float* %A, i32 %index
315  %2 = bitcast float* %1 to <4 x float>*
316  %wide.load = load <4 x float>, <4 x float>* %2, align 4
317  %3 = getelementptr inbounds float, float* %B, i32 %index
318  %4 = bitcast float* %3 to <4 x float>*
319  %wide.load12 = load <4 x float>, <4 x float>* %4, align 4
320  %5 = fmul fast <4 x float> %wide.load12, %wide.load
321  %6 = fadd fast <4 x float> %5, %broadcast.splat14
322  %7 = getelementptr inbounds float, float* %D, i32 %index
323  %8 = bitcast float* %7 to <4 x float>*
324  store <4 x float> %6, <4 x float>* %8, align 4
325  %index.next = add i32 %index, 4
326  %9 = icmp eq i32 %index.next, %n
327  br i1 %9, label %for.cond.cleanup, label %vector.body
328
329for.cond.cleanup:                                 ; preds = %vector.body, %entry
330  ret void
331}
332
333define arm_aapcs_vfpcc void @test_fmas_r(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float %C, float* noalias nocapture %D, i32 %n) {
334; CHECK-LABEL: test_fmas_r:
335; CHECK:       @ %bb.0: @ %entry
336; CHECK-NEXT:    cmp r3, #1
337; CHECK-NEXT:    it lt
338; CHECK-NEXT:    bxlt lr
339; CHECK-NEXT:  .LBB7_1: @ %vector.ph
340; CHECK-NEXT:    vmov 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, #4
346; CHECK-NEXT:    vfmas.f32 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
350; CHECK-NEXT:    bx lr
351entry:
352  %0 = and i32 %n, 7
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
357
358vector.ph:                                        ; preds = %entry
359  %broadcast.splatinsert13 = insertelement <4 x float> undef, float %C, i32 0
360  %broadcast.splat14 = shufflevector <4 x float> %broadcast.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer
361  br label %vector.body
362
363vector.body:                                      ; preds = %vector.body, %vector.ph
364  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
365  %1 = getelementptr inbounds float, float* %A, i32 %index
366  %2 = bitcast float* %1 to <4 x float>*
367  %wide.load = load <4 x float>, <4 x float>* %2, align 4
368  %3 = getelementptr inbounds float, float* %B, i32 %index
369  %4 = bitcast float* %3 to <4 x float>*
370  %wide.load12 = load <4 x float>, <4 x float>* %4, align 4
371  %5 = fmul fast <4 x float> %wide.load12, %wide.load
372  %6 = fadd fast <4 x float> %broadcast.splat14, %5
373  %7 = getelementptr inbounds float, float* %D, i32 %index
374  %8 = bitcast float* %7 to <4 x float>*
375  store <4 x float> %6, <4 x float>* %8, align 4
376  %index.next = add i32 %index, 4
377  %9 = icmp eq i32 %index.next, %n
378  br i1 %9, label %for.cond.cleanup, label %vector.body
379
380for.cond.cleanup:                                 ; preds = %vector.body, %entry
381  ret void
382}
383
384define arm_aapcs_vfpcc void @test_fma(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float %C, float* noalias nocapture %D, i32 %n) {
385; CHECK-LABEL: test_fma:
386; CHECK:       @ %bb.0: @ %entry
387; CHECK-NEXT:    cmp r3, #1
388; CHECK-NEXT:    it lt
389; CHECK-NEXT:    bxlt lr
390; CHECK-NEXT:  .LBB8_1: @ %vector.ph
391; CHECK-NEXT:    vmov 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, #4
397; CHECK-NEXT:    vfma.f32 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
401; CHECK-NEXT:    bx lr
402entry:
403  %0 = and i32 %n, 7
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
408
409vector.ph:                                        ; preds = %entry
410  %broadcast.splatinsert12 = insertelement <4 x float> undef, float %C, i32 0
411  %broadcast.splat13 = shufflevector <4 x float> %broadcast.splatinsert12, <4 x float> undef, <4 x i32> zeroinitializer
412  br label %vector.body
413
414vector.body:                                      ; preds = %vector.body, %vector.ph
415  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
416  %1 = getelementptr inbounds float, float* %A, i32 %index
417  %2 = bitcast float* %1 to <4 x float>*
418  %wide.load = load <4 x float>, <4 x float>* %2, align 4
419  %3 = fmul fast <4 x float> %wide.load, %broadcast.splat13
420  %4 = getelementptr inbounds float, float* %B, i32 %index
421  %5 = bitcast float* %4 to <4 x float>*
422  %wide.load14 = load <4 x float>, <4 x float>* %5, align 4
423  %6 = fadd fast <4 x float> %3, %wide.load14
424  %7 = getelementptr inbounds float, float* %D, i32 %index
425  %8 = bitcast float* %7 to <4 x float>*
426  store <4 x float> %6, <4 x float>* %8, align 4
427  %index.next = add i32 %index, 4
428  %9 = icmp eq i32 %index.next, %n
429  br i1 %9, label %for.cond.cleanup, label %vector.body
430
431for.cond.cleanup:                                 ; preds = %vector.body, %entry
432  ret void
433}
434
435define arm_aapcs_vfpcc void @test_fma_r(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float %C, float* noalias nocapture %D, i32 %n) {
436; CHECK-LABEL: test_fma_r:
437; CHECK:       @ %bb.0: @ %entry
438; CHECK-NEXT:    cmp r3, #1
439; CHECK-NEXT:    it lt
440; CHECK-NEXT:    bxlt lr
441; CHECK-NEXT:  .LBB9_1: @ %vector.ph
442; CHECK-NEXT:    vmov 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, #4
448; CHECK-NEXT:    vfma.f32 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
452; CHECK-NEXT:    bx lr
453entry:
454  %0 = and i32 %n, 7
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
459
460vector.ph:                                        ; preds = %entry
461  %broadcast.splatinsert12 = insertelement <4 x float> undef, float %C, i32 0
462  %broadcast.splat13 = shufflevector <4 x float> %broadcast.splatinsert12, <4 x float> undef, <4 x i32> zeroinitializer
463  br label %vector.body
464
465vector.body:                                      ; preds = %vector.body, %vector.ph
466  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
467  %1 = getelementptr inbounds float, float* %A, i32 %index
468  %2 = bitcast float* %1 to <4 x float>*
469  %wide.load = load <4 x float>, <4 x float>* %2, align 4
470  %3 = fmul fast <4 x float> %broadcast.splat13, %wide.load
471  %4 = getelementptr inbounds float, float* %B, i32 %index
472  %5 = bitcast float* %4 to <4 x float>*
473  %wide.load14 = load <4 x float>, <4 x float>* %5, align 4
474  %6 = fadd fast <4 x float> %3, %wide.load14
475  %7 = getelementptr inbounds float, float* %D, i32 %index
476  %8 = bitcast float* %7 to <4 x float>*
477  store <4 x float> %6, <4 x float>* %8, align 4
478  %index.next = add i32 %index, 4
479  %9 = icmp eq i32 %index.next, %n
480  br i1 %9, label %for.cond.cleanup, label %vector.body
481
482for.cond.cleanup:                                 ; preds = %vector.body, %entry
483  ret void
484}
485
486
487define arm_aapcs_vfpcc void @test_fmss(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float %C, float* noalias nocapture %D, i32 %n) {
488; CHECK-LABEL: test_fmss:
489; CHECK:       @ %bb.0: @ %entry
490; CHECK-NEXT:    cmp r3, #1
491; CHECK-NEXT:    it lt
492; CHECK-NEXT:    bxlt lr
493; CHECK-NEXT:  .LBB10_1: @ %vector.ph
494; CHECK-NEXT:    vmov r12, s0
495; CHECK-NEXT:    vdup.32 q0, r12
496; CHECK-NEXT:    vneg.f32 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, #4
503; CHECK-NEXT:    vfma.f32 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
507; CHECK-NEXT:    bx lr
508entry:
509  %0 = and i32 %n, 7
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
514
515vector.ph:                                        ; preds = %entry
516  %broadcast.splatinsert13 = insertelement <4 x float> undef, float %C, i32 0
517  %broadcast.splat14 = shufflevector <4 x float> %broadcast.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer
518  br label %vector.body
519
520vector.body:                                      ; preds = %vector.body, %vector.ph
521  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
522  %1 = getelementptr inbounds float, float* %A, i32 %index
523  %2 = bitcast float* %1 to <4 x float>*
524  %wide.load = load <4 x float>, <4 x float>* %2, align 4
525  %3 = getelementptr inbounds float, float* %B, i32 %index
526  %4 = bitcast float* %3 to <4 x float>*
527  %wide.load12 = load <4 x float>, <4 x float>* %4, align 4
528  %5 = fmul fast <4 x float> %wide.load12, %wide.load
529  %6 = fsub fast <4 x float> %5, %broadcast.splat14
530  %7 = getelementptr inbounds float, float* %D, i32 %index
531  %8 = bitcast float* %7 to <4 x float>*
532  store <4 x float> %6, <4 x float>* %8, align 4
533  %index.next = add i32 %index, 4
534  %9 = icmp eq i32 %index.next, %n
535  br i1 %9, label %for.cond.cleanup, label %vector.body
536
537for.cond.cleanup:                                 ; preds = %vector.body, %entry
538  ret void
539}
540
541define arm_aapcs_vfpcc void @test_fmss_r(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float %C, float* noalias nocapture %D, i32 %n) {
542; CHECK-LABEL: test_fmss_r:
543; CHECK:       @ %bb.0: @ %entry
544; CHECK-NEXT:    cmp r3, #1
545; CHECK-NEXT:    it lt
546; CHECK-NEXT:    bxlt lr
547; CHECK-NEXT:  .LBB11_1: @ %vector.ph
548; CHECK-NEXT:    vmov r12, s0
549; CHECK-NEXT:    vdup.32 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, #4
556; CHECK-NEXT:    vfms.f32 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
560; CHECK-NEXT:    bx lr
561entry:
562  %0 = and i32 %n, 7
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
567
568vector.ph:                                        ; preds = %entry
569  %broadcast.splatinsert13 = insertelement <4 x float> undef, float %C, i32 0
570  %broadcast.splat14 = shufflevector <4 x float> %broadcast.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer
571  br label %vector.body
572
573vector.body:                                      ; preds = %vector.body, %vector.ph
574  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
575  %1 = getelementptr inbounds float, float* %A, i32 %index
576  %2 = bitcast float* %1 to <4 x float>*
577  %wide.load = load <4 x float>, <4 x float>* %2, align 4
578  %3 = getelementptr inbounds float, float* %B, i32 %index
579  %4 = bitcast float* %3 to <4 x float>*
580  %wide.load12 = load <4 x float>, <4 x float>* %4, align 4
581  %5 = fmul fast <4 x float> %wide.load12, %wide.load
582  %6 = fsub fast <4 x float> %broadcast.splat14, %5
583  %7 = getelementptr inbounds float, float* %D, i32 %index
584  %8 = bitcast float* %7 to <4 x float>*
585  store <4 x float> %6, <4 x float>* %8, align 4
586  %index.next = add i32 %index, 4
587  %9 = icmp eq i32 %index.next, %n
588  br i1 %9, label %for.cond.cleanup, label %vector.body
589
590for.cond.cleanup:                                 ; preds = %vector.body, %entry
591  ret void
592}
593
594define arm_aapcs_vfpcc void @test_fms(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float %C, float* noalias nocapture %D, i32 %n) {
595; CHECK-LABEL: test_fms:
596; CHECK:       @ %bb.0: @ %entry
597; CHECK-NEXT:    cmp r3, #1
598; CHECK-NEXT:    it lt
599; CHECK-NEXT:    bxlt lr
600; CHECK-NEXT:  .LBB12_1: @ %vector.ph
601; CHECK-NEXT:    vmov 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, #4
607; CHECK-NEXT:    vneg.f32 q0, q0
608; CHECK-NEXT:    vfma.f32 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
612; CHECK-NEXT:    bx lr
613entry:
614  %0 = and i32 %n, 7
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
619
620vector.ph:                                        ; preds = %entry
621  %broadcast.splatinsert12 = insertelement <4 x float> undef, float %C, i32 0
622  %broadcast.splat13 = shufflevector <4 x float> %broadcast.splatinsert12, <4 x float> undef, <4 x i32> zeroinitializer
623  br label %vector.body
624
625vector.body:                                      ; preds = %vector.body, %vector.ph
626  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
627  %1 = getelementptr inbounds float, float* %A, i32 %index
628  %2 = bitcast float* %1 to <4 x float>*
629  %wide.load = load <4 x float>, <4 x float>* %2, align 4
630  %3 = fmul fast <4 x float> %wide.load, %broadcast.splat13
631  %4 = getelementptr inbounds float, float* %B, i32 %index
632  %5 = bitcast float* %4 to <4 x float>*
633  %wide.load14 = load <4 x float>, <4 x float>* %5, align 4
634  %6 = fsub fast <4 x float> %3, %wide.load14
635  %7 = getelementptr inbounds float, float* %D, i32 %index
636  %8 = bitcast float* %7 to <4 x float>*
637  store <4 x float> %6, <4 x float>* %8, align 4
638  %index.next = add i32 %index, 4
639  %9 = icmp eq i32 %index.next, %n
640  br i1 %9, label %for.cond.cleanup, label %vector.body
641
642for.cond.cleanup:                                 ; preds = %vector.body, %entry
643  ret void
644}
645
646define arm_aapcs_vfpcc void @test_fms_r(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float %C, float* noalias nocapture %D, i32 %n) {
647; CHECK-LABEL: test_fms_r:
648; CHECK:       @ %bb.0: @ %entry
649; CHECK-NEXT:    cmp r3, #1
650; CHECK-NEXT:    it lt
651; CHECK-NEXT:    bxlt lr
652; CHECK-NEXT:  .LBB13_1: @ %vector.ph
653; CHECK-NEXT:    vmov 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, #4
659; CHECK-NEXT:    vneg.f32 q0, q0
660; CHECK-NEXT:    vfma.f32 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
664; CHECK-NEXT:    bx lr
665entry:
666  %0 = and i32 %n, 7
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
671
672vector.ph:                                        ; preds = %entry
673  %broadcast.splatinsert12 = insertelement <4 x float> undef, float %C, i32 0
674  %broadcast.splat13 = shufflevector <4 x float> %broadcast.splatinsert12, <4 x float> undef, <4 x i32> zeroinitializer
675  br label %vector.body
676
677vector.body:                                      ; preds = %vector.body, %vector.ph
678  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
679  %1 = getelementptr inbounds float, float* %A, i32 %index
680  %2 = bitcast float* %1 to <4 x float>*
681  %wide.load = load <4 x float>, <4 x float>* %2, align 4
682  %3 = fmul fast <4 x float> %broadcast.splat13, %wide.load
683  %4 = getelementptr inbounds float, float* %B, i32 %index
684  %5 = bitcast float* %4 to <4 x float>*
685  %wide.load14 = load <4 x float>, <4 x float>* %5, align 4
686  %6 = fsub fast <4 x float> %3, %wide.load14
687  %7 = getelementptr inbounds float, float* %D, i32 %index
688  %8 = bitcast float* %7 to <4 x float>*
689  store <4 x float> %6, <4 x float>* %8, align 4
690  %index.next = add i32 %index, 4
691  %9 = icmp eq i32 %index.next, %n
692  br i1 %9, label %for.cond.cleanup, label %vector.body
693
694for.cond.cleanup:                                 ; preds = %vector.body, %entry
695  ret void
696}
697
698
699define dso_local void @test_nested(float* noalias nocapture %pInT1, float* noalias nocapture readonly %pOutT1, float* noalias nocapture readonly %pPRT_in, float* 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, #2
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:    ldr r4, [r1]
710; CHECK-NEXT:    mov r5, r2
711; CHECK-NEXT:    mov r6, r12
712; CHECK-NEXT:    vdup.32 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, #4
720; CHECK-NEXT:    vfms.f32 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, #4
728; CHECK-NEXT:    le lr, .LBB14_1
729; CHECK-NEXT:  @ %bb.4: @ %for.end14
730; CHECK-NEXT:    pop {r4, r5, r6, pc}
731for.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
742
743for.body.us:                                      ; preds = %for.cond6.for.end_crit_edge.us, %for.body.us.preheader
744  %pInT1.addr.038.us = phi float* [ %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 float* [ %incdec.ptr.us, %for.cond6.for.end_crit_edge.us ], [ %pOutT1, %for.body.us.preheader ]
747  %pPRT_in.addr.035.us = phi float* [ %scevgep, %for.cond6.for.end_crit_edge.us ], [ %pPRT_in, %for.body.us.preheader ]
748  %scevgep = getelementptr float, float* %pPRT_in.addr.035.us, i32 %numCols
749  %0 = load float, float* %pOutT1.addr.036.us, align 4
750  %broadcast.splatinsert47 = insertelement <4 x float> undef, float %0, i32 0
751  %broadcast.splat48 = shufflevector <4 x float> %broadcast.splatinsert47, <4 x float> undef, <4 x i32> zeroinitializer
752  br label %vector.body
753
754vector.body:                                      ; preds = %vector.body, %for.body.us
755  %index = phi i32 [ 0, %for.body.us ], [ %index.next, %vector.body ]
756  %next.gep = getelementptr float, float* %pInT1.addr.038.us, i32 %index
757  %next.gep45 = getelementptr float, float* %pPRT_in.addr.035.us, i32 %index
758  %1 = bitcast float* %next.gep to <4 x float>*
759  %wide.load = load <4 x float>, <4 x float>* %1, align 4
760  %2 = bitcast float* %next.gep45 to <4 x float>*
761  %wide.load46 = load <4 x float>, <4 x float>* %2, align 4
762  %3 = fmul fast <4 x float> %wide.load46, %broadcast.splat48
763  %4 = fsub fast <4 x float> %wide.load, %3
764  store <4 x float> %4, <4 x float>* %1, align 4
765  %index.next = add i32 %index, 4
766  %5 = icmp eq i32 %index.next, %numCols
767  br i1 %5, label %for.cond6.for.end_crit_edge.us, label %vector.body
768
769for.cond6.for.end_crit_edge.us:                   ; preds = %vector.body
770  %incdec.ptr.us = getelementptr inbounds float, float* %pOutT1.addr.036.us, i32 1
771  %scevgep40 = getelementptr float, float* %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
775
776for.end14:                                        ; preds = %for.cond6.for.end_crit_edge.us
777  ret void
778}
779
780%struct.arm_fir_instance_f32 = type { i16, float*, float* }
781define void @arm_fir_f32_1_4_mve(%struct.arm_fir_instance_f32* nocapture readonly %S, float* nocapture readonly %pSrc, float* %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 #8
787; CHECK-NEXT:    sub sp, #8
788; CHECK-NEXT:    ldrh.w r9, [r0]
789; CHECK-NEXT:    mov r11, r1
790; CHECK-NEXT:    ldr.w r12, [r0, #4]
791; CHECK-NEXT:    sub.w r1, r9, #1
792; CHECK-NEXT:    cmp r1, #3
793; CHECK-NEXT:    bhi .LBB15_6
794; CHECK-NEXT:  @ %bb.1: @ %if.then
795; CHECK-NEXT:    ldr r4, [r0, #8]
796; CHECK-NEXT:    lsr.w lr, r3, #2
797; CHECK-NEXT:    ldrd r7, r6, [r4]
798; CHECK-NEXT:    ldrd r5, r8, [r4, #8]
799; CHECK-NEXT:    add.w r4, r12, r1, lsl #2
800; CHECK-NEXT:    wls lr, lr, .LBB15_5
801; CHECK-NEXT:  @ %bb.2: @ %while.body.lr.ph
802; CHECK-NEXT:    bic r1, r3, #3
803; CHECK-NEXT:    str r1, [sp] @ 4-byte Spill
804; CHECK-NEXT:    add.w r10, r12, #4
805; CHECK-NEXT:    add.w r1, r2, r1, lsl #2
806; CHECK-NEXT:    str r1, [sp, #4] @ 4-byte Spill
807; CHECK-NEXT:    mov r1, r11
808; CHECK-NEXT:  .LBB15_3: @ %while.body
809; CHECK-NEXT:    @ =>This Inner Loop Header: Depth=1
810; CHECK-NEXT:    vldrw.u32 q0, [r1], #16
811; CHECK-NEXT:    vstrb.8 q0, [r4], #16
812; CHECK-NEXT:    vldrw.u32 q0, [r10, #-4]
813; CHECK-NEXT:    vldrw.u32 q1, [r10], #16
814; CHECK-NEXT:    vmul.f32 q0, q0, r7
815; CHECK-NEXT:    vldrw.u32 q2, [r10, #-8]
816; CHECK-NEXT:    vfma.f32 q0, q1, r6
817; CHECK-NEXT:    vldrw.u32 q1, [r10, #-12]
818; CHECK-NEXT:    vfma.f32 q0, q1, r5
819; CHECK-NEXT:    vfma.f32 q0, q2, r8
820; CHECK-NEXT:    vstrb.8 q0, [r2], #16
821; CHECK-NEXT:    le lr, .LBB15_3
822; CHECK-NEXT:  @ %bb.4: @ %while.end.loopexit
823; CHECK-NEXT:    ldr r1, [sp] @ 4-byte Reload
824; CHECK-NEXT:    ldr r2, [sp, #4] @ 4-byte Reload
825; CHECK-NEXT:    add.w r12, r12, r1, lsl #2
826; CHECK-NEXT:    add.w r11, r11, r1, lsl #2
827; CHECK-NEXT:  .LBB15_5: @ %while.end
828; CHECK-NEXT:    and r1, r3, #3
829; CHECK-NEXT:    vldrw.u32 q0, [r11]
830; CHECK-NEXT:    vctp.32 r1
831; CHECK-NEXT:    vpst
832; CHECK-NEXT:    vstrwt.32 q0, [r4]
833; CHECK-NEXT:    vldrw.u32 q0, [r12]
834; CHECK-NEXT:    vldrw.u32 q1, [r12, #4]
835; CHECK-NEXT:    vmul.f32 q0, q0, r7
836; CHECK-NEXT:    vfma.f32 q0, q1, r6
837; CHECK-NEXT:    vldrw.u32 q1, [r12, #8]
838; CHECK-NEXT:    vfma.f32 q0, q1, r5
839; CHECK-NEXT:    vldrw.u32 q1, [r12, #12]
840; CHECK-NEXT:    vfma.f32 q0, q1, r8
841; CHECK-NEXT:    vpst
842; CHECK-NEXT:    vstrwt.32 q0, [r2]
843; CHECK-NEXT:    ldr.w r12, [r0, #4]
844; CHECK-NEXT:  .LBB15_6: @ %if.end
845; CHECK-NEXT:    add.w r0, r12, r3, lsl #2
846; CHECK-NEXT:    lsr.w lr, r9, #2
847; CHECK-NEXT:    wls lr, lr, .LBB15_10
848; CHECK-NEXT:  @ %bb.7: @ %while.body51.preheader
849; CHECK-NEXT:    bic r2, r9, #3
850; CHECK-NEXT:    adds r1, r2, r3
851; CHECK-NEXT:    mov r3, r12
852; CHECK-NEXT:    add.w r1, r12, r1, lsl #2
853; CHECK-NEXT:  .LBB15_8: @ %while.body51
854; CHECK-NEXT:    @ =>This Inner Loop Header: Depth=1
855; CHECK-NEXT:    vldrw.u32 q0, [r0], #16
856; CHECK-NEXT:    vstrb.8 q0, [r3], #16
857; CHECK-NEXT:    le lr, .LBB15_8
858; CHECK-NEXT:  @ %bb.9: @ %while.end55.loopexit
859; CHECK-NEXT:    add.w r12, r12, r2, lsl #2
860; CHECK-NEXT:    mov r0, r1
861; CHECK-NEXT:  .LBB15_10: @ %while.end55
862; CHECK-NEXT:    ands r1, r9, #3
863; CHECK-NEXT:    beq .LBB15_12
864; CHECK-NEXT:  @ %bb.11: @ %if.then59
865; CHECK-NEXT:    vldrw.u32 q0, [r0]
866; CHECK-NEXT:    vctp.32 r1
867; CHECK-NEXT:    vpst
868; CHECK-NEXT:    vstrwt.32 q0, [r12]
869; CHECK-NEXT:  .LBB15_12: @ %if.end61
870; CHECK-NEXT:    add sp, #8
871; CHECK-NEXT:    pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
872entry:
873  %pState1 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 1
874  %0 = load float*, float** %pState1, align 4
875  %pCoeffs2 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 2
876  %1 = load float*, float** %pCoeffs2, align 4
877  %numTaps3 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 0
878  %2 = load i16, i16* %numTaps3, align 4
879  %conv = zext i16 %2 to i32
880  %sub = add nsw i32 %conv, -1
881  %cmp = icmp ult i32 %sub, 4
882  br i1 %cmp, label %if.then, label %if.end
883
884if.then:                                          ; preds = %entry
885  %arrayidx = getelementptr inbounds float, float* %0, i32 %sub
886  %incdec.ptr = getelementptr inbounds float, float* %1, i32 1
887  %3 = load float, float* %1, align 4
888  %incdec.ptr6 = getelementptr inbounds float, float* %1, i32 2
889  %4 = load float, float* %incdec.ptr, align 4
890  %incdec.ptr7 = getelementptr inbounds float, float* %1, i32 3
891  %5 = load float, float* %incdec.ptr6, align 4
892  %6 = load float, float* %incdec.ptr7, align 4
893  %shr = lshr i32 %blockSize, 2
894  %cmp9146 = icmp eq i32 %shr, 0
895  %.pre161 = insertelement <4 x float> undef, float %3, i32 0
896  %.pre162 = shufflevector <4 x float> %.pre161, <4 x float> undef, <4 x i32> zeroinitializer
897  %.pre163 = insertelement <4 x float> undef, float %4, i32 0
898  %.pre164 = shufflevector <4 x float> %.pre163, <4 x float> undef, <4 x i32> zeroinitializer
899  %.pre165 = insertelement <4 x float> undef, float %5, i32 0
900  %.pre166 = shufflevector <4 x float> %.pre165, <4 x float> undef, <4 x i32> zeroinitializer
901  %.pre167 = insertelement <4 x float> undef, float %6, i32 0
902  %.pre168 = shufflevector <4 x float> %.pre167, <4 x float> undef, <4 x i32> zeroinitializer
903  br i1 %cmp9146, label %while.end, label %while.body.lr.ph
904
905while.body.lr.ph:                                 ; preds = %if.then
906  %7 = and i32 %blockSize, -4
907  %scevgep158 = getelementptr float, float* %pDst, i32 %7
908  br label %while.body
909
910while.body:                                       ; preds = %while.body.lr.ph, %while.body
911  %pStateCur.0151 = phi float* [ %arrayidx, %while.body.lr.ph ], [ %add.ptr, %while.body ]
912  %pSamples.0150 = phi float* [ %0, %while.body.lr.ph ], [ %add.ptr24, %while.body ]
913  %pOutput.0149 = phi float* [ %pDst, %while.body.lr.ph ], [ %add.ptr23, %while.body ]
914  %pTempSrc.0148 = phi float* [ %pSrc, %while.body.lr.ph ], [ %add.ptr11, %while.body ]
915  %blkCnt.0147 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec, %while.body ]
916  %8 = bitcast float* %pTempSrc.0148 to <4 x float>*
917  %9 = load <4 x float>, <4 x float>* %8, align 4
918  %10 = bitcast float* %pStateCur.0151 to <4 x float>*
919  store <4 x float> %9, <4 x float>* %10, align 4
920  %add.ptr = getelementptr inbounds float, float* %pStateCur.0151, i32 4
921  %add.ptr11 = getelementptr inbounds float, float* %pTempSrc.0148, i32 4
922  %11 = bitcast float* %pSamples.0150 to <4 x float>*
923  %12 = load <4 x float>, <4 x float>* %11, align 4
924  %13 = fmul fast <4 x float> %12, %.pre162
925  %arrayidx12 = getelementptr inbounds float, float* %pSamples.0150, i32 1
926  %14 = bitcast float* %arrayidx12 to <4 x float>*
927  %15 = load <4 x float>, <4 x float>* %14, align 4
928  %mul = fmul fast <4 x float> %15, %.pre164
929  %add = fadd fast <4 x float> %mul, %13
930  %arrayidx13 = getelementptr inbounds float, float* %pSamples.0150, i32 2
931  %16 = bitcast float* %arrayidx13 to <4 x float>*
932  %17 = load <4 x float>, <4 x float>* %16, align 4
933  %mul16 = fmul fast <4 x float> %17, %.pre166
934  %add17 = fadd fast <4 x float> %add, %mul16
935  %arrayidx18 = getelementptr inbounds float, float* %pSamples.0150, i32 3
936  %18 = bitcast float* %arrayidx18 to <4 x float>*
937  %19 = load <4 x float>, <4 x float>* %18, align 4
938  %mul21 = fmul fast <4 x float> %19, %.pre168
939  %add22 = fadd fast <4 x float> %add17, %mul21
940  %20 = bitcast float* %pOutput.0149 to <4 x float>*
941  store <4 x float> %add22, <4 x float>* %20, align 4
942  %add.ptr23 = getelementptr inbounds float, float* %pOutput.0149, i32 4
943  %add.ptr24 = getelementptr inbounds float, float* %pSamples.0150, i32 4
944  %dec = add nsw i32 %blkCnt.0147, -1
945  %cmp9 = icmp eq i32 %dec, 0
946  br i1 %cmp9, label %while.end.loopexit, label %while.body
947
948while.end.loopexit:                               ; preds = %while.body
949  %scevgep157 = getelementptr float, float* %pSrc, i32 %7
950  %scevgep159 = getelementptr float, float* %0, i32 %7
951  br label %while.end
952
953while.end:                                        ; preds = %if.then, %while.end.loopexit
954  %pTempSrc.0.lcssa = phi float* [ %scevgep157, %while.end.loopexit ], [ %pSrc, %if.then ]
955  %pOutput.0.lcssa = phi float* [ %scevgep158, %while.end.loopexit ], [ %pDst, %if.then ]
956  %pSamples.0.lcssa = phi float* [ %scevgep159, %while.end.loopexit ], [ %0, %if.then ]
957  %pStateCur.0.lcssa = phi float* [ %add.ptr, %while.end.loopexit ], [ %arrayidx, %if.then ]
958  %and = and i32 %blockSize, 3
959  %21 = tail call <4 x i1> @llvm.arm.mve.vctp32(i32 %and)
960  %22 = bitcast float* %pTempSrc.0.lcssa to <4 x float>*
961  %23 = load <4 x float>, <4 x float>* %22, align 4
962  %24 = bitcast float* %pStateCur.0.lcssa to <4 x float>*
963  tail call void @llvm.masked.store.v4f32.p0v4f32(<4 x float> %23, <4 x float>* %24, i32 4, <4 x i1> %21)
964  %25 = bitcast float* %pSamples.0.lcssa to <4 x float>*
965  %26 = load <4 x float>, <4 x float>* %25, align 4
966  %27 = fmul fast <4 x float> %26, %.pre162
967  %arrayidx29 = getelementptr inbounds float, float* %pSamples.0.lcssa, i32 1
968  %28 = bitcast float* %arrayidx29 to <4 x float>*
969  %29 = load <4 x float>, <4 x float>* %28, align 4
970  %mul32 = fmul fast <4 x float> %29, %.pre164
971  %add33 = fadd fast <4 x float> %mul32, %27
972  %arrayidx34 = getelementptr inbounds float, float* %pSamples.0.lcssa, i32 2
973  %30 = bitcast float* %arrayidx34 to <4 x float>*
974  %31 = load <4 x float>, <4 x float>* %30, align 4
975  %mul37 = fmul fast <4 x float> %31, %.pre166
976  %add38 = fadd fast <4 x float> %add33, %mul37
977  %arrayidx39 = getelementptr inbounds float, float* %pSamples.0.lcssa, i32 3
978  %32 = bitcast float* %arrayidx39 to <4 x float>*
979  %33 = load <4 x float>, <4 x float>* %32, align 4
980  %mul42 = fmul fast <4 x float> %33, %.pre168
981  %add43 = fadd fast <4 x float> %add38, %mul42
982  %34 = bitcast float* %pOutput.0.lcssa to <4 x float>*
983  tail call void @llvm.masked.store.v4f32.p0v4f32(<4 x float> %add43, <4 x float>* %34, i32 4, <4 x i1> %21)
984  %.pre = load float*, float** %pState1, align 4
985  br label %if.end
986
987if.end:                                           ; preds = %while.end, %entry
988  %35 = phi float* [ %.pre, %while.end ], [ %0, %entry ]
989  %arrayidx45 = getelementptr inbounds float, float* %35, i32 %blockSize
990  %shr47 = lshr i32 %conv, 2
991  %cmp49141 = icmp eq i32 %shr47, 0
992  br i1 %cmp49141, label %while.end55, label %while.body51.preheader
993
994while.body51.preheader:                           ; preds = %if.end
995  %36 = and i32 %conv, 65532
996  %37 = add i32 %36, %blockSize
997  %scevgep = getelementptr float, float* %35, i32 %37
998  br label %while.body51
999
1000while.body51:                                     ; preds = %while.body51.preheader, %while.body51
1001  %pTempSrc.1144 = phi float* [ %add.ptr52, %while.body51 ], [ %arrayidx45, %while.body51.preheader ]
1002  %pTempDest.0143 = phi float* [ %add.ptr53, %while.body51 ], [ %35, %while.body51.preheader ]
1003  %blkCnt.1142 = phi i32 [ %dec54, %while.body51 ], [ %shr47, %while.body51.preheader ]
1004  %38 = bitcast float* %pTempSrc.1144 to <4 x float>*
1005  %39 = load <4 x float>, <4 x float>* %38, align 4
1006  %40 = bitcast float* %pTempDest.0143 to <4 x float>*
1007  store <4 x float> %39, <4 x float>* %40, align 4
1008  %add.ptr52 = getelementptr inbounds float, float* %pTempSrc.1144, i32 4
1009  %add.ptr53 = getelementptr inbounds float, float* %pTempDest.0143, i32 4
1010  %dec54 = add nsw i32 %blkCnt.1142, -1
1011  %cmp49 = icmp eq i32 %dec54, 0
1012  br i1 %cmp49, label %while.end55.loopexit, label %while.body51
1013
1014while.end55.loopexit:                             ; preds = %while.body51
1015  %scevgep156 = getelementptr float, float* %35, i32 %36
1016  br label %while.end55
1017
1018while.end55:                                      ; preds = %while.end55.loopexit, %if.end
1019  %pTempDest.0.lcssa = phi float* [ %35, %if.end ], [ %scevgep156, %while.end55.loopexit ]
1020  %pTempSrc.1.lcssa = phi float* [ %arrayidx45, %if.end ], [ %scevgep, %while.end55.loopexit ]
1021  %and56 = and i32 %conv, 3
1022  %cmp57 = icmp eq i32 %and56, 0
1023  br i1 %cmp57, label %if.end61, label %if.then59
1024
1025if.then59:                                        ; preds = %while.end55
1026  %41 = tail call <4 x i1> @llvm.arm.mve.vctp32(i32 %and56)
1027  %42 = bitcast float* %pTempSrc.1.lcssa to <4 x float>*
1028  %43 = load <4 x float>, <4 x float>* %42, align 4
1029  %44 = bitcast float* %pTempDest.0.lcssa to <4 x float>*
1030  tail call void @llvm.masked.store.v4f32.p0v4f32(<4 x float> %43, <4 x float>* %44, i32 4, <4 x i1> %41)
1031  br label %if.end61
1032
1033if.end61:                                         ; preds = %while.end55, %if.then59
1034  ret void
1035}
1036
1037
1038define void @fir(%struct.arm_fir_instance_f32* nocapture readonly %S, float* nocapture readonly %pSrc, float* nocapture %pDst, i32 %blockSize) {
1039; CHECK-LABEL: fir:
1040; CHECK:       @ %bb.0: @ %entry
1041; CHECK-NEXT:    .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
1042; CHECK-NEXT:    push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
1043; CHECK-NEXT:    .pad #4
1044; CHECK-NEXT:    sub sp, #4
1045; CHECK-NEXT:    .vsave {d8, d9, d10, d11, d12, d13}
1046; CHECK-NEXT:    vpush {d8, d9, d10, d11, d12, d13}
1047; CHECK-NEXT:    .pad #32
1048; CHECK-NEXT:    sub sp, #32
1049; CHECK-NEXT:    cmp r3, #8
1050; CHECK-NEXT:    blo.w .LBB16_12
1051; CHECK-NEXT:  @ %bb.1: @ %entry
1052; CHECK-NEXT:    lsrs.w r12, r3, #2
1053; CHECK-NEXT:    beq.w .LBB16_12
1054; CHECK-NEXT:  @ %bb.2: @ %while.body.lr.ph
1055; CHECK-NEXT:    ldrh r6, [r0]
1056; CHECK-NEXT:    movs r4, #1
1057; CHECK-NEXT:    ldrd r5, r10, [r0, #4]
1058; CHECK-NEXT:    sub.w r3, r6, #8
1059; CHECK-NEXT:    add.w r0, r3, r3, lsr #29
1060; CHECK-NEXT:    asrs r7, r0, #3
1061; CHECK-NEXT:    cmp r7, #1
1062; CHECK-NEXT:    it gt
1063; CHECK-NEXT:    asrgt r4, r0, #3
1064; CHECK-NEXT:    add.w r0, r5, r6, lsl #2
1065; CHECK-NEXT:    sub.w r9, r0, #4
1066; CHECK-NEXT:    rsbs r0, r6, #0
1067; CHECK-NEXT:    str r4, [sp, #4] @ 4-byte Spill
1068; CHECK-NEXT:    and r4, r3, #7
1069; CHECK-NEXT:    str r0, [sp, #16] @ 4-byte Spill
1070; CHECK-NEXT:    add.w r0, r10, #32
1071; CHECK-NEXT:    str r6, [sp, #20] @ 4-byte Spill
1072; CHECK-NEXT:    str r0, [sp, #8] @ 4-byte Spill
1073; CHECK-NEXT:    str r4, [sp, #12] @ 4-byte Spill
1074; CHECK-NEXT:    b .LBB16_4
1075; CHECK-NEXT:  .LBB16_3: @ %while.end
1076; CHECK-NEXT:    @ in Loop: Header=BB16_4 Depth=1
1077; CHECK-NEXT:    ldr r0, [sp, #16] @ 4-byte Reload
1078; CHECK-NEXT:    subs.w r12, r12, #1
1079; CHECK-NEXT:    vstrb.8 q0, [r2], #16
1080; CHECK-NEXT:    add.w r0, r5, r0, lsl #2
1081; CHECK-NEXT:    add.w r5, r0, #16
1082; CHECK-NEXT:    beq .LBB16_12
1083; CHECK-NEXT:  .LBB16_4: @ %while.body
1084; CHECK-NEXT:    @ =>This Loop Header: Depth=1
1085; CHECK-NEXT:    @ Child Loop BB16_6 Depth 2
1086; CHECK-NEXT:    @ Child Loop BB16_10 Depth 2
1087; CHECK-NEXT:    add.w lr, r10, #8
1088; CHECK-NEXT:    vldrw.u32 q0, [r1], #16
1089; CHECK-NEXT:    ldrd r3, r7, [r10]
1090; CHECK-NEXT:    ldm.w lr, {r0, r4, r6, lr}
1091; CHECK-NEXT:    ldrd r11, r8, [r10, #24]
1092; CHECK-NEXT:    vstrb.8 q0, [r9], #16
1093; CHECK-NEXT:    vldrw.u32 q0, [r5], #32
1094; CHECK-NEXT:    strd r9, r1, [sp, #24] @ 8-byte Folded Spill
1095; CHECK-NEXT:    vldrw.u32 q1, [r5, #-28]
1096; CHECK-NEXT:    vmul.f32 q0, q0, r3
1097; CHECK-NEXT:    vldrw.u32 q6, [r5, #-24]
1098; CHECK-NEXT:    vldrw.u32 q4, [r5, #-20]
1099; CHECK-NEXT:    vfma.f32 q0, q1, r7
1100; CHECK-NEXT:    vldrw.u32 q5, [r5, #-16]
1101; CHECK-NEXT:    vfma.f32 q0, q6, r0
1102; CHECK-NEXT:    vldrw.u32 q2, [r5, #-12]
1103; CHECK-NEXT:    vfma.f32 q0, q4, r4
1104; CHECK-NEXT:    vldrw.u32 q3, [r5, #-8]
1105; CHECK-NEXT:    vfma.f32 q0, q5, r6
1106; CHECK-NEXT:    ldr r0, [sp, #20] @ 4-byte Reload
1107; CHECK-NEXT:    vfma.f32 q0, q2, lr
1108; CHECK-NEXT:    vldrw.u32 q1, [r5, #-4]
1109; CHECK-NEXT:    vfma.f32 q0, q3, r11
1110; CHECK-NEXT:    cmp r0, #16
1111; CHECK-NEXT:    vfma.f32 q0, q1, r8
1112; CHECK-NEXT:    blo .LBB16_7
1113; CHECK-NEXT:  @ %bb.5: @ %for.body.preheader
1114; CHECK-NEXT:    @ in Loop: Header=BB16_4 Depth=1
1115; CHECK-NEXT:    ldr r0, [sp, #4] @ 4-byte Reload
1116; CHECK-NEXT:    dls lr, r0
1117; CHECK-NEXT:    ldr r7, [sp, #8] @ 4-byte Reload
1118; CHECK-NEXT:  .LBB16_6: @ %for.body
1119; CHECK-NEXT:    @ Parent Loop BB16_4 Depth=1
1120; CHECK-NEXT:    @ => This Inner Loop Header: Depth=2
1121; CHECK-NEXT:    ldm.w r7, {r0, r3, r4, r6}
1122; CHECK-NEXT:    vldrw.u32 q1, [r5], #32
1123; CHECK-NEXT:    add.w r11, r7, #16
1124; CHECK-NEXT:    vldrw.u32 q6, [r5, #-24]
1125; CHECK-NEXT:    vldrw.u32 q4, [r5, #-20]
1126; CHECK-NEXT:    vfma.f32 q0, q1, r0
1127; CHECK-NEXT:    vldrw.u32 q1, [r5, #-28]
1128; CHECK-NEXT:    ldm.w r11, {r1, r8, r11}
1129; CHECK-NEXT:    vldrw.u32 q5, [r5, #-16]
1130; CHECK-NEXT:    vfma.f32 q0, q1, r3
1131; CHECK-NEXT:    vldrw.u32 q2, [r5, #-12]
1132; CHECK-NEXT:    vfma.f32 q0, q6, r4
1133; CHECK-NEXT:    vldrw.u32 q3, [r5, #-8]
1134; CHECK-NEXT:    vfma.f32 q0, q4, r6
1135; CHECK-NEXT:    ldr.w r9, [r7, #28]
1136; CHECK-NEXT:    vfma.f32 q0, q5, r1
1137; CHECK-NEXT:    vldrw.u32 q1, [r5, #-4]
1138; CHECK-NEXT:    vfma.f32 q0, q2, r8
1139; CHECK-NEXT:    adds r7, #32
1140; CHECK-NEXT:    vfma.f32 q0, q3, r11
1141; CHECK-NEXT:    vfma.f32 q0, q1, r9
1142; CHECK-NEXT:    le lr, .LBB16_6
1143; CHECK-NEXT:    b .LBB16_8
1144; CHECK-NEXT:  .LBB16_7: @ in Loop: Header=BB16_4 Depth=1
1145; CHECK-NEXT:    ldr r7, [sp, #8] @ 4-byte Reload
1146; CHECK-NEXT:  .LBB16_8: @ %for.end
1147; CHECK-NEXT:    @ in Loop: Header=BB16_4 Depth=1
1148; CHECK-NEXT:    ldrd r9, r1, [sp, #24] @ 8-byte Folded Reload
1149; CHECK-NEXT:    ldr r4, [sp, #12] @ 4-byte Reload
1150; CHECK-NEXT:    cmp.w r4, #0
1151; CHECK-NEXT:    beq .LBB16_3
1152; CHECK-NEXT:    b .LBB16_9
1153; CHECK-NEXT:  .LBB16_9: @ %while.body76.preheader
1154; CHECK-NEXT:    @ in Loop: Header=BB16_4 Depth=1
1155; CHECK-NEXT:    mov r3, r5
1156; CHECK-NEXT:    mov lr, r4
1157; CHECK-NEXT:  .LBB16_10: @ %while.body76
1158; CHECK-NEXT:    @ Parent Loop BB16_4 Depth=1
1159; CHECK-NEXT:    @ => This Inner Loop Header: Depth=2
1160; CHECK-NEXT:    ldr r0, [r7], #4
1161; CHECK-NEXT:    vldrw.u32 q1, [r3], #4
1162; CHECK-NEXT:    subs.w lr, lr, #1
1163; CHECK-NEXT:    vfma.f32 q0, q1, r0
1164; CHECK-NEXT:    bne .LBB16_10
1165; CHECK-NEXT:    b .LBB16_11
1166; CHECK-NEXT:  .LBB16_11: @ %while.end.loopexit
1167; CHECK-NEXT:    @ in Loop: Header=BB16_4 Depth=1
1168; CHECK-NEXT:    add.w r5, r5, r4, lsl #2
1169; CHECK-NEXT:    b .LBB16_3
1170; CHECK-NEXT:  .LBB16_12: @ %if.end
1171; CHECK-NEXT:    add sp, #32
1172; CHECK-NEXT:    vpop {d8, d9, d10, d11, d12, d13}
1173; CHECK-NEXT:    add sp, #4
1174; CHECK-NEXT:    pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
1175entry:
1176  %pState1 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 1
1177  %0 = load float*, float** %pState1, align 4
1178  %pCoeffs2 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 2
1179  %1 = load float*, float** %pCoeffs2, align 4
1180  %numTaps3 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 0
1181  %2 = load i16, i16* %numTaps3, align 4
1182  %conv = zext i16 %2 to i32
1183  %cmp = icmp ugt i32 %blockSize, 7
1184  br i1 %cmp, label %if.then, label %if.end
1185
1186if.then:                                          ; preds = %entry
1187  %shr = lshr i32 %blockSize, 2
1188  %cmp5217 = icmp eq i32 %shr, 0
1189  br i1 %cmp5217, label %if.end, label %while.body.lr.ph
1190
1191while.body.lr.ph:                                 ; preds = %if.then
1192  %sub = add nsw i32 %conv, -1
1193  %arrayidx = getelementptr inbounds float, float* %0, i32 %sub
1194  %incdec.ptr = getelementptr inbounds float, float* %1, i32 1
1195  %incdec.ptr7 = getelementptr inbounds float, float* %1, i32 2
1196  %incdec.ptr8 = getelementptr inbounds float, float* %1, i32 3
1197  %incdec.ptr9 = getelementptr inbounds float, float* %1, i32 4
1198  %incdec.ptr10 = getelementptr inbounds float, float* %1, i32 5
1199  %incdec.ptr11 = getelementptr inbounds float, float* %1, i32 6
1200  %incdec.ptr12 = getelementptr inbounds float, float* %1, i32 7
1201  %sub37 = add nsw i32 %conv, -8
1202  %div = sdiv i32 %sub37, 8
1203  %pCoeffsCur.0199 = getelementptr inbounds float, float* %1, i32 8
1204  %cmp38201 = icmp ugt i16 %2, 15
1205  %and = and i32 %sub37, 7
1206  %cmp74210 = icmp eq i32 %and, 0
1207  %idx.neg = sub nsw i32 0, %conv
1208  %3 = icmp sgt i32 %div, 1
1209  %smax = select i1 %3, i32 %div, i32 1
1210  br label %while.body
1211
1212while.body:                                       ; preds = %while.body.lr.ph, %while.end
1213  %blkCnt.0222 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec84, %while.end ]
1214  %pStateCur.0221 = phi float* [ %arrayidx, %while.body.lr.ph ], [ %add.ptr, %while.end ]
1215  %pSamples.0220 = phi float* [ %0, %while.body.lr.ph ], [ %add.ptr83, %while.end ]
1216  %pTempSrc.0219 = phi float* [ %pSrc, %while.body.lr.ph ], [ %add.ptr14, %while.end ]
1217  %pOutput.0218 = phi float* [ %pDst, %while.body.lr.ph ], [ %add.ptr81, %while.end ]
1218  %4 = load float, float* %1, align 4
1219  %5 = load float, float* %incdec.ptr, align 4
1220  %6 = load float, float* %incdec.ptr7, align 4
1221  %7 = load float, float* %incdec.ptr8, align 4
1222  %8 = load float, float* %incdec.ptr9, align 4
1223  %9 = load float, float* %incdec.ptr10, align 4
1224  %10 = load float, float* %incdec.ptr11, align 4
1225  %11 = load float, float* %incdec.ptr12, align 4
1226  %12 = bitcast float* %pTempSrc.0219 to <4 x float>*
1227  %13 = load <4 x float>, <4 x float>* %12, align 4
1228  %14 = bitcast float* %pStateCur.0221 to <4 x float>*
1229  store <4 x float> %13, <4 x float>* %14, align 4
1230  %add.ptr = getelementptr inbounds float, float* %pStateCur.0221, i32 4
1231  %add.ptr14 = getelementptr inbounds float, float* %pTempSrc.0219, i32 4
1232  %15 = bitcast float* %pSamples.0220 to <4 x float>*
1233  %16 = load <4 x float>, <4 x float>* %15, align 4
1234  %.splatinsert = insertelement <4 x float> undef, float %4, i32 0
1235  %.splat = shufflevector <4 x float> %.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer
1236  %17 = fmul fast <4 x float> %16, %.splat
1237  %arrayidx15 = getelementptr inbounds float, float* %pSamples.0220, i32 1
1238  %18 = bitcast float* %arrayidx15 to <4 x float>*
1239  %19 = load <4 x float>, <4 x float>* %18, align 4
1240  %.splatinsert16 = insertelement <4 x float> undef, float %5, i32 0
1241  %.splat17 = shufflevector <4 x float> %.splatinsert16, <4 x float> undef, <4 x i32> zeroinitializer
1242  %20 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %19, <4 x float> %.splat17, <4 x float> %17)
1243  %arrayidx18 = getelementptr inbounds float, float* %pSamples.0220, i32 2
1244  %21 = bitcast float* %arrayidx18 to <4 x float>*
1245  %22 = load <4 x float>, <4 x float>* %21, align 4
1246  %.splatinsert19 = insertelement <4 x float> undef, float %6, i32 0
1247  %.splat20 = shufflevector <4 x float> %.splatinsert19, <4 x float> undef, <4 x i32> zeroinitializer
1248  %23 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %22, <4 x float> %.splat20, <4 x float> %20)
1249  %arrayidx21 = getelementptr inbounds float, float* %pSamples.0220, i32 3
1250  %24 = bitcast float* %arrayidx21 to <4 x float>*
1251  %25 = load <4 x float>, <4 x float>* %24, align 4
1252  %.splatinsert22 = insertelement <4 x float> undef, float %7, i32 0
1253  %.splat23 = shufflevector <4 x float> %.splatinsert22, <4 x float> undef, <4 x i32> zeroinitializer
1254  %26 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %25, <4 x float> %.splat23, <4 x float> %23)
1255  %arrayidx24 = getelementptr inbounds float, float* %pSamples.0220, i32 4
1256  %27 = bitcast float* %arrayidx24 to <4 x float>*
1257  %28 = load <4 x float>, <4 x float>* %27, align 4
1258  %.splatinsert25 = insertelement <4 x float> undef, float %8, i32 0
1259  %.splat26 = shufflevector <4 x float> %.splatinsert25, <4 x float> undef, <4 x i32> zeroinitializer
1260  %29 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %28, <4 x float> %.splat26, <4 x float> %26)
1261  %arrayidx27 = getelementptr inbounds float, float* %pSamples.0220, i32 5
1262  %30 = bitcast float* %arrayidx27 to <4 x float>*
1263  %31 = load <4 x float>, <4 x float>* %30, align 4
1264  %.splatinsert28 = insertelement <4 x float> undef, float %9, i32 0
1265  %.splat29 = shufflevector <4 x float> %.splatinsert28, <4 x float> undef, <4 x i32> zeroinitializer
1266  %32 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %31, <4 x float> %.splat29, <4 x float> %29)
1267  %arrayidx30 = getelementptr inbounds float, float* %pSamples.0220, i32 6
1268  %33 = bitcast float* %arrayidx30 to <4 x float>*
1269  %34 = load <4 x float>, <4 x float>* %33, align 4
1270  %.splatinsert31 = insertelement <4 x float> undef, float %10, i32 0
1271  %.splat32 = shufflevector <4 x float> %.splatinsert31, <4 x float> undef, <4 x i32> zeroinitializer
1272  %35 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %34, <4 x float> %.splat32, <4 x float> %32)
1273  %arrayidx33 = getelementptr inbounds float, float* %pSamples.0220, i32 7
1274  %36 = bitcast float* %arrayidx33 to <4 x float>*
1275  %37 = load <4 x float>, <4 x float>* %36, align 4
1276  %.splatinsert34 = insertelement <4 x float> undef, float %11, i32 0
1277  %.splat35 = shufflevector <4 x float> %.splatinsert34, <4 x float> undef, <4 x i32> zeroinitializer
1278  %38 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %37, <4 x float> %.splat35, <4 x float> %35)
1279  %pSamples.1200 = getelementptr inbounds float, float* %pSamples.0220, i32 8
1280  br i1 %cmp38201, label %for.body, label %for.end
1281
1282for.body:                                         ; preds = %while.body, %for.body
1283  %pSamples.1207 = phi float* [ %pSamples.1, %for.body ], [ %pSamples.1200, %while.body ]
1284  %pCoeffsCur.0206 = phi float* [ %pCoeffsCur.0, %for.body ], [ %pCoeffsCur.0199, %while.body ]
1285  %.pn205 = phi float* [ %pCoeffsCur.0206, %for.body ], [ %1, %while.body ]
1286  %i.0204 = phi i32 [ %inc, %for.body ], [ 0, %while.body ]
1287  %vecAcc0.0203 = phi <4 x float> [ %70, %for.body ], [ %38, %while.body ]
1288  %pSamples.0.pn202 = phi float* [ %pSamples.1207, %for.body ], [ %pSamples.0220, %while.body ]
1289  %incdec.ptr40 = getelementptr inbounds float, float* %.pn205, i32 9
1290  %39 = load float, float* %pCoeffsCur.0206, align 4
1291  %incdec.ptr41 = getelementptr inbounds float, float* %.pn205, i32 10
1292  %40 = load float, float* %incdec.ptr40, align 4
1293  %incdec.ptr42 = getelementptr inbounds float, float* %.pn205, i32 11
1294  %41 = load float, float* %incdec.ptr41, align 4
1295  %incdec.ptr43 = getelementptr inbounds float, float* %.pn205, i32 12
1296  %42 = load float, float* %incdec.ptr42, align 4
1297  %incdec.ptr44 = getelementptr inbounds float, float* %.pn205, i32 13
1298  %43 = load float, float* %incdec.ptr43, align 4
1299  %incdec.ptr45 = getelementptr inbounds float, float* %.pn205, i32 14
1300  %44 = load float, float* %incdec.ptr44, align 4
1301  %incdec.ptr46 = getelementptr inbounds float, float* %.pn205, i32 15
1302  %45 = load float, float* %incdec.ptr45, align 4
1303  %46 = load float, float* %incdec.ptr46, align 4
1304  %47 = bitcast float* %pSamples.1207 to <4 x float>*
1305  %48 = load <4 x float>, <4 x float>* %47, align 4
1306  %.splatinsert48 = insertelement <4 x float> undef, float %39, i32 0
1307  %.splat49 = shufflevector <4 x float> %.splatinsert48, <4 x float> undef, <4 x i32> zeroinitializer
1308  %49 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %48, <4 x float> %.splat49, <4 x float> %vecAcc0.0203)
1309  %arrayidx50 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 9
1310  %50 = bitcast float* %arrayidx50 to <4 x float>*
1311  %51 = load <4 x float>, <4 x float>* %50, align 4
1312  %.splatinsert51 = insertelement <4 x float> undef, float %40, i32 0
1313  %.splat52 = shufflevector <4 x float> %.splatinsert51, <4 x float> undef, <4 x i32> zeroinitializer
1314  %52 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %51, <4 x float> %.splat52, <4 x float> %49)
1315  %arrayidx53 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 10
1316  %53 = bitcast float* %arrayidx53 to <4 x float>*
1317  %54 = load <4 x float>, <4 x float>* %53, align 4
1318  %.splatinsert54 = insertelement <4 x float> undef, float %41, i32 0
1319  %.splat55 = shufflevector <4 x float> %.splatinsert54, <4 x float> undef, <4 x i32> zeroinitializer
1320  %55 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %54, <4 x float> %.splat55, <4 x float> %52)
1321  %arrayidx56 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 11
1322  %56 = bitcast float* %arrayidx56 to <4 x float>*
1323  %57 = load <4 x float>, <4 x float>* %56, align 4
1324  %.splatinsert57 = insertelement <4 x float> undef, float %42, i32 0
1325  %.splat58 = shufflevector <4 x float> %.splatinsert57, <4 x float> undef, <4 x i32> zeroinitializer
1326  %58 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %57, <4 x float> %.splat58, <4 x float> %55)
1327  %arrayidx59 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 12
1328  %59 = bitcast float* %arrayidx59 to <4 x float>*
1329  %60 = load <4 x float>, <4 x float>* %59, align 4
1330  %.splatinsert60 = insertelement <4 x float> undef, float %43, i32 0
1331  %.splat61 = shufflevector <4 x float> %.splatinsert60, <4 x float> undef, <4 x i32> zeroinitializer
1332  %61 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %60, <4 x float> %.splat61, <4 x float> %58)
1333  %arrayidx62 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 13
1334  %62 = bitcast float* %arrayidx62 to <4 x float>*
1335  %63 = load <4 x float>, <4 x float>* %62, align 4
1336  %.splatinsert63 = insertelement <4 x float> undef, float %44, i32 0
1337  %.splat64 = shufflevector <4 x float> %.splatinsert63, <4 x float> undef, <4 x i32> zeroinitializer
1338  %64 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %63, <4 x float> %.splat64, <4 x float> %61)
1339  %arrayidx65 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 14
1340  %65 = bitcast float* %arrayidx65 to <4 x float>*
1341  %66 = load <4 x float>, <4 x float>* %65, align 4
1342  %.splatinsert66 = insertelement <4 x float> undef, float %45, i32 0
1343  %.splat67 = shufflevector <4 x float> %.splatinsert66, <4 x float> undef, <4 x i32> zeroinitializer
1344  %67 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %66, <4 x float> %.splat67, <4 x float> %64)
1345  %arrayidx68 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 15
1346  %68 = bitcast float* %arrayidx68 to <4 x float>*
1347  %69 = load <4 x float>, <4 x float>* %68, align 4
1348  %.splatinsert69 = insertelement <4 x float> undef, float %46, i32 0
1349  %.splat70 = shufflevector <4 x float> %.splatinsert69, <4 x float> undef, <4 x i32> zeroinitializer
1350  %70 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %69, <4 x float> %.splat70, <4 x float> %67)
1351  %inc = add nuw nsw i32 %i.0204, 1
1352  %pCoeffsCur.0 = getelementptr inbounds float, float* %pCoeffsCur.0206, i32 8
1353  %pSamples.1 = getelementptr inbounds float, float* %pSamples.1207, i32 8
1354  %exitcond = icmp eq i32 %inc, %smax
1355  br i1 %exitcond, label %for.end, label %for.body
1356
1357for.end:                                          ; preds = %for.body, %while.body
1358  %vecAcc0.0.lcssa = phi <4 x float> [ %38, %while.body ], [ %70, %for.body ]
1359  %pCoeffsCur.0.lcssa = phi float* [ %pCoeffsCur.0199, %while.body ], [ %pCoeffsCur.0, %for.body ]
1360  %pSamples.1.lcssa = phi float* [ %pSamples.1200, %while.body ], [ %pSamples.1, %for.body ]
1361  br i1 %cmp74210, label %while.end, label %while.body76
1362
1363while.body76:                                     ; preds = %for.end, %while.body76
1364  %pCoeffsCur.1214 = phi float* [ %incdec.ptr77, %while.body76 ], [ %pCoeffsCur.0.lcssa, %for.end ]
1365  %vecAcc0.1213 = phi <4 x float> [ %74, %while.body76 ], [ %vecAcc0.0.lcssa, %for.end ]
1366  %numCnt.0212 = phi i32 [ %dec, %while.body76 ], [ %and, %for.end ]
1367  %pSamples.2211 = phi float* [ %incdec.ptr80, %while.body76 ], [ %pSamples.1.lcssa, %for.end ]
1368  %incdec.ptr77 = getelementptr inbounds float, float* %pCoeffsCur.1214, i32 1
1369  %71 = load float, float* %pCoeffsCur.1214, align 4
1370  %72 = bitcast float* %pSamples.2211 to <4 x float>*
1371  %73 = load <4 x float>, <4 x float>* %72, align 4
1372  %.splatinsert78 = insertelement <4 x float> undef, float %71, i32 0
1373  %.splat79 = shufflevector <4 x float> %.splatinsert78, <4 x float> undef, <4 x i32> zeroinitializer
1374  %74 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %73, <4 x float> %.splat79, <4 x float> %vecAcc0.1213)
1375  %incdec.ptr80 = getelementptr inbounds float, float* %pSamples.2211, i32 1
1376  %dec = add nsw i32 %numCnt.0212, -1
1377  %cmp74 = icmp sgt i32 %numCnt.0212, 1
1378  br i1 %cmp74, label %while.body76, label %while.end.loopexit
1379
1380while.end.loopexit:                               ; preds = %while.body76
1381  %scevgep = getelementptr float, float* %pSamples.1.lcssa, i32 %and
1382  br label %while.end
1383
1384while.end:                                        ; preds = %while.end.loopexit, %for.end
1385  %pSamples.2.lcssa = phi float* [ %pSamples.1.lcssa, %for.end ], [ %scevgep, %while.end.loopexit ]
1386  %vecAcc0.1.lcssa = phi <4 x float> [ %vecAcc0.0.lcssa, %for.end ], [ %74, %while.end.loopexit ]
1387  %75 = bitcast float* %pOutput.0218 to <4 x float>*
1388  store <4 x float> %vecAcc0.1.lcssa, <4 x float>* %75, align 4
1389  %add.ptr81 = getelementptr inbounds float, float* %pOutput.0218, i32 4
1390  %add.ptr82 = getelementptr inbounds float, float* %pSamples.2.lcssa, i32 4
1391  %add.ptr83 = getelementptr inbounds float, float* %add.ptr82, i32 %idx.neg
1392  %dec84 = add nsw i32 %blkCnt.0222, -1
1393  %cmp5 = icmp eq i32 %dec84, 0
1394  br i1 %cmp5, label %if.end, label %while.body
1395
1396if.end:                                           ; preds = %while.end, %if.then, %entry
1397  ret void
1398}
1399
1400%struct.arm_biquad_cascade_stereo_df2T_instance_f32 = type { i8, float*, float* }
1401define arm_aapcs_vfpcc void @arm_biquad_cascade_stereo_df2T_f32(%struct.arm_biquad_cascade_stereo_df2T_instance_f32* nocapture readonly %0, float* %1, float* %2, i32 %3) {
1402; CHECK-LABEL: arm_biquad_cascade_stereo_df2T_f32:
1403; CHECK:       @ %bb.0:
1404; CHECK-NEXT:    .save {r4, r5, r6, r7, r8, lr}
1405; CHECK-NEXT:    push.w {r4, r5, r6, r7, r8, lr}
1406; CHECK-NEXT:    .vsave {d8, d9, d10, d11}
1407; CHECK-NEXT:    vpush {d8, d9, d10, d11}
1408; CHECK-NEXT:    .pad #24
1409; CHECK-NEXT:    sub sp, #24
1410; CHECK-NEXT:    mov r8, r3
1411; CHECK-NEXT:    ldrb.w r12, [r0]
1412; CHECK-NEXT:    ldrd r3, r0, [r0, #4]
1413; CHECK-NEXT:    movs r4, #0
1414; CHECK-NEXT:    cmp.w r8, #0
1415; CHECK-NEXT:    strd r4, r4, [sp, #16]
1416; CHECK-NEXT:    beq .LBB17_5
1417; CHECK-NEXT:  @ %bb.1:
1418; CHECK-NEXT:    movs r5, #2
1419; CHECK-NEXT:    viwdup.u32 q0, r4, r5, #1
1420; CHECK-NEXT:    mov r4, sp
1421; CHECK-NEXT:  .LBB17_2: @ =>This Loop Header: Depth=1
1422; CHECK-NEXT:    @ Child Loop BB17_3 Depth 2
1423; CHECK-NEXT:    ldrd r5, r7, [r0]
1424; CHECK-NEXT:    vldrw.u32 q1, [r3]
1425; CHECK-NEXT:    vldr s8, [r0, #8]
1426; CHECK-NEXT:    ldr r6, [r0, #12]
1427; CHECK-NEXT:    vstrw.32 q1, [r4]
1428; CHECK-NEXT:    vdup.32 q1, r7
1429; CHECK-NEXT:    vldr s12, [r0, #16]
1430; CHECK-NEXT:    vmov.f32 s6, s8
1431; CHECK-NEXT:    dls lr, r8
1432; CHECK-NEXT:    vmov.f32 s7, s8
1433; CHECK-NEXT:    vdup.32 q2, r6
1434; CHECK-NEXT:    vmov.f32 s10, s12
1435; CHECK-NEXT:    mov r7, r2
1436; CHECK-NEXT:    vmov.f32 s11, s12
1437; CHECK-NEXT:  .LBB17_3: @ Parent Loop BB17_2 Depth=1
1438; CHECK-NEXT:    @ => This Inner Loop Header: Depth=2
1439; CHECK-NEXT:    vldrw.u32 q4, [r1, q0, uxtw #2]
1440; CHECK-NEXT:    vldrw.u32 q5, [r4, q0, uxtw #2]
1441; CHECK-NEXT:    vldrw.u32 q3, [sp, #8]
1442; CHECK-NEXT:    adds r1, #8
1443; CHECK-NEXT:    vfma.f32 q5, q4, r5
1444; CHECK-NEXT:    vfma.f32 q3, q5, q2
1445; CHECK-NEXT:    vstmia r7!, {s20, s21}
1446; CHECK-NEXT:    vfma.f32 q3, q4, q1
1447; CHECK-NEXT:    vstrw.32 q3, [r4]
1448; CHECK-NEXT:    le lr, .LBB17_3
1449; CHECK-NEXT:  @ %bb.4: @ in Loop: Header=BB17_2 Depth=1
1450; CHECK-NEXT:    subs.w r12, r12, #1
1451; CHECK-NEXT:    add.w r0, r0, #20
1452; CHECK-NEXT:    vstrb.8 q3, [r3], #16
1453; CHECK-NEXT:    mov r1, r2
1454; CHECK-NEXT:    bne .LBB17_2
1455; CHECK-NEXT:    b .LBB17_7
1456; CHECK-NEXT:  .LBB17_5: @ %.preheader
1457; CHECK-NEXT:    dls lr, r12
1458; CHECK-NEXT:    mov r0, sp
1459; CHECK-NEXT:  .LBB17_6: @ =>This Inner Loop Header: Depth=1
1460; CHECK-NEXT:    vldrw.u32 q0, [r3], #16
1461; CHECK-NEXT:    vstrw.32 q0, [r0]
1462; CHECK-NEXT:    le lr, .LBB17_6
1463; CHECK-NEXT:  .LBB17_7:
1464; CHECK-NEXT:    add sp, #24
1465; CHECK-NEXT:    vpop {d8, d9, d10, d11}
1466; CHECK-NEXT:    pop.w {r4, r5, r6, r7, r8, pc}
1467  %5 = alloca [6 x float], align 4
1468  %6 = getelementptr inbounds %struct.arm_biquad_cascade_stereo_df2T_instance_f32, %struct.arm_biquad_cascade_stereo_df2T_instance_f32* %0, i32 0, i32 1
1469  %7 = load float*, float** %6, align 4
1470  %8 = getelementptr inbounds %struct.arm_biquad_cascade_stereo_df2T_instance_f32, %struct.arm_biquad_cascade_stereo_df2T_instance_f32* %0, i32 0, i32 2
1471  %9 = load float*, float** %8, align 4
1472  %10 = getelementptr inbounds %struct.arm_biquad_cascade_stereo_df2T_instance_f32, %struct.arm_biquad_cascade_stereo_df2T_instance_f32* %0, i32 0, i32 0
1473  %11 = load i8, i8* %10, align 4
1474  %12 = zext i8 %11 to i32
1475  %13 = bitcast [6 x float]* %5 to i8*
1476  call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %13) #5
1477  %14 = tail call { <4 x i32>, i32 } @llvm.arm.mve.viwdup.v4i32(i32 0, i32 2, i32 1)
1478  %15 = extractvalue { <4 x i32>, i32 } %14, 0
1479  %16 = getelementptr inbounds [6 x float], [6 x float]* %5, i32 0, i32 4
1480  store float 0.000000e+00, float* %16, align 4
1481  %17 = getelementptr inbounds [6 x float], [6 x float]* %5, i32 0, i32 5
1482  store float 0.000000e+00, float* %17, align 4
1483  %18 = bitcast [6 x float]* %5 to <4 x float>*
1484  %19 = icmp eq i32 %3, 0
1485  %20 = bitcast [6 x float]* %5 to i32*
1486  %21 = getelementptr inbounds [6 x float], [6 x float]* %5, i32 0, i32 2
1487  %22 = bitcast float* %21 to <4 x float>*
1488  br i1 %19, label %23, label %31
1489
149023:                                               ; preds = %4, %23
1491  %24 = phi i32 [ %29, %23 ], [ %12, %4 ]
1492  %25 = phi float* [ %28, %23 ], [ %7, %4 ]
1493  %26 = bitcast float* %25 to <4 x float>*
1494  %27 = load <4 x float>, <4 x float>* %26, align 8
1495  store <4 x float> %27, <4 x float>* %18, align 4
1496  %28 = getelementptr inbounds float, float* %25, i32 4
1497  %29 = add i32 %24, -1
1498  %30 = icmp eq i32 %29, 0
1499  br i1 %30, label %82, label %23
1500
150131:                                               ; preds = %4, %77
1502  %32 = phi i32 [ %80, %77 ], [ %12, %4 ]
1503  %33 = phi float* [ %78, %77 ], [ %9, %4 ]
1504  %34 = phi float* [ %79, %77 ], [ %7, %4 ]
1505  %35 = phi float* [ %2, %77 ], [ %1, %4 ]
1506  %36 = getelementptr inbounds float, float* %33, i32 1
1507  %37 = load float, float* %33, align 4
1508  %38 = getelementptr inbounds float, float* %33, i32 2
1509  %39 = load float, float* %36, align 4
1510  %40 = getelementptr inbounds float, float* %33, i32 3
1511  %41 = load float, float* %38, align 4
1512  %42 = getelementptr inbounds float, float* %33, i32 4
1513  %43 = load float, float* %40, align 4
1514  %44 = load float, float* %42, align 4
1515  %45 = insertelement <4 x float> undef, float %43, i32 0
1516  %46 = shufflevector <4 x float> %45, <4 x float> undef, <4 x i32> <i32 0, i32 0, i32 undef, i32 undef>
1517  %47 = insertelement <4 x float> %46, float %44, i32 2
1518  %48 = insertelement <4 x float> %47, float %44, i32 3
1519  %49 = insertelement <4 x float> undef, float %39, i32 0
1520  %50 = shufflevector <4 x float> %49, <4 x float> undef, <4 x i32> <i32 0, i32 0, i32 undef, i32 undef>
1521  %51 = insertelement <4 x float> %50, float %41, i32 2
1522  %52 = insertelement <4 x float> %51, float %41, i32 3
1523  %53 = bitcast float* %34 to <4 x float>*
1524  %54 = load <4 x float>, <4 x float>* %53, align 8
1525  store <4 x float> %54, <4 x float>* %18, align 4
1526  %55 = insertelement <4 x float> undef, float %37, i32 0
1527  %56 = shufflevector <4 x float> %55, <4 x float> undef, <4 x i32> zeroinitializer
1528  br label %57
1529
153057:                                               ; preds = %31, %57
1531  %58 = phi float* [ %35, %31 ], [ %74, %57 ]
1532  %59 = phi float* [ %2, %31 ], [ %70, %57 ]
1533  %60 = phi i32 [ %3, %31 ], [ %75, %57 ]
1534  %61 = call <4 x i32> @llvm.arm.mve.vldr.gather.offset.v4i32.p0i32.v4i32(i32* nonnull %20, <4 x i32> %15, i32 32, i32 2, i32 1)
1535  %62 = bitcast <4 x i32> %61 to <4 x float>
1536  %63 = bitcast float* %58 to i32*
1537  %64 = call <4 x i32> @llvm.arm.mve.vldr.gather.offset.v4i32.p0i32.v4i32(i32* %63, <4 x i32> %15, i32 32, i32 2, i32 1)
1538  %65 = bitcast <4 x i32> %64 to <4 x float>
1539  %66 = call fast <4 x float> @llvm.fma.v4f32(<4 x float> %65, <4 x float> %56, <4 x float> %62)
1540  %67 = extractelement <4 x float> %66, i32 0
1541  %68 = getelementptr inbounds float, float* %59, i32 1
1542  store float %67, float* %59, align 4
1543  %69 = extractelement <4 x float> %66, i32 1
1544  %70 = getelementptr inbounds float, float* %59, i32 2
1545  store float %69, float* %68, align 4
1546  %71 = load <4 x float>, <4 x float>* %22, align 4
1547  %72 = call fast <4 x float> @llvm.fma.v4f32(<4 x float> %66, <4 x float> %48, <4 x float> %71)
1548  %73 = call fast <4 x float> @llvm.fma.v4f32(<4 x float> %65, <4 x float> %52, <4 x float> %72)
1549  store <4 x float> %73, <4 x float>* %18, align 4
1550  %74 = getelementptr inbounds float, float* %58, i32 2
1551  %75 = add i32 %60, -1
1552  %76 = icmp eq i32 %75, 0
1553  br i1 %76, label %77, label %57
1554
155577:                                               ; preds = %57
1556  %78 = getelementptr inbounds float, float* %33, i32 5
1557  store <4 x float> %73, <4 x float>* %53, align 4
1558  %79 = getelementptr inbounds float, float* %34, i32 4
1559  %80 = add i32 %32, -1
1560  %81 = icmp eq i32 %80, 0
1561  br i1 %81, label %82, label %31
1562
156382:                                               ; preds = %77, %23
1564  call void @llvm.lifetime.end.p0i8(i64 24, i8* nonnull %13) #5
1565  ret void
1566}
1567
1568define arm_aapcs_vfpcc void @fms(float* nocapture readonly %pSrc1, float* nocapture readonly %pSrc2, float* nocapture readonly %pSrc3, float* nocapture %pDst, i32 %N, i32 %M) {
1569; CHECK-LABEL: fms:
1570; CHECK:       @ %bb.0: @ %entry
1571; CHECK-NEXT:    .save {r4, r5, r7, lr}
1572; CHECK-NEXT:    push {r4, r5, r7, lr}
1573; CHECK-NEXT:    ldr.w lr, [sp, #16]
1574; CHECK-NEXT:    movs r4, #0
1575; CHECK-NEXT:    cmp.w r4, lr, lsr #2
1576; CHECK-NEXT:    beq .LBB18_5
1577; CHECK-NEXT:  @ %bb.1: @ %do.body.preheader
1578; CHECK-NEXT:    ldr.w r12, [sp, #20]
1579; CHECK-NEXT:    lsr.w r5, lr, #2
1580; CHECK-NEXT:  .LBB18_2: @ %do.body
1581; CHECK-NEXT:    @ =>This Loop Header: Depth=1
1582; CHECK-NEXT:    @ Child Loop BB18_3 Depth 2
1583; CHECK-NEXT:    ldr r4, [r2]
1584; CHECK-NEXT:    dls lr, r5
1585; CHECK-NEXT:    vdup.32 q0, r4
1586; CHECK-NEXT:  .LBB18_3: @ %while.body
1587; CHECK-NEXT:    @ Parent Loop BB18_2 Depth=1
1588; CHECK-NEXT:    @ => This Inner Loop Header: Depth=2
1589; CHECK-NEXT:    vldrw.u32 q1, [r1], #16
1590; CHECK-NEXT:    vldrw.u32 q2, [r0], #16
1591; CHECK-NEXT:    vfms.f32 q2, q1, q0
1592; CHECK-NEXT:    vstrb.8 q2, [r3], #16
1593; CHECK-NEXT:    le lr, .LBB18_3
1594; CHECK-NEXT:  @ %bb.4: @ %while.end
1595; CHECK-NEXT:    @ in Loop: Header=BB18_2 Depth=1
1596; CHECK-NEXT:    subs.w r12, r12, #1
1597; CHECK-NEXT:    add.w r2, r2, #4
1598; CHECK-NEXT:    bne .LBB18_2
1599; CHECK-NEXT:  .LBB18_5: @ %do.end
1600; CHECK-NEXT:    pop {r4, r5, r7, pc}
1601entry:
1602  %shr = lshr i32 %N, 2
1603  %cmp15 = icmp eq i32 %shr, 0
1604  br i1 %cmp15, label %do.end, label %do.body
1605
1606do.body:                                          ; preds = %entry, %while.end
1607  %pDst.addr.0 = phi float* [ %add.ptr2, %while.end ], [ %pDst, %entry ]
1608  %M.addr.0 = phi i32 [ %dec3, %while.end ], [ %M, %entry ]
1609  %pSrc3.addr.0 = phi float* [ %incdec.ptr, %while.end ], [ %pSrc3, %entry ]
1610  %pSrc2.addr.0 = phi float* [ %add.ptr1, %while.end ], [ %pSrc2, %entry ]
1611  %pSrc1.addr.0 = phi float* [ %add.ptr, %while.end ], [ %pSrc1, %entry ]
1612  %0 = load float, float* %pSrc3.addr.0, align 4
1613  %.splatinsert = insertelement <4 x float> undef, float %0, i32 0
1614  %.splat = shufflevector <4 x float> %.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer
1615  br label %while.body
1616
1617while.body:                                       ; preds = %do.body, %while.body
1618  %pSrc1.addr.119 = phi float* [ %pSrc1.addr.0, %do.body ], [ %add.ptr, %while.body ]
1619  %pSrc2.addr.118 = phi float* [ %pSrc2.addr.0, %do.body ], [ %add.ptr1, %while.body ]
1620  %blkCnt.017 = phi i32 [ %shr, %do.body ], [ %dec, %while.body ]
1621  %pDst.addr.116 = phi float* [ %pDst.addr.0, %do.body ], [ %add.ptr2, %while.body ]
1622  %1 = bitcast float* %pSrc1.addr.119 to <4 x float>*
1623  %2 = load <4 x float>, <4 x float>* %1, align 4
1624  %3 = bitcast float* %pSrc2.addr.118 to <4 x float>*
1625  %4 = load <4 x float>, <4 x float>* %3, align 4
1626  %5 = fneg fast <4 x float> %4
1627  %6 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %.splat, <4 x float> %5, <4 x float> %2)
1628  %7 = bitcast float* %pDst.addr.116 to <4 x float>*
1629  store <4 x float> %6, <4 x float>* %7, align 4
1630  %add.ptr = getelementptr inbounds float, float* %pSrc1.addr.119, i32 4
1631  %add.ptr1 = getelementptr inbounds float, float* %pSrc2.addr.118, i32 4
1632  %add.ptr2 = getelementptr inbounds float, float* %pDst.addr.116, i32 4
1633  %dec = add nsw i32 %blkCnt.017, -1
1634  %cmp = icmp eq i32 %dec, 0
1635  br i1 %cmp, label %while.end, label %while.body
1636
1637while.end:                                        ; preds = %while.body
1638  %incdec.ptr = getelementptr inbounds float, float* %pSrc3.addr.0, i32 1
1639  %dec3 = add i32 %M.addr.0, -1
1640  %cmp4 = icmp eq i32 %dec3, 0
1641  br i1 %cmp4, label %do.end, label %do.body
1642
1643do.end:                                           ; preds = %while.end, %entry
1644  ret void
1645}
1646
1647
1648%struct.arm_biquad_casd_df1_inst_f32 = type { i32, float*, float* }
1649define arm_aapcs_vfpcc void @arm_biquad_cascade_df1_f32(%struct.arm_biquad_casd_df1_inst_f32* nocapture readonly %S, float* nocapture readonly %pSrc, float* nocapture %pDst, i32 %blockSize) {
1650; CHECK-LABEL: arm_biquad_cascade_df1_f32:
1651; CHECK:       @ %bb.0: @ %entry
1652; CHECK-NEXT:    .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
1653; CHECK-NEXT:    push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
1654; CHECK-NEXT:    .pad #4
1655; CHECK-NEXT:    sub sp, #4
1656; CHECK-NEXT:    .vsave {d8, d9, d10, d11, d12, d13, d14, d15}
1657; CHECK-NEXT:    vpush {d8, d9, d10, d11, d12, d13, d14, d15}
1658; CHECK-NEXT:    .pad #88
1659; CHECK-NEXT:    sub sp, #88
1660; CHECK-NEXT:    ldrd r12, r10, [r0]
1661; CHECK-NEXT:    @ implicit-def: $s2
1662; CHECK-NEXT:    and r7, r3, #3
1663; CHECK-NEXT:    ldr.w r11, [r0, #8]
1664; CHECK-NEXT:    lsrs r0, r3, #2
1665; CHECK-NEXT:    str r0, [sp, #60] @ 4-byte Spill
1666; CHECK-NEXT:    str r7, [sp, #12] @ 4-byte Spill
1667; CHECK-NEXT:    str r2, [sp, #56] @ 4-byte Spill
1668; CHECK-NEXT:    b .LBB19_3
1669; CHECK-NEXT:  .LBB19_1: @ in Loop: Header=BB19_3 Depth=1
1670; CHECK-NEXT:    vmov.f32 s14, s7
1671; CHECK-NEXT:    ldr r2, [sp, #56] @ 4-byte Reload
1672; CHECK-NEXT:    vmov.f32 s0, s10
1673; CHECK-NEXT:    vmov.f32 s7, s6
1674; CHECK-NEXT:  .LBB19_2: @ %if.end69
1675; CHECK-NEXT:    @ in Loop: Header=BB19_3 Depth=1
1676; CHECK-NEXT:    vstr s8, [r10]
1677; CHECK-NEXT:    subs.w r12, r12, #1
1678; CHECK-NEXT:    vstr s0, [r10, #4]
1679; CHECK-NEXT:    add.w r11, r11, #128
1680; CHECK-NEXT:    vstr s14, [r10, #8]
1681; CHECK-NEXT:    mov r1, r2
1682; CHECK-NEXT:    vstr s7, [r10, #12]
1683; CHECK-NEXT:    add.w r10, r10, #16
1684; CHECK-NEXT:    beq.w .LBB19_13
1685; CHECK-NEXT:  .LBB19_3: @ %do.body
1686; CHECK-NEXT:    @ =>This Loop Header: Depth=1
1687; CHECK-NEXT:    @ Child Loop BB19_5 Depth 2
1688; CHECK-NEXT:    vldr s7, [r10, #8]
1689; CHECK-NEXT:    mov r5, r2
1690; CHECK-NEXT:    ldr r0, [sp, #60] @ 4-byte Reload
1691; CHECK-NEXT:    vldr s8, [r10]
1692; CHECK-NEXT:    vldr s10, [r10, #4]
1693; CHECK-NEXT:    vldr s6, [r10, #12]
1694; CHECK-NEXT:    wls lr, r0, .LBB19_6
1695; CHECK-NEXT:  @ %bb.4: @ %while.body.lr.ph
1696; CHECK-NEXT:    @ in Loop: Header=BB19_3 Depth=1
1697; CHECK-NEXT:    ldrd r5, lr, [sp, #56] @ 8-byte Folded Reload
1698; CHECK-NEXT:  .LBB19_5: @ %while.body
1699; CHECK-NEXT:    @ Parent Loop BB19_3 Depth=1
1700; CHECK-NEXT:    @ => This Inner Loop Header: Depth=2
1701; CHECK-NEXT:    vmov r4, s8
1702; CHECK-NEXT:    vldr s8, [r1, #12]
1703; CHECK-NEXT:    vldrw.u32 q0, [r11, #112]
1704; CHECK-NEXT:    vmov r0, s10
1705; CHECK-NEXT:    vldr s10, [r1, #8]
1706; CHECK-NEXT:    vmov r7, s7
1707; CHECK-NEXT:    vmov r9, s6
1708; CHECK-NEXT:    vldrw.u32 q1, [r11]
1709; CHECK-NEXT:    vstrw.32 q0, [sp, #64] @ 16-byte Spill
1710; CHECK-NEXT:    vmov r8, s8
1711; CHECK-NEXT:    vldrw.u32 q0, [r11, #16]
1712; CHECK-NEXT:    ldr r6, [r1, #4]
1713; CHECK-NEXT:    vldrw.u32 q7, [r11, #32]
1714; CHECK-NEXT:    vmul.f32 q1, q1, r8
1715; CHECK-NEXT:    vmov r3, s10
1716; CHECK-NEXT:    vldrw.u32 q3, [r11, #48]
1717; CHECK-NEXT:    vfma.f32 q1, q0, r3
1718; CHECK-NEXT:    ldr r3, [r1]
1719; CHECK-NEXT:    vfma.f32 q1, q7, r6
1720; CHECK-NEXT:    vldrw.u32 q6, [r11, #64]
1721; CHECK-NEXT:    vfma.f32 q1, q3, r3
1722; CHECK-NEXT:    vldrw.u32 q5, [r11, #80]
1723; CHECK-NEXT:    vfma.f32 q1, q6, r4
1724; CHECK-NEXT:    vldrw.u32 q4, [r11, #96]
1725; CHECK-NEXT:    vfma.f32 q1, q5, r0
1726; CHECK-NEXT:    vldrw.u32 q0, [sp, #64] @ 16-byte Reload
1727; CHECK-NEXT:    vfma.f32 q1, q4, r7
1728; CHECK-NEXT:    adds r1, #16
1729; CHECK-NEXT:    vfma.f32 q1, q0, r9
1730; CHECK-NEXT:    vmov.f32 s2, s8
1731; CHECK-NEXT:    vstrb.8 q1, [r5], #16
1732; CHECK-NEXT:    le lr, .LBB19_5
1733; CHECK-NEXT:  .LBB19_6: @ %while.end
1734; CHECK-NEXT:    @ in Loop: Header=BB19_3 Depth=1
1735; CHECK-NEXT:    ldr r7, [sp, #12] @ 4-byte Reload
1736; CHECK-NEXT:    cmp r7, #0
1737; CHECK-NEXT:    beq .LBB19_1
1738; CHECK-NEXT:  @ %bb.7: @ %if.then
1739; CHECK-NEXT:    @ in Loop: Header=BB19_3 Depth=1
1740; CHECK-NEXT:    vldr s24, [r1]
1741; CHECK-NEXT:    vmov r0, s8
1742; CHECK-NEXT:    vldr s0, [r1, #4]
1743; CHECK-NEXT:    vldrw.u32 q3, [r11]
1744; CHECK-NEXT:    vldr s3, [r1, #12]
1745; CHECK-NEXT:    vldrw.u32 q4, [r11, #32]
1746; CHECK-NEXT:    vldr s1, [r1, #8]
1747; CHECK-NEXT:    vmov r1, s10
1748; CHECK-NEXT:    vldrw.u32 q2, [r11, #96]
1749; CHECK-NEXT:    vmov r6, s3
1750; CHECK-NEXT:    vmul.f32 q3, q3, r6
1751; CHECK-NEXT:    vmov r6, s1
1752; CHECK-NEXT:    vstrw.32 q2, [sp, #32] @ 16-byte Spill
1753; CHECK-NEXT:    vldrw.u32 q2, [r11, #112]
1754; CHECK-NEXT:    vldrw.u32 q5, [r11, #48]
1755; CHECK-NEXT:    vmov r4, s0
1756; CHECK-NEXT:    vstrw.32 q2, [sp, #64] @ 16-byte Spill
1757; CHECK-NEXT:    vldrw.u32 q2, [r11, #80]
1758; CHECK-NEXT:    vldrw.u32 q7, [r11, #64]
1759; CHECK-NEXT:    vmov r3, s24
1760; CHECK-NEXT:    vstrw.32 q2, [sp, #16] @ 16-byte Spill
1761; CHECK-NEXT:    vldrw.u32 q2, [r11, #16]
1762; CHECK-NEXT:    vmov r2, s7
1763; CHECK-NEXT:    cmp r7, #1
1764; CHECK-NEXT:    vfma.f32 q3, q2, r6
1765; CHECK-NEXT:    vldrw.u32 q2, [sp, #16] @ 16-byte Reload
1766; CHECK-NEXT:    vfma.f32 q3, q4, r4
1767; CHECK-NEXT:    vmov lr, s6
1768; CHECK-NEXT:    vfma.f32 q3, q5, r3
1769; CHECK-NEXT:    vfma.f32 q3, q7, r0
1770; CHECK-NEXT:    vfma.f32 q3, q2, r1
1771; CHECK-NEXT:    vldrw.u32 q2, [sp, #32] @ 16-byte Reload
1772; CHECK-NEXT:    vfma.f32 q3, q2, r2
1773; CHECK-NEXT:    vldrw.u32 q2, [sp, #64] @ 16-byte Reload
1774; CHECK-NEXT:    vfma.f32 q3, q2, lr
1775; CHECK-NEXT:    bne .LBB19_9
1776; CHECK-NEXT:  @ %bb.8: @ %if.then58
1777; CHECK-NEXT:    @ in Loop: Header=BB19_3 Depth=1
1778; CHECK-NEXT:    vstr s12, [r5]
1779; CHECK-NEXT:    vmov.f32 s8, s24
1780; CHECK-NEXT:    vmov.f32 s0, s2
1781; CHECK-NEXT:    vmov.f32 s14, s12
1782; CHECK-NEXT:    b .LBB19_11
1783; CHECK-NEXT:  .LBB19_9: @ %if.else
1784; CHECK-NEXT:    @ in Loop: Header=BB19_3 Depth=1
1785; CHECK-NEXT:    cmp r7, #2
1786; CHECK-NEXT:    vstmia r5, {s12, s13}
1787; CHECK-NEXT:    bne .LBB19_12
1788; CHECK-NEXT:  @ %bb.10: @ in Loop: Header=BB19_3 Depth=1
1789; CHECK-NEXT:    vmov.f32 s8, s0
1790; CHECK-NEXT:    vmov.f32 s14, s13
1791; CHECK-NEXT:    vmov.f32 s0, s24
1792; CHECK-NEXT:    vmov.f32 s7, s12
1793; CHECK-NEXT:  .LBB19_11: @ %if.end69
1794; CHECK-NEXT:    @ in Loop: Header=BB19_3 Depth=1
1795; CHECK-NEXT:    vmov.f32 s2, s3
1796; CHECK-NEXT:    ldr r2, [sp, #56] @ 4-byte Reload
1797; CHECK-NEXT:    b .LBB19_2
1798; CHECK-NEXT:  .LBB19_12: @ %if.else64
1799; CHECK-NEXT:    @ in Loop: Header=BB19_3 Depth=1
1800; CHECK-NEXT:    vmov.f32 s7, s13
1801; CHECK-NEXT:    ldr r2, [sp, #56] @ 4-byte Reload
1802; CHECK-NEXT:    vmov.f32 s2, s3
1803; CHECK-NEXT:    vstr s14, [r5, #8]
1804; CHECK-NEXT:    vmov.f32 s8, s1
1805; CHECK-NEXT:    b .LBB19_2
1806; CHECK-NEXT:  .LBB19_13: @ %do.end
1807; CHECK-NEXT:    add sp, #88
1808; CHECK-NEXT:    vpop {d8, d9, d10, d11, d12, d13, d14, d15}
1809; CHECK-NEXT:    add sp, #4
1810; CHECK-NEXT:    pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
1811entry:
1812  %pState1 = getelementptr inbounds %struct.arm_biquad_casd_df1_inst_f32, %struct.arm_biquad_casd_df1_inst_f32* %S, i32 0, i32 1
1813  %0 = load float*, float** %pState1, align 4
1814  %pCoeffs2 = getelementptr inbounds %struct.arm_biquad_casd_df1_inst_f32, %struct.arm_biquad_casd_df1_inst_f32* %S, i32 0, i32 2
1815  %1 = load float*, float** %pCoeffs2, align 4
1816  %numStages = getelementptr inbounds %struct.arm_biquad_casd_df1_inst_f32, %struct.arm_biquad_casd_df1_inst_f32* %S, i32 0, i32 0
1817  %2 = load i32, i32* %numStages, align 4
1818  %shr = lshr i32 %blockSize, 2
1819  %cmp201 = icmp eq i32 %shr, 0
1820  %and = and i32 %blockSize, 3
1821  %tobool = icmp eq i32 %and, 0
1822  %cmp57 = icmp eq i32 %and, 1
1823  %cmp60 = icmp eq i32 %and, 2
1824  br label %do.body
1825
1826do.body:                                          ; preds = %if.end69, %entry
1827  %pState.0 = phi float* [ %0, %entry ], [ %incdec.ptr73, %if.end69 ]
1828  %pCoeffs.0 = phi float* [ %1, %entry ], [ %add.ptr74, %if.end69 ]
1829  %pIn.0 = phi float* [ %pSrc, %entry ], [ %pDst, %if.end69 ]
1830  %X3.0 = phi float [ undef, %entry ], [ %X3.2, %if.end69 ]
1831  %stage.0 = phi i32 [ %2, %entry ], [ %dec75, %if.end69 ]
1832  %3 = load float, float* %pState.0, align 4
1833  %arrayidx3 = getelementptr inbounds float, float* %pState.0, i32 1
1834  %4 = load float, float* %arrayidx3, align 4
1835  %arrayidx4 = getelementptr inbounds float, float* %pState.0, i32 2
1836  %5 = load float, float* %arrayidx4, align 4
1837  %arrayidx5 = getelementptr inbounds float, float* %pState.0, i32 3
1838  %6 = load float, float* %arrayidx5, align 4
1839  br i1 %cmp201, label %while.end, label %while.body.lr.ph
1840
1841while.body.lr.ph:                                 ; preds = %do.body
1842  %7 = bitcast float* %pCoeffs.0 to <4 x float>*
1843  %arrayidx9 = getelementptr inbounds float, float* %pCoeffs.0, i32 4
1844  %8 = bitcast float* %arrayidx9 to <4 x float>*
1845  %arrayidx12 = getelementptr inbounds float, float* %pCoeffs.0, i32 8
1846  %9 = bitcast float* %arrayidx12 to <4 x float>*
1847  %arrayidx15 = getelementptr inbounds float, float* %pCoeffs.0, i32 12
1848  %10 = bitcast float* %arrayidx15 to <4 x float>*
1849  %arrayidx18 = getelementptr inbounds float, float* %pCoeffs.0, i32 16
1850  %11 = bitcast float* %arrayidx18 to <4 x float>*
1851  %arrayidx21 = getelementptr inbounds float, float* %pCoeffs.0, i32 20
1852  %12 = bitcast float* %arrayidx21 to <4 x float>*
1853  %arrayidx24 = getelementptr inbounds float, float* %pCoeffs.0, i32 24
1854  %13 = bitcast float* %arrayidx24 to <4 x float>*
1855  %arrayidx27 = getelementptr inbounds float, float* %pCoeffs.0, i32 28
1856  %14 = bitcast float* %arrayidx27 to <4 x float>*
1857  br label %while.body
1858
1859while.body:                                       ; preds = %while.body.lr.ph, %while.body
1860  %sample.0208 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec, %while.body ]
1861  %pIn.1207 = phi float* [ %pIn.0, %while.body.lr.ph ], [ %incdec.ptr8, %while.body ]
1862  %pOut.1206 = phi float* [ %pDst, %while.body.lr.ph ], [ %add.ptr, %while.body ]
1863  %Yn2.0205 = phi float [ %6, %while.body.lr.ph ], [ %37, %while.body ]
1864  %Yn1.0204 = phi float [ %5, %while.body.lr.ph ], [ %36, %while.body ]
1865  %Xn2.0203 = phi float [ %4, %while.body.lr.ph ], [ %17, %while.body ]
1866  %Xn1.0202 = phi float [ %3, %while.body.lr.ph ], [ %18, %while.body ]
1867  %incdec.ptr = getelementptr inbounds float, float* %pIn.1207, i32 1
1868  %15 = load float, float* %pIn.1207, align 4
1869  %incdec.ptr6 = getelementptr inbounds float, float* %pIn.1207, i32 2
1870  %16 = load float, float* %incdec.ptr, align 4
1871  %incdec.ptr7 = getelementptr inbounds float, float* %pIn.1207, i32 3
1872  %17 = load float, float* %incdec.ptr6, align 4
1873  %incdec.ptr8 = getelementptr inbounds float, float* %pIn.1207, i32 4
1874  %18 = load float, float* %incdec.ptr7, align 4
1875  %19 = load <4 x float>, <4 x float>* %7, align 4
1876  %.splatinsert = insertelement <4 x float> undef, float %18, i32 0
1877  %.splat = shufflevector <4 x float> %.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer
1878  %20 = fmul fast <4 x float> %.splat, %19
1879  %21 = load <4 x float>, <4 x float>* %8, align 4
1880  %.splatinsert10 = insertelement <4 x float> undef, float %17, i32 0
1881  %.splat11 = shufflevector <4 x float> %.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
1882  %22 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %21, <4 x float> %.splat11, <4 x float> %20)
1883  %23 = load <4 x float>, <4 x float>* %9, align 4
1884  %.splatinsert13 = insertelement <4 x float> undef, float %16, i32 0
1885  %.splat14 = shufflevector <4 x float> %.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer
1886  %24 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %23, <4 x float> %.splat14, <4 x float> %22)
1887  %25 = load <4 x float>, <4 x float>* %10, align 4
1888  %.splatinsert16 = insertelement <4 x float> undef, float %15, i32 0
1889  %.splat17 = shufflevector <4 x float> %.splatinsert16, <4 x float> undef, <4 x i32> zeroinitializer
1890  %26 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %25, <4 x float> %.splat17, <4 x float> %24)
1891  %27 = load <4 x float>, <4 x float>* %11, align 4
1892  %.splatinsert19 = insertelement <4 x float> undef, float %Xn1.0202, i32 0
1893  %.splat20 = shufflevector <4 x float> %.splatinsert19, <4 x float> undef, <4 x i32> zeroinitializer
1894  %28 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %27, <4 x float> %.splat20, <4 x float> %26)
1895  %29 = load <4 x float>, <4 x float>* %12, align 4
1896  %.splatinsert22 = insertelement <4 x float> undef, float %Xn2.0203, i32 0
1897  %.splat23 = shufflevector <4 x float> %.splatinsert22, <4 x float> undef, <4 x i32> zeroinitializer
1898  %30 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %29, <4 x float> %.splat23, <4 x float> %28)
1899  %31 = load <4 x float>, <4 x float>* %13, align 4
1900  %.splatinsert25 = insertelement <4 x float> undef, float %Yn1.0204, i32 0
1901  %.splat26 = shufflevector <4 x float> %.splatinsert25, <4 x float> undef, <4 x i32> zeroinitializer
1902  %32 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %31, <4 x float> %.splat26, <4 x float> %30)
1903  %33 = load <4 x float>, <4 x float>* %14, align 4
1904  %.splatinsert28 = insertelement <4 x float> undef, float %Yn2.0205, i32 0
1905  %.splat29 = shufflevector <4 x float> %.splatinsert28, <4 x float> undef, <4 x i32> zeroinitializer
1906  %34 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %33, <4 x float> %.splat29, <4 x float> %32)
1907  %35 = bitcast float* %pOut.1206 to <4 x float>*
1908  store <4 x float> %34, <4 x float>* %35, align 4
1909  %add.ptr = getelementptr inbounds float, float* %pOut.1206, i32 4
1910  %36 = extractelement <4 x float> %34, i32 3
1911  %37 = extractelement <4 x float> %34, i32 2
1912  %dec = add nsw i32 %sample.0208, -1
1913  %cmp = icmp eq i32 %dec, 0
1914  br i1 %cmp, label %while.end, label %while.body
1915
1916while.end:                                        ; preds = %while.body, %do.body
1917  %Xn1.0.lcssa = phi float [ %3, %do.body ], [ %18, %while.body ]
1918  %Xn2.0.lcssa = phi float [ %4, %do.body ], [ %17, %while.body ]
1919  %Yn1.0.lcssa = phi float [ %5, %do.body ], [ %36, %while.body ]
1920  %Yn2.0.lcssa = phi float [ %6, %do.body ], [ %37, %while.body ]
1921  %pOut.1.lcssa = phi float* [ %pDst, %do.body ], [ %add.ptr, %while.body ]
1922  %pIn.1.lcssa = phi float* [ %pIn.0, %do.body ], [ %incdec.ptr8, %while.body ]
1923  %X3.1.lcssa = phi float [ %X3.0, %do.body ], [ %18, %while.body ]
1924  br i1 %tobool, label %if.end69, label %if.then
1925
1926if.then:                                          ; preds = %while.end
1927  %incdec.ptr30 = getelementptr inbounds float, float* %pIn.1.lcssa, i32 1
1928  %38 = load float, float* %pIn.1.lcssa, align 4
1929  %incdec.ptr31 = getelementptr inbounds float, float* %pIn.1.lcssa, i32 2
1930  %39 = load float, float* %incdec.ptr30, align 4
1931  %incdec.ptr32 = getelementptr inbounds float, float* %pIn.1.lcssa, i32 3
1932  %40 = load float, float* %incdec.ptr31, align 4
1933  %41 = load float, float* %incdec.ptr32, align 4
1934  %42 = bitcast float* %pCoeffs.0 to <4 x float>*
1935  %43 = load <4 x float>, <4 x float>* %42, align 4
1936  %.splatinsert34 = insertelement <4 x float> undef, float %41, i32 0
1937  %.splat35 = shufflevector <4 x float> %.splatinsert34, <4 x float> undef, <4 x i32> zeroinitializer
1938  %44 = fmul fast <4 x float> %.splat35, %43
1939  %arrayidx36 = getelementptr inbounds float, float* %pCoeffs.0, i32 4
1940  %45 = bitcast float* %arrayidx36 to <4 x float>*
1941  %46 = load <4 x float>, <4 x float>* %45, align 4
1942  %.splatinsert37 = insertelement <4 x float> undef, float %40, i32 0
1943  %.splat38 = shufflevector <4 x float> %.splatinsert37, <4 x float> undef, <4 x i32> zeroinitializer
1944  %47 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %46, <4 x float> %.splat38, <4 x float> %44)
1945  %arrayidx39 = getelementptr inbounds float, float* %pCoeffs.0, i32 8
1946  %48 = bitcast float* %arrayidx39 to <4 x float>*
1947  %49 = load <4 x float>, <4 x float>* %48, align 4
1948  %.splatinsert40 = insertelement <4 x float> undef, float %39, i32 0
1949  %.splat41 = shufflevector <4 x float> %.splatinsert40, <4 x float> undef, <4 x i32> zeroinitializer
1950  %50 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %49, <4 x float> %.splat41, <4 x float> %47)
1951  %arrayidx42 = getelementptr inbounds float, float* %pCoeffs.0, i32 12
1952  %51 = bitcast float* %arrayidx42 to <4 x float>*
1953  %52 = load <4 x float>, <4 x float>* %51, align 4
1954  %.splatinsert43 = insertelement <4 x float> undef, float %38, i32 0
1955  %.splat44 = shufflevector <4 x float> %.splatinsert43, <4 x float> undef, <4 x i32> zeroinitializer
1956  %53 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %52, <4 x float> %.splat44, <4 x float> %50)
1957  %arrayidx45 = getelementptr inbounds float, float* %pCoeffs.0, i32 16
1958  %54 = bitcast float* %arrayidx45 to <4 x float>*
1959  %55 = load <4 x float>, <4 x float>* %54, align 4
1960  %.splatinsert46 = insertelement <4 x float> undef, float %Xn1.0.lcssa, i32 0
1961  %.splat47 = shufflevector <4 x float> %.splatinsert46, <4 x float> undef, <4 x i32> zeroinitializer
1962  %56 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %55, <4 x float> %.splat47, <4 x float> %53)
1963  %arrayidx48 = getelementptr inbounds float, float* %pCoeffs.0, i32 20
1964  %57 = bitcast float* %arrayidx48 to <4 x float>*
1965  %58 = load <4 x float>, <4 x float>* %57, align 4
1966  %.splatinsert49 = insertelement <4 x float> undef, float %Xn2.0.lcssa, i32 0
1967  %.splat50 = shufflevector <4 x float> %.splatinsert49, <4 x float> undef, <4 x i32> zeroinitializer
1968  %59 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %58, <4 x float> %.splat50, <4 x float> %56)
1969  %arrayidx51 = getelementptr inbounds float, float* %pCoeffs.0, i32 24
1970  %60 = bitcast float* %arrayidx51 to <4 x float>*
1971  %61 = load <4 x float>, <4 x float>* %60, align 4
1972  %.splatinsert52 = insertelement <4 x float> undef, float %Yn1.0.lcssa, i32 0
1973  %.splat53 = shufflevector <4 x float> %.splatinsert52, <4 x float> undef, <4 x i32> zeroinitializer
1974  %62 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %61, <4 x float> %.splat53, <4 x float> %59)
1975  %arrayidx54 = getelementptr inbounds float, float* %pCoeffs.0, i32 28
1976  %63 = bitcast float* %arrayidx54 to <4 x float>*
1977  %64 = load <4 x float>, <4 x float>* %63, align 4
1978  %.splatinsert55 = insertelement <4 x float> undef, float %Yn2.0.lcssa, i32 0
1979  %.splat56 = shufflevector <4 x float> %.splatinsert55, <4 x float> undef, <4 x i32> zeroinitializer
1980  %65 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %64, <4 x float> %.splat56, <4 x float> %62)
1981  %66 = extractelement <4 x float> %65, i32 0
1982  br i1 %cmp57, label %if.then58, label %if.else
1983
1984if.then58:                                        ; preds = %if.then
1985  store float %66, float* %pOut.1.lcssa, align 4
1986  br label %if.end69
1987
1988if.else:                                          ; preds = %if.then
1989  %incdec.ptr62 = getelementptr inbounds float, float* %pOut.1.lcssa, i32 1
1990  store float %66, float* %pOut.1.lcssa, align 4
1991  %67 = extractelement <4 x float> %65, i32 1
1992  store float %67, float* %incdec.ptr62, align 4
1993  br i1 %cmp60, label %if.end69, label %if.else64
1994
1995if.else64:                                        ; preds = %if.else
1996  %incdec.ptr63 = getelementptr inbounds float, float* %pOut.1.lcssa, i32 2
1997  %68 = extractelement <4 x float> %65, i32 2
1998  store float %68, float* %incdec.ptr63, align 4
1999  br label %if.end69
2000
2001if.end69:                                         ; preds = %if.else, %while.end, %if.then58, %if.else64
2002  %Xn1.1 = phi float [ %38, %if.then58 ], [ %40, %if.else64 ], [ %Xn1.0.lcssa, %while.end ], [ %39, %if.else ]
2003  %Xn2.1 = phi float [ %X3.1.lcssa, %if.then58 ], [ %39, %if.else64 ], [ %Xn2.0.lcssa, %while.end ], [ %38, %if.else ]
2004  %Yn1.1 = phi float [ %66, %if.then58 ], [ %68, %if.else64 ], [ %Yn1.0.lcssa, %while.end ], [ %67, %if.else ]
2005  %Yn2.1 = phi float [ %Yn1.0.lcssa, %if.then58 ], [ %67, %if.else64 ], [ %Yn2.0.lcssa, %while.end ], [ %66, %if.else ]
2006  %X3.2 = phi float [ %41, %if.then58 ], [ %41, %if.else64 ], [ %X3.1.lcssa, %while.end ], [ %41, %if.else ]
2007  store float %Xn1.1, float* %pState.0, align 4
2008  store float %Xn2.1, float* %arrayidx3, align 4
2009  store float %Yn1.1, float* %arrayidx4, align 4
2010  %incdec.ptr73 = getelementptr inbounds float, float* %pState.0, i32 4
2011  store float %Yn2.1, float* %arrayidx5, align 4
2012  %add.ptr74 = getelementptr inbounds float, float* %pCoeffs.0, i32 32
2013  %dec75 = add i32 %stage.0, -1
2014  %cmp76 = icmp eq i32 %dec75, 0
2015  br i1 %cmp76, label %do.end, label %do.body
2016
2017do.end:                                           ; preds = %if.end69
2018  ret void
2019}
2020
2021
2022%struct.arm_biquad_cascade_df2T_instance_f32 = type { i8, float*, float* }
2023define void @arm_biquad_cascade_df2T_f32(%struct.arm_biquad_cascade_df2T_instance_f32* nocapture readonly %S, float* nocapture readonly %pSrc, float* nocapture %pDst, i32 %blockSize) {
2024; CHECK-LABEL: arm_biquad_cascade_df2T_f32:
2025; CHECK:       @ %bb.0: @ %entry
2026; CHECK-NEXT:    .save {r4, r5, r6, r7, r8, lr}
2027; CHECK-NEXT:    push.w {r4, r5, r6, r7, r8, lr}
2028; CHECK-NEXT:    .vsave {d8, d9, d10, d11, d12, d13}
2029; CHECK-NEXT:    vpush {d8, d9, d10, d11, d12, d13}
2030; CHECK-NEXT:    ldrd r12, r6, [r0, #4]
2031; CHECK-NEXT:    and r8, r3, #1
2032; CHECK-NEXT:    ldrb r0, [r0]
2033; CHECK-NEXT:    lsrs r3, r3, #1
2034; CHECK-NEXT:    vldr s0, .LCPI20_0
2035; CHECK-NEXT:    b .LBB20_3
2036; CHECK-NEXT:  .LBB20_1: @ %if.else
2037; CHECK-NEXT:    @ in Loop: Header=BB20_3 Depth=1
2038; CHECK-NEXT:    vstr s4, [r12]
2039; CHECK-NEXT:    vmov.f32 s6, s5
2040; CHECK-NEXT:  .LBB20_2: @ %if.end
2041; CHECK-NEXT:    @ in Loop: Header=BB20_3 Depth=1
2042; CHECK-NEXT:    vstr s6, [r12, #4]
2043; CHECK-NEXT:    adds r6, #20
2044; CHECK-NEXT:    subs r0, #1
2045; CHECK-NEXT:    add.w r12, r12, #8
2046; CHECK-NEXT:    mov r1, r2
2047; CHECK-NEXT:    beq .LBB20_8
2048; CHECK-NEXT:  .LBB20_3: @ %do.body
2049; CHECK-NEXT:    @ =>This Loop Header: Depth=1
2050; CHECK-NEXT:    @ Child Loop BB20_5 Depth 2
2051; CHECK-NEXT:    vldrw.u32 q3, [r6]
2052; CHECK-NEXT:    movs r5, #0
2053; CHECK-NEXT:    vmov q4, q3
2054; CHECK-NEXT:    vshlc q4, r5, #32
2055; CHECK-NEXT:    vldrw.u32 q2, [r6, #8]
2056; CHECK-NEXT:    vmov q5, q2
2057; CHECK-NEXT:    vshlc q5, r5, #32
2058; CHECK-NEXT:    vldrw.u32 q1, [r12]
2059; CHECK-NEXT:    vmov.f32 s6, s0
2060; CHECK-NEXT:    mov r5, r2
2061; CHECK-NEXT:    vmov.f32 s7, s0
2062; CHECK-NEXT:    wls lr, r3, .LBB20_6
2063; CHECK-NEXT:  @ %bb.4: @ %while.body.preheader
2064; CHECK-NEXT:    @ in Loop: Header=BB20_3 Depth=1
2065; CHECK-NEXT:    vmov q6, q1
2066; CHECK-NEXT:    mov r5, r2
2067; CHECK-NEXT:    mov lr, r3
2068; CHECK-NEXT:  .LBB20_5: @ %while.body
2069; CHECK-NEXT:    @ Parent Loop BB20_3 Depth=1
2070; CHECK-NEXT:    @ => This Inner Loop Header: Depth=2
2071; CHECK-NEXT:    ldrd r7, r4, [r1], #8
2072; CHECK-NEXT:    vfma.f32 q6, q3, r7
2073; CHECK-NEXT:    vmov r7, s24
2074; CHECK-NEXT:    vmov q1, q6
2075; CHECK-NEXT:    vfma.f32 q1, q2, r7
2076; CHECK-NEXT:    vstr s24, [r5]
2077; CHECK-NEXT:    vmov.f32 s7, s0
2078; CHECK-NEXT:    vfma.f32 q1, q4, r4
2079; CHECK-NEXT:    vmov r4, s5
2080; CHECK-NEXT:    vstr s5, [r5, #4]
2081; CHECK-NEXT:    vfma.f32 q1, q5, r4
2082; CHECK-NEXT:    adds r5, #8
2083; CHECK-NEXT:    vmov.f32 s4, s6
2084; CHECK-NEXT:    vmov.f32 s5, s7
2085; CHECK-NEXT:    vmov.f32 s6, s0
2086; CHECK-NEXT:    vmov q6, q1
2087; CHECK-NEXT:    le lr, .LBB20_5
2088; CHECK-NEXT:  .LBB20_6: @ %while.end
2089; CHECK-NEXT:    @ in Loop: Header=BB20_3 Depth=1
2090; CHECK-NEXT:    cmp.w r8, #0
2091; CHECK-NEXT:    beq .LBB20_1
2092; CHECK-NEXT:  @ %bb.7: @ %if.then
2093; CHECK-NEXT:    @ in Loop: Header=BB20_3 Depth=1
2094; CHECK-NEXT:    ldr r1, [r1]
2095; CHECK-NEXT:    vfma.f32 q1, q3, r1
2096; CHECK-NEXT:    vmov r1, s4
2097; CHECK-NEXT:    vstr s4, [r5]
2098; CHECK-NEXT:    vfma.f32 q1, q2, r1
2099; CHECK-NEXT:    vstr s5, [r12]
2100; CHECK-NEXT:    b .LBB20_2
2101; CHECK-NEXT:  .LBB20_8: @ %do.end
2102; CHECK-NEXT:    vpop {d8, d9, d10, d11, d12, d13}
2103; CHECK-NEXT:    pop.w {r4, r5, r6, r7, r8, pc}
2104; CHECK-NEXT:    .p2align 2
2105; CHECK-NEXT:  @ %bb.9:
2106; CHECK-NEXT:  .LCPI20_0:
2107; CHECK-NEXT:    .long 0x00000000 @ float 0
2108entry:
2109  %pState1 = getelementptr inbounds %struct.arm_biquad_cascade_df2T_instance_f32, %struct.arm_biquad_cascade_df2T_instance_f32* %S, i32 0, i32 1
2110  %0 = load float*, float** %pState1, align 4
2111  %numStages = getelementptr inbounds %struct.arm_biquad_cascade_df2T_instance_f32, %struct.arm_biquad_cascade_df2T_instance_f32* %S, i32 0, i32 0
2112  %1 = load i8, i8* %numStages, align 4
2113  %conv = zext i8 %1 to i32
2114  %pCoeffs = getelementptr inbounds %struct.arm_biquad_cascade_df2T_instance_f32, %struct.arm_biquad_cascade_df2T_instance_f32* %S, i32 0, i32 2
2115  %2 = load float*, float** %pCoeffs, align 4
2116  %div = lshr i32 %blockSize, 1
2117  %cmp.not90 = icmp eq i32 %div, 0
2118  %and = and i32 %blockSize, 1
2119  %tobool.not = icmp eq i32 %and, 0
2120  br label %do.body
2121
2122do.body:                                          ; preds = %if.end, %entry
2123  %stage.0 = phi i32 [ %conv, %entry ], [ %dec23, %if.end ]
2124  %pCurCoeffs.0 = phi float* [ %2, %entry ], [ %add.ptr2, %if.end ]
2125  %pState.0 = phi float* [ %0, %entry ], [ %pState.1, %if.end ]
2126  %pIn.0 = phi float* [ %pSrc, %entry ], [ %pDst, %if.end ]
2127  %3 = bitcast float* %pCurCoeffs.0 to <4 x float>*
2128  %4 = load <4 x float>, <4 x float>* %3, align 4
2129  %add.ptr = getelementptr inbounds float, float* %pCurCoeffs.0, i32 2
2130  %5 = bitcast float* %add.ptr to <4 x float>*
2131  %6 = load <4 x float>, <4 x float>* %5, align 4
2132  %add.ptr2 = getelementptr inbounds float, float* %pCurCoeffs.0, i32 5
2133  %7 = bitcast float* %pState.0 to <4 x float>*
2134  %8 = load <4 x float>, <4 x float>* %7, align 8
2135  %9 = shufflevector <4 x float> %8, <4 x float> <float poison, float poison, float 0.000000e+00, float 0.000000e+00>, <4 x i32> <i32 0, i32 1, i32 6, i32 7>
2136  %10 = bitcast <4 x float> %4 to <4 x i32>
2137  %11 = tail call { i32, <4 x i32> } @llvm.arm.mve.vshlc.v4i32(<4 x i32> %10, i32 0, i32 32)
2138  %12 = extractvalue { i32, <4 x i32> } %11, 0
2139  %13 = extractvalue { i32, <4 x i32> } %11, 1
2140  %14 = bitcast <4 x i32> %13 to <4 x float>
2141  %15 = bitcast <4 x float> %6 to <4 x i32>
2142  %16 = tail call { i32, <4 x i32> } @llvm.arm.mve.vshlc.v4i32(<4 x i32> %15, i32 %12, i32 32)
2143  %17 = extractvalue { i32, <4 x i32> } %16, 1
2144  %18 = bitcast <4 x i32> %17 to <4 x float>
2145  br i1 %cmp.not90, label %while.end, label %while.body
2146
2147while.body:                                       ; preds = %do.body, %while.body
2148  %pIn.194 = phi float* [ %incdec.ptr4, %while.body ], [ %pIn.0, %do.body ]
2149  %state.093 = phi <4 x float> [ %30, %while.body ], [ %9, %do.body ]
2150  %pOut.192 = phi float* [ %incdec.ptr12, %while.body ], [ %pDst, %do.body ]
2151  %sample.091 = phi i32 [ %dec, %while.body ], [ %div, %do.body ]
2152  %incdec.ptr = getelementptr inbounds float, float* %pIn.194, i32 1
2153  %19 = load float, float* %pIn.194, align 4
2154  %incdec.ptr4 = getelementptr inbounds float, float* %pIn.194, i32 2
2155  %20 = load float, float* %incdec.ptr, align 4
2156  %.splatinsert = insertelement <4 x float> poison, float %19, i32 0
2157  %.splat = shufflevector <4 x float> %.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
2158  %21 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %4, <4 x float> %.splat, <4 x float> %state.093)
2159  %22 = extractelement <4 x float> %21, i32 0
2160  %.splat6 = shufflevector <4 x float> %21, <4 x float> poison, <4 x i32> zeroinitializer
2161  %23 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %6, <4 x float> %.splat6, <4 x float> %21)
2162  %24 = insertelement <4 x float> %23, float 0.000000e+00, i32 3
2163  %.splatinsert7 = insertelement <4 x float> poison, float %20, i32 0
2164  %.splat8 = shufflevector <4 x float> %.splatinsert7, <4 x float> poison, <4 x i32> zeroinitializer
2165  %25 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %14, <4 x float> %.splat8, <4 x float> %24)
2166  %26 = extractelement <4 x float> %25, i32 1
2167  %.splat10 = shufflevector <4 x float> %25, <4 x float> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1>
2168  %27 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %18, <4 x float> %.splat10, <4 x float> %25)
2169  %28 = shufflevector <4 x float> %27, <4 x float> undef, <4 x i32> <i32 2, i32 undef, i32 undef, i32 3>
2170  %29 = insertelement <4 x float> %28, float 0.000000e+00, i32 2
2171  %30 = shufflevector <4 x float> %29, <4 x float> %27, <4 x i32> <i32 0, i32 7, i32 2, i32 3>
2172  %incdec.ptr11 = getelementptr inbounds float, float* %pOut.192, i32 1
2173  store float %22, float* %pOut.192, align 4
2174  %incdec.ptr12 = getelementptr inbounds float, float* %pOut.192, i32 2
2175  store float %26, float* %incdec.ptr11, align 4
2176  %dec = add nsw i32 %sample.091, -1
2177  %cmp.not = icmp eq i32 %dec, 0
2178  br i1 %cmp.not, label %while.end, label %while.body
2179
2180while.end:                                        ; preds = %while.body, %do.body
2181  %pOut.1.lcssa = phi float* [ %pDst, %do.body ], [ %incdec.ptr12, %while.body ]
2182  %state.0.lcssa = phi <4 x float> [ %9, %do.body ], [ %30, %while.body ]
2183  %pIn.1.lcssa = phi float* [ %pIn.0, %do.body ], [ %incdec.ptr4, %while.body ]
2184  br i1 %tobool.not, label %if.else, label %if.then
2185
2186if.then:                                          ; preds = %while.end
2187  %31 = load float, float* %pIn.1.lcssa, align 4
2188  %.splatinsert14 = insertelement <4 x float> poison, float %31, i32 0
2189  %.splat15 = shufflevector <4 x float> %.splatinsert14, <4 x float> poison, <4 x i32> zeroinitializer
2190  %32 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %4, <4 x float> %.splat15, <4 x float> %state.0.lcssa)
2191  %33 = extractelement <4 x float> %32, i32 0
2192  %.splat17 = shufflevector <4 x float> %32, <4 x float> poison, <4 x i32> zeroinitializer
2193  %34 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %6, <4 x float> %.splat17, <4 x float> %32)
2194  store float %33, float* %pOut.1.lcssa, align 4
2195  %35 = extractelement <4 x float> %34, i32 1
2196  store float %35, float* %pState.0, align 4
2197  %36 = extractelement <4 x float> %34, i32 2
2198  br label %if.end
2199
2200if.else:                                          ; preds = %while.end
2201  %37 = extractelement <4 x float> %state.0.lcssa, i32 0
2202  store float %37, float* %pState.0, align 4
2203  %38 = extractelement <4 x float> %state.0.lcssa, i32 1
2204  br label %if.end
2205
2206if.end:                                           ; preds = %if.else, %if.then
2207  %.sink = phi float [ %38, %if.else ], [ %36, %if.then ]
2208  %39 = getelementptr inbounds float, float* %pState.0, i32 1
2209  store float %.sink, float* %39, align 4
2210  %pState.1 = getelementptr inbounds float, float* %pState.0, i32 2
2211  %dec23 = add i32 %stage.0, -1
2212  %cmp24.not = icmp eq i32 %dec23, 0
2213  br i1 %cmp24.not, label %do.end, label %do.body
2214
2215do.end:                                           ; preds = %if.end
2216  ret void
2217}
2218
2219define arm_aapcs_vfpcc float @vecAddAcrossF32Mve(<4 x float> %in) {
2220; CHECK-LABEL: vecAddAcrossF32Mve:
2221; CHECK:       @ %bb.0: @ %entry
2222; CHECK-NEXT:    vadd.f32 s4, s0, s1
2223; CHECK-NEXT:    vadd.f32 s4, s4, s2
2224; CHECK-NEXT:    vadd.f32 s0, s4, s3
2225; CHECK-NEXT:    bx lr
2226entry:
2227  %0 = extractelement <4 x float> %in, i32 0
2228  %1 = extractelement <4 x float> %in, i32 1
2229  %add = fadd fast float %0, %1
2230  %2 = extractelement <4 x float> %in, i32 2
2231  %add1 = fadd fast float %add, %2
2232  %3 = extractelement <4 x float> %in, i32 3
2233  %add2 = fadd fast float %add1, %3
2234  ret float %add2
2235}
2236
2237
2238declare { i32, <4 x i32> } @llvm.arm.mve.vshlc.v4i32(<4 x i32>, i32, i32) #1
2239declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture)
2240declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture)
2241declare { <4 x i32>, i32 } @llvm.arm.mve.viwdup.v4i32(i32, i32, i32)
2242declare <4 x i32> @llvm.arm.mve.vldr.gather.offset.v4i32.p0i32.v4i32(i32*, <4 x i32>, i32, i32, i32)
2243declare void @llvm.assume(i1)
2244declare <4 x i1> @llvm.arm.mve.vctp32(i32)
2245declare <4 x float> @llvm.fma.v4f32(<4 x float>, <4 x float>, <4 x float>)
2246declare void @llvm.masked.store.v4f32.p0v4f32(<4 x float>, <4 x float>*, i32 immarg, <4 x i1>)
2247