blob: 6ebddac9871205eca588bcf16ed07d4c0e7ec991 [file] [log] [blame]
David Green9cf920e2020-03-20 08:25:19 +00001; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
David Greeneecba952020-04-22 16:33:11 +01002; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp -verify-machineinstrs %s -o - | FileCheck %s
David Green9cf920e2020-03-20 08:25:19 +00003
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: vmov r3, s0
David Green9cf920e2020-03-20 08:25:19 +000011; CHECK-NEXT: .LBB0_1: @ %vector.body
12; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
David Green37b9cc82020-03-25 11:35:53 +000013; CHECK-NEXT: vldrw.u32 q0, [r0], #16
David Green9cf920e2020-03-20 08:25:19 +000014; CHECK-NEXT: subs r2, #4
David Green37b9cc82020-03-25 11:35:53 +000015; CHECK-NEXT: vadd.f32 q0, q0, r3
16; CHECK-NEXT: vstrb.8 q0, [r1], #16
David Green9cf920e2020-03-20 08:25:19 +000017; CHECK-NEXT: bne .LBB0_1
18; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
19; CHECK-NEXT: bx lr
20entry:
21 %0 = and i32 %n, 7
22 %cmp = icmp eq i32 %0, 0
23 tail call void @llvm.assume(i1 %cmp)
24 %cmp18 = icmp sgt i32 %n, 0
25 br i1 %cmp18, label %vector.ph, label %for.cond.cleanup
26
27vector.ph: ; preds = %entry
28 %broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0
29 %broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
30 br label %vector.body
31
32vector.body: ; preds = %vector.body, %vector.ph
33 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
34 %1 = getelementptr inbounds float, float* %A, i32 %index
35 %2 = bitcast float* %1 to <4 x float>*
36 %wide.load = load <4 x float>, <4 x float>* %2, align 4
37 %3 = fadd fast <4 x float> %wide.load, %broadcast.splat11
38 %4 = getelementptr inbounds float, float* %C, i32 %index
39 %5 = bitcast float* %4 to <4 x float>*
40 store <4 x float> %3, <4 x float>* %5, align 4
41 %index.next = add i32 %index, 4
42 %6 = icmp eq i32 %index.next, %n
43 br i1 %6, label %for.cond.cleanup, label %vector.body
44
45for.cond.cleanup: ; preds = %vector.body, %entry
46 ret void
47}
48
49define arm_aapcs_vfpcc void @test_fadd_r(float* noalias nocapture readonly %A, float %B, float* noalias nocapture %C, i32 %n) {
50; CHECK-LABEL: test_fadd_r:
51; CHECK: @ %bb.0: @ %entry
52; CHECK-NEXT: cmp r2, #1
53; CHECK-NEXT: it lt
54; CHECK-NEXT: bxlt lr
55; CHECK-NEXT: vmov r3, s0
David Green9cf920e2020-03-20 08:25:19 +000056; CHECK-NEXT: .LBB1_1: @ %vector.body
57; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
David Green37b9cc82020-03-25 11:35:53 +000058; CHECK-NEXT: vldrw.u32 q0, [r0], #16
David Green9cf920e2020-03-20 08:25:19 +000059; CHECK-NEXT: subs r2, #4
David Green37b9cc82020-03-25 11:35:53 +000060; CHECK-NEXT: vadd.f32 q0, q0, r3
61; CHECK-NEXT: vstrb.8 q0, [r1], #16
David Green9cf920e2020-03-20 08:25:19 +000062; CHECK-NEXT: bne .LBB1_1
63; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
64; CHECK-NEXT: bx lr
65entry:
66 %0 = and i32 %n, 7
67 %cmp = icmp eq i32 %0, 0
68 tail call void @llvm.assume(i1 %cmp)
69 %cmp18 = icmp sgt i32 %n, 0
70 br i1 %cmp18, label %vector.ph, label %for.cond.cleanup
71
72vector.ph: ; preds = %entry
73 %broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0
74 %broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
75 br label %vector.body
76
77vector.body: ; preds = %vector.body, %vector.ph
78 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
79 %1 = getelementptr inbounds float, float* %A, i32 %index
80 %2 = bitcast float* %1 to <4 x float>*
81 %wide.load = load <4 x float>, <4 x float>* %2, align 4
82 %3 = fadd fast <4 x float> %broadcast.splat11, %wide.load
83 %4 = getelementptr inbounds float, float* %C, i32 %index
84 %5 = bitcast float* %4 to <4 x float>*
85 store <4 x float> %3, <4 x float>* %5, align 4
86 %index.next = add i32 %index, 4
87 %6 = icmp eq i32 %index.next, %n
88 br i1 %6, label %for.cond.cleanup, label %vector.body
89
90for.cond.cleanup: ; preds = %vector.body, %entry
91 ret void
92}
93
94define arm_aapcs_vfpcc void @test_fmul(float* noalias nocapture readonly %A, float %B, float* noalias nocapture %C, i32 %n) {
95; CHECK-LABEL: test_fmul:
96; CHECK: @ %bb.0: @ %entry
97; CHECK-NEXT: cmp r2, #1
98; CHECK-NEXT: it lt
99; CHECK-NEXT: bxlt lr
100; CHECK-NEXT: vmov r3, s0
David Green9cf920e2020-03-20 08:25:19 +0000101; CHECK-NEXT: .LBB2_1: @ %vector.body
102; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
David Green37b9cc82020-03-25 11:35:53 +0000103; CHECK-NEXT: vldrw.u32 q0, [r0], #16
David Green9cf920e2020-03-20 08:25:19 +0000104; CHECK-NEXT: subs r2, #4
David Green37b9cc82020-03-25 11:35:53 +0000105; CHECK-NEXT: vmul.f32 q0, q0, r3
106; CHECK-NEXT: vstrb.8 q0, [r1], #16
David Green9cf920e2020-03-20 08:25:19 +0000107; CHECK-NEXT: bne .LBB2_1
108; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
109; CHECK-NEXT: bx lr
110entry:
111 %0 = and i32 %n, 7
112 %cmp = icmp eq i32 %0, 0
113 tail call void @llvm.assume(i1 %cmp)
114 %cmp18 = icmp sgt i32 %n, 0
115 br i1 %cmp18, label %vector.ph, label %for.cond.cleanup
116
117vector.ph: ; preds = %entry
118 %broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0
119 %broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
120 br label %vector.body
121
122vector.body: ; preds = %vector.body, %vector.ph
123 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
124 %1 = getelementptr inbounds float, float* %A, i32 %index
125 %2 = bitcast float* %1 to <4 x float>*
126 %wide.load = load <4 x float>, <4 x float>* %2, align 4
127 %3 = fmul fast <4 x float> %wide.load, %broadcast.splat11
128 %4 = getelementptr inbounds float, float* %C, i32 %index
129 %5 = bitcast float* %4 to <4 x float>*
130 store <4 x float> %3, <4 x float>* %5, align 4
131 %index.next = add i32 %index, 4
132 %6 = icmp eq i32 %index.next, %n
133 br i1 %6, label %for.cond.cleanup, label %vector.body
134
135for.cond.cleanup: ; preds = %vector.body, %entry
136 ret void
137}
138
139define arm_aapcs_vfpcc void @test_fmul_r(float* noalias nocapture readonly %A, float %B, float* noalias nocapture %C, i32 %n) {
140; CHECK-LABEL: test_fmul_r:
141; CHECK: @ %bb.0: @ %entry
142; CHECK-NEXT: cmp r2, #1
143; CHECK-NEXT: it lt
144; CHECK-NEXT: bxlt lr
145; CHECK-NEXT: vmov r3, s0
David Green9cf920e2020-03-20 08:25:19 +0000146; CHECK-NEXT: .LBB3_1: @ %vector.body
147; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
David Green37b9cc82020-03-25 11:35:53 +0000148; CHECK-NEXT: vldrw.u32 q0, [r0], #16
David Green9cf920e2020-03-20 08:25:19 +0000149; CHECK-NEXT: subs r2, #4
David Green37b9cc82020-03-25 11:35:53 +0000150; CHECK-NEXT: vmul.f32 q0, q0, r3
151; CHECK-NEXT: vstrb.8 q0, [r1], #16
David Green9cf920e2020-03-20 08:25:19 +0000152; CHECK-NEXT: bne .LBB3_1
153; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
154; CHECK-NEXT: bx lr
155entry:
156 %0 = and i32 %n, 7
157 %cmp = icmp eq i32 %0, 0
158 tail call void @llvm.assume(i1 %cmp)
159 %cmp18 = icmp sgt i32 %n, 0
160 br i1 %cmp18, label %vector.ph, label %for.cond.cleanup
161
162vector.ph: ; preds = %entry
163 %broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0
164 %broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
165 br label %vector.body
166
167vector.body: ; preds = %vector.body, %vector.ph
168 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
169 %1 = getelementptr inbounds float, float* %A, i32 %index
170 %2 = bitcast float* %1 to <4 x float>*
171 %wide.load = load <4 x float>, <4 x float>* %2, align 4
172 %3 = fmul fast <4 x float> %broadcast.splat11, %wide.load
173 %4 = getelementptr inbounds float, float* %C, i32 %index
174 %5 = bitcast float* %4 to <4 x float>*
175 store <4 x float> %3, <4 x float>* %5, align 4
176 %index.next = add i32 %index, 4
177 %6 = icmp eq i32 %index.next, %n
178 br i1 %6, label %for.cond.cleanup, label %vector.body
179
180for.cond.cleanup: ; preds = %vector.body, %entry
181 ret void
182}
183
184define arm_aapcs_vfpcc void @test_fsub(float* noalias nocapture readonly %A, float %B, float* noalias nocapture %C, i32 %n) {
185; CHECK-LABEL: test_fsub:
186; CHECK: @ %bb.0: @ %entry
187; CHECK-NEXT: cmp r2, #1
188; CHECK-NEXT: it lt
189; CHECK-NEXT: bxlt lr
190; CHECK-NEXT: vmov r3, s0
David Green9cf920e2020-03-20 08:25:19 +0000191; CHECK-NEXT: .LBB4_1: @ %vector.body
192; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
David Green37b9cc82020-03-25 11:35:53 +0000193; CHECK-NEXT: vldrw.u32 q0, [r0], #16
David Green9cf920e2020-03-20 08:25:19 +0000194; CHECK-NEXT: subs r2, #4
David Green37b9cc82020-03-25 11:35:53 +0000195; CHECK-NEXT: vsub.f32 q0, q0, r3
196; CHECK-NEXT: vstrb.8 q0, [r1], #16
David Green9cf920e2020-03-20 08:25:19 +0000197; CHECK-NEXT: bne .LBB4_1
198; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
199; CHECK-NEXT: bx lr
200entry:
201 %0 = and i32 %n, 7
202 %cmp = icmp eq i32 %0, 0
203 tail call void @llvm.assume(i1 %cmp)
204 %cmp18 = icmp sgt i32 %n, 0
205 br i1 %cmp18, label %vector.ph, label %for.cond.cleanup
206
207vector.ph: ; preds = %entry
208 %broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0
209 %broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
210 br label %vector.body
211
212vector.body: ; preds = %vector.body, %vector.ph
213 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
214 %1 = getelementptr inbounds float, float* %A, i32 %index
215 %2 = bitcast float* %1 to <4 x float>*
216 %wide.load = load <4 x float>, <4 x float>* %2, align 4
217 %3 = fsub fast <4 x float> %wide.load, %broadcast.splat11
218 %4 = getelementptr inbounds float, float* %C, i32 %index
219 %5 = bitcast float* %4 to <4 x float>*
220 store <4 x float> %3, <4 x float>* %5, align 4
221 %index.next = add i32 %index, 4
222 %6 = icmp eq i32 %index.next, %n
223 br i1 %6, label %for.cond.cleanup, label %vector.body
224
225for.cond.cleanup: ; preds = %vector.body, %entry
226 ret void
227}
228
229define arm_aapcs_vfpcc void @test_fsub_r(float* noalias nocapture readonly %A, float %B, float* noalias nocapture %C, i32 %n) {
230; CHECK-LABEL: test_fsub_r:
231; CHECK: @ %bb.0: @ %entry
232; CHECK-NEXT: cmp r2, #1
233; CHECK-NEXT: it lt
234; CHECK-NEXT: bxlt lr
235; CHECK-NEXT: vmov r3, s0
236; CHECK-NEXT: vdup.32 q0, r3
237; CHECK-NEXT: .LBB5_1: @ %vector.body
238; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
239; CHECK-NEXT: vldrw.u32 q1, [r0], #16
240; CHECK-NEXT: subs r2, #4
241; CHECK-NEXT: vsub.f32 q1, q0, q1
242; CHECK-NEXT: vstrb.8 q1, [r1], #16
243; CHECK-NEXT: bne .LBB5_1
244; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
245; CHECK-NEXT: bx lr
246entry:
247 %0 = and i32 %n, 7
248 %cmp = icmp eq i32 %0, 0
249 tail call void @llvm.assume(i1 %cmp)
250 %cmp18 = icmp sgt i32 %n, 0
251 br i1 %cmp18, label %vector.ph, label %for.cond.cleanup
252
253vector.ph: ; preds = %entry
254 %broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0
255 %broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
256 br label %vector.body
257
258vector.body: ; preds = %vector.body, %vector.ph
259 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
260 %1 = getelementptr inbounds float, float* %A, i32 %index
261 %2 = bitcast float* %1 to <4 x float>*
262 %wide.load = load <4 x float>, <4 x float>* %2, align 4
263 %3 = fsub fast <4 x float> %broadcast.splat11, %wide.load
264 %4 = getelementptr inbounds float, float* %C, i32 %index
265 %5 = bitcast float* %4 to <4 x float>*
266 store <4 x float> %3, <4 x float>* %5, align 4
267 %index.next = add i32 %index, 4
268 %6 = icmp eq i32 %index.next, %n
269 br i1 %6, label %for.cond.cleanup, label %vector.body
270
271for.cond.cleanup: ; preds = %vector.body, %entry
272 ret void
273}
274
275
276define arm_aapcs_vfpcc void @test_fmas(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float %C, float* noalias nocapture %D, i32 %n) {
277; CHECK-LABEL: test_fmas:
278; CHECK: @ %bb.0: @ %entry
279; CHECK-NEXT: cmp r3, #1
280; CHECK-NEXT: it lt
281; CHECK-NEXT: bxlt lr
282; CHECK-NEXT: vmov r12, s0
David Green9cf920e2020-03-20 08:25:19 +0000283; CHECK-NEXT: .LBB6_1: @ %vector.body
284; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
David Green37b9cc82020-03-25 11:35:53 +0000285; CHECK-NEXT: vldrw.u32 q0, [r0], #16
286; CHECK-NEXT: vldrw.u32 q1, [r1], #16
David Green9cf920e2020-03-20 08:25:19 +0000287; CHECK-NEXT: subs r3, #4
David Green37b9cc82020-03-25 11:35:53 +0000288; CHECK-NEXT: vfmas.f32 q1, q0, r12
289; CHECK-NEXT: vstrb.8 q1, [r2], #16
David Green9cf920e2020-03-20 08:25:19 +0000290; CHECK-NEXT: bne .LBB6_1
291; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
292; CHECK-NEXT: bx lr
293entry:
294 %0 = and i32 %n, 7
295 %cmp = icmp eq i32 %0, 0
296 tail call void @llvm.assume(i1 %cmp)
297 %cmp110 = icmp sgt i32 %n, 0
298 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
299
300vector.ph: ; preds = %entry
301 %broadcast.splatinsert13 = insertelement <4 x float> undef, float %C, i32 0
302 %broadcast.splat14 = shufflevector <4 x float> %broadcast.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer
303 br label %vector.body
304
305vector.body: ; preds = %vector.body, %vector.ph
306 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
307 %1 = getelementptr inbounds float, float* %A, i32 %index
308 %2 = bitcast float* %1 to <4 x float>*
309 %wide.load = load <4 x float>, <4 x float>* %2, align 4
310 %3 = getelementptr inbounds float, float* %B, i32 %index
311 %4 = bitcast float* %3 to <4 x float>*
312 %wide.load12 = load <4 x float>, <4 x float>* %4, align 4
313 %5 = fmul fast <4 x float> %wide.load12, %wide.load
314 %6 = fadd fast <4 x float> %5, %broadcast.splat14
315 %7 = getelementptr inbounds float, float* %D, i32 %index
316 %8 = bitcast float* %7 to <4 x float>*
317 store <4 x float> %6, <4 x float>* %8, align 4
318 %index.next = add i32 %index, 4
319 %9 = icmp eq i32 %index.next, %n
320 br i1 %9, label %for.cond.cleanup, label %vector.body
321
322for.cond.cleanup: ; preds = %vector.body, %entry
323 ret void
324}
325
326define 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) {
327; CHECK-LABEL: test_fmas_r:
328; CHECK: @ %bb.0: @ %entry
329; CHECK-NEXT: cmp r3, #1
330; CHECK-NEXT: it lt
331; CHECK-NEXT: bxlt lr
332; CHECK-NEXT: vmov r12, s0
David Green9cf920e2020-03-20 08:25:19 +0000333; CHECK-NEXT: .LBB7_1: @ %vector.body
334; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
David Green37b9cc82020-03-25 11:35:53 +0000335; CHECK-NEXT: vldrw.u32 q0, [r0], #16
336; CHECK-NEXT: vldrw.u32 q1, [r1], #16
David Green9cf920e2020-03-20 08:25:19 +0000337; CHECK-NEXT: subs r3, #4
David Green37b9cc82020-03-25 11:35:53 +0000338; CHECK-NEXT: vfmas.f32 q1, q0, r12
339; CHECK-NEXT: vstrb.8 q1, [r2], #16
David Green9cf920e2020-03-20 08:25:19 +0000340; CHECK-NEXT: bne .LBB7_1
341; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
342; CHECK-NEXT: bx lr
343entry:
344 %0 = and i32 %n, 7
345 %cmp = icmp eq i32 %0, 0
346 tail call void @llvm.assume(i1 %cmp)
347 %cmp110 = icmp sgt i32 %n, 0
348 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
349
350vector.ph: ; preds = %entry
351 %broadcast.splatinsert13 = insertelement <4 x float> undef, float %C, i32 0
352 %broadcast.splat14 = shufflevector <4 x float> %broadcast.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer
353 br label %vector.body
354
355vector.body: ; preds = %vector.body, %vector.ph
356 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
357 %1 = getelementptr inbounds float, float* %A, i32 %index
358 %2 = bitcast float* %1 to <4 x float>*
359 %wide.load = load <4 x float>, <4 x float>* %2, align 4
360 %3 = getelementptr inbounds float, float* %B, i32 %index
361 %4 = bitcast float* %3 to <4 x float>*
362 %wide.load12 = load <4 x float>, <4 x float>* %4, align 4
363 %5 = fmul fast <4 x float> %wide.load12, %wide.load
364 %6 = fadd fast <4 x float> %broadcast.splat14, %5
365 %7 = getelementptr inbounds float, float* %D, i32 %index
366 %8 = bitcast float* %7 to <4 x float>*
367 store <4 x float> %6, <4 x float>* %8, align 4
368 %index.next = add i32 %index, 4
369 %9 = icmp eq i32 %index.next, %n
370 br i1 %9, label %for.cond.cleanup, label %vector.body
371
372for.cond.cleanup: ; preds = %vector.body, %entry
373 ret void
374}
375
376define arm_aapcs_vfpcc void @test_fma(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float %C, float* noalias nocapture %D, i32 %n) {
377; CHECK-LABEL: test_fma:
378; CHECK: @ %bb.0: @ %entry
379; CHECK-NEXT: cmp r3, #1
380; CHECK-NEXT: it lt
381; CHECK-NEXT: bxlt lr
382; CHECK-NEXT: vmov r12, s0
David Green9cf920e2020-03-20 08:25:19 +0000383; CHECK-NEXT: .LBB8_1: @ %vector.body
384; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
David Green37b9cc82020-03-25 11:35:53 +0000385; CHECK-NEXT: vldrw.u32 q0, [r0], #16
386; CHECK-NEXT: vldrw.u32 q1, [r1], #16
David Green9cf920e2020-03-20 08:25:19 +0000387; CHECK-NEXT: subs r3, #4
David Green37b9cc82020-03-25 11:35:53 +0000388; CHECK-NEXT: vfma.f32 q1, q0, r12
389; CHECK-NEXT: vstrb.8 q1, [r2], #16
David Green9cf920e2020-03-20 08:25:19 +0000390; CHECK-NEXT: bne .LBB8_1
391; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
392; CHECK-NEXT: bx lr
393entry:
394 %0 = and i32 %n, 7
395 %cmp = icmp eq i32 %0, 0
396 tail call void @llvm.assume(i1 %cmp)
397 %cmp110 = icmp sgt i32 %n, 0
398 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
399
400vector.ph: ; preds = %entry
401 %broadcast.splatinsert12 = insertelement <4 x float> undef, float %C, i32 0
402 %broadcast.splat13 = shufflevector <4 x float> %broadcast.splatinsert12, <4 x float> undef, <4 x i32> zeroinitializer
403 br label %vector.body
404
405vector.body: ; preds = %vector.body, %vector.ph
406 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
407 %1 = getelementptr inbounds float, float* %A, i32 %index
408 %2 = bitcast float* %1 to <4 x float>*
409 %wide.load = load <4 x float>, <4 x float>* %2, align 4
410 %3 = fmul fast <4 x float> %wide.load, %broadcast.splat13
411 %4 = getelementptr inbounds float, float* %B, i32 %index
412 %5 = bitcast float* %4 to <4 x float>*
413 %wide.load14 = load <4 x float>, <4 x float>* %5, align 4
414 %6 = fadd fast <4 x float> %3, %wide.load14
415 %7 = getelementptr inbounds float, float* %D, i32 %index
416 %8 = bitcast float* %7 to <4 x float>*
417 store <4 x float> %6, <4 x float>* %8, align 4
418 %index.next = add i32 %index, 4
419 %9 = icmp eq i32 %index.next, %n
420 br i1 %9, label %for.cond.cleanup, label %vector.body
421
422for.cond.cleanup: ; preds = %vector.body, %entry
423 ret void
424}
425
426define 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) {
427; CHECK-LABEL: test_fma_r:
428; CHECK: @ %bb.0: @ %entry
429; CHECK-NEXT: cmp r3, #1
430; CHECK-NEXT: it lt
431; CHECK-NEXT: bxlt lr
432; CHECK-NEXT: vmov r12, s0
David Green9cf920e2020-03-20 08:25:19 +0000433; CHECK-NEXT: .LBB9_1: @ %vector.body
434; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
David Green37b9cc82020-03-25 11:35:53 +0000435; CHECK-NEXT: vldrw.u32 q0, [r0], #16
436; CHECK-NEXT: vldrw.u32 q1, [r1], #16
David Green9cf920e2020-03-20 08:25:19 +0000437; CHECK-NEXT: subs r3, #4
David Green37b9cc82020-03-25 11:35:53 +0000438; CHECK-NEXT: vfma.f32 q1, q0, r12
439; CHECK-NEXT: vstrb.8 q1, [r2], #16
David Green9cf920e2020-03-20 08:25:19 +0000440; CHECK-NEXT: bne .LBB9_1
441; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
442; CHECK-NEXT: bx lr
443entry:
444 %0 = and i32 %n, 7
445 %cmp = icmp eq i32 %0, 0
446 tail call void @llvm.assume(i1 %cmp)
447 %cmp110 = icmp sgt i32 %n, 0
448 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
449
450vector.ph: ; preds = %entry
451 %broadcast.splatinsert12 = insertelement <4 x float> undef, float %C, i32 0
452 %broadcast.splat13 = shufflevector <4 x float> %broadcast.splatinsert12, <4 x float> undef, <4 x i32> zeroinitializer
453 br label %vector.body
454
455vector.body: ; preds = %vector.body, %vector.ph
456 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
457 %1 = getelementptr inbounds float, float* %A, i32 %index
458 %2 = bitcast float* %1 to <4 x float>*
459 %wide.load = load <4 x float>, <4 x float>* %2, align 4
460 %3 = fmul fast <4 x float> %broadcast.splat13, %wide.load
461 %4 = getelementptr inbounds float, float* %B, i32 %index
462 %5 = bitcast float* %4 to <4 x float>*
463 %wide.load14 = load <4 x float>, <4 x float>* %5, align 4
464 %6 = fadd fast <4 x float> %3, %wide.load14
465 %7 = getelementptr inbounds float, float* %D, i32 %index
466 %8 = bitcast float* %7 to <4 x float>*
467 store <4 x float> %6, <4 x float>* %8, align 4
468 %index.next = add i32 %index, 4
469 %9 = icmp eq i32 %index.next, %n
470 br i1 %9, label %for.cond.cleanup, label %vector.body
471
472for.cond.cleanup: ; preds = %vector.body, %entry
473 ret void
474}
475
476
477define arm_aapcs_vfpcc void @test_fmss(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float %C, float* noalias nocapture %D, i32 %n) {
478; CHECK-LABEL: test_fmss:
479; CHECK: @ %bb.0: @ %entry
480; CHECK-NEXT: cmp r3, #1
481; CHECK-NEXT: it lt
482; CHECK-NEXT: bxlt lr
483; CHECK-NEXT: vmov r12, s0
484; CHECK-NEXT: vdup.32 q0, r12
485; CHECK-NEXT: vneg.f32 q0, q0
486; CHECK-NEXT: .LBB10_1: @ %vector.body
487; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
488; CHECK-NEXT: vldrw.u32 q1, [r0], #16
489; CHECK-NEXT: vldrw.u32 q2, [r1], #16
490; CHECK-NEXT: vmov q3, q0
491; CHECK-NEXT: subs r3, #4
492; CHECK-NEXT: vfma.f32 q3, q2, q1
493; CHECK-NEXT: vstrb.8 q3, [r2], #16
494; CHECK-NEXT: bne .LBB10_1
495; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
496; CHECK-NEXT: bx lr
497entry:
498 %0 = and i32 %n, 7
499 %cmp = icmp eq i32 %0, 0
500 tail call void @llvm.assume(i1 %cmp)
501 %cmp110 = icmp sgt i32 %n, 0
502 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
503
504vector.ph: ; preds = %entry
505 %broadcast.splatinsert13 = insertelement <4 x float> undef, float %C, i32 0
506 %broadcast.splat14 = shufflevector <4 x float> %broadcast.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer
507 br label %vector.body
508
509vector.body: ; preds = %vector.body, %vector.ph
510 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
511 %1 = getelementptr inbounds float, float* %A, i32 %index
512 %2 = bitcast float* %1 to <4 x float>*
513 %wide.load = load <4 x float>, <4 x float>* %2, align 4
514 %3 = getelementptr inbounds float, float* %B, i32 %index
515 %4 = bitcast float* %3 to <4 x float>*
516 %wide.load12 = load <4 x float>, <4 x float>* %4, align 4
517 %5 = fmul fast <4 x float> %wide.load12, %wide.load
518 %6 = fsub fast <4 x float> %5, %broadcast.splat14
519 %7 = getelementptr inbounds float, float* %D, i32 %index
520 %8 = bitcast float* %7 to <4 x float>*
521 store <4 x float> %6, <4 x float>* %8, align 4
522 %index.next = add i32 %index, 4
523 %9 = icmp eq i32 %index.next, %n
524 br i1 %9, label %for.cond.cleanup, label %vector.body
525
526for.cond.cleanup: ; preds = %vector.body, %entry
527 ret void
528}
529
530define 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) {
531; CHECK-LABEL: test_fmss_r:
532; CHECK: @ %bb.0: @ %entry
533; CHECK-NEXT: cmp r3, #1
534; CHECK-NEXT: it lt
535; CHECK-NEXT: bxlt lr
536; CHECK-NEXT: vmov r12, s0
537; CHECK-NEXT: vdup.32 q0, r12
538; CHECK-NEXT: .LBB11_1: @ %vector.body
539; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
540; CHECK-NEXT: vldrw.u32 q1, [r0], #16
541; CHECK-NEXT: vldrw.u32 q2, [r1], #16
542; CHECK-NEXT: vmov q3, q0
543; CHECK-NEXT: subs r3, #4
544; CHECK-NEXT: vfms.f32 q3, q2, q1
545; CHECK-NEXT: vstrb.8 q3, [r2], #16
546; CHECK-NEXT: bne .LBB11_1
547; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
548; CHECK-NEXT: bx lr
549entry:
550 %0 = and i32 %n, 7
551 %cmp = icmp eq i32 %0, 0
552 tail call void @llvm.assume(i1 %cmp)
553 %cmp110 = icmp sgt i32 %n, 0
554 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
555
556vector.ph: ; preds = %entry
557 %broadcast.splatinsert13 = insertelement <4 x float> undef, float %C, i32 0
558 %broadcast.splat14 = shufflevector <4 x float> %broadcast.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer
559 br label %vector.body
560
561vector.body: ; preds = %vector.body, %vector.ph
562 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
563 %1 = getelementptr inbounds float, float* %A, i32 %index
564 %2 = bitcast float* %1 to <4 x float>*
565 %wide.load = load <4 x float>, <4 x float>* %2, align 4
566 %3 = getelementptr inbounds float, float* %B, i32 %index
567 %4 = bitcast float* %3 to <4 x float>*
568 %wide.load12 = load <4 x float>, <4 x float>* %4, align 4
569 %5 = fmul fast <4 x float> %wide.load12, %wide.load
570 %6 = fsub fast <4 x float> %broadcast.splat14, %5
571 %7 = getelementptr inbounds float, float* %D, i32 %index
572 %8 = bitcast float* %7 to <4 x float>*
573 store <4 x float> %6, <4 x float>* %8, align 4
574 %index.next = add i32 %index, 4
575 %9 = icmp eq i32 %index.next, %n
576 br i1 %9, label %for.cond.cleanup, label %vector.body
577
578for.cond.cleanup: ; preds = %vector.body, %entry
579 ret void
580}
581
582define arm_aapcs_vfpcc void @test_fms(float* noalias nocapture readonly %A, float* noalias nocapture readonly %B, float %C, float* noalias nocapture %D, i32 %n) {
583; CHECK-LABEL: test_fms:
584; CHECK: @ %bb.0: @ %entry
585; CHECK-NEXT: cmp r3, #1
586; CHECK-NEXT: it lt
587; CHECK-NEXT: bxlt lr
588; CHECK-NEXT: vmov r12, s0
David Green9cf920e2020-03-20 08:25:19 +0000589; CHECK-NEXT: .LBB12_1: @ %vector.body
590; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
David Green37b9cc82020-03-25 11:35:53 +0000591; CHECK-NEXT: vldrw.u32 q0, [r1], #16
592; CHECK-NEXT: vldrw.u32 q1, [r0], #16
David Green9cf920e2020-03-20 08:25:19 +0000593; CHECK-NEXT: subs r3, #4
David Green37b9cc82020-03-25 11:35:53 +0000594; CHECK-NEXT: vneg.f32 q0, q0
595; CHECK-NEXT: vfma.f32 q0, q1, r12
596; CHECK-NEXT: vstrb.8 q0, [r2], #16
David Green9cf920e2020-03-20 08:25:19 +0000597; CHECK-NEXT: bne .LBB12_1
598; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
599; CHECK-NEXT: bx lr
600entry:
601 %0 = and i32 %n, 7
602 %cmp = icmp eq i32 %0, 0
603 tail call void @llvm.assume(i1 %cmp)
604 %cmp110 = icmp sgt i32 %n, 0
605 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
606
607vector.ph: ; preds = %entry
608 %broadcast.splatinsert12 = insertelement <4 x float> undef, float %C, i32 0
609 %broadcast.splat13 = shufflevector <4 x float> %broadcast.splatinsert12, <4 x float> undef, <4 x i32> zeroinitializer
610 br label %vector.body
611
612vector.body: ; preds = %vector.body, %vector.ph
613 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
614 %1 = getelementptr inbounds float, float* %A, i32 %index
615 %2 = bitcast float* %1 to <4 x float>*
616 %wide.load = load <4 x float>, <4 x float>* %2, align 4
617 %3 = fmul fast <4 x float> %wide.load, %broadcast.splat13
618 %4 = getelementptr inbounds float, float* %B, i32 %index
619 %5 = bitcast float* %4 to <4 x float>*
620 %wide.load14 = load <4 x float>, <4 x float>* %5, align 4
621 %6 = fsub fast <4 x float> %3, %wide.load14
622 %7 = getelementptr inbounds float, float* %D, i32 %index
623 %8 = bitcast float* %7 to <4 x float>*
624 store <4 x float> %6, <4 x float>* %8, align 4
625 %index.next = add i32 %index, 4
626 %9 = icmp eq i32 %index.next, %n
627 br i1 %9, label %for.cond.cleanup, label %vector.body
628
629for.cond.cleanup: ; preds = %vector.body, %entry
630 ret void
631}
632
633define 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) {
634; CHECK-LABEL: test_fms_r:
635; CHECK: @ %bb.0: @ %entry
636; CHECK-NEXT: cmp r3, #1
637; CHECK-NEXT: it lt
638; CHECK-NEXT: bxlt lr
639; CHECK-NEXT: vmov r12, s0
David Green9cf920e2020-03-20 08:25:19 +0000640; CHECK-NEXT: .LBB13_1: @ %vector.body
641; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
David Green37b9cc82020-03-25 11:35:53 +0000642; CHECK-NEXT: vldrw.u32 q0, [r1], #16
643; CHECK-NEXT: vldrw.u32 q1, [r0], #16
David Green9cf920e2020-03-20 08:25:19 +0000644; CHECK-NEXT: subs r3, #4
David Green37b9cc82020-03-25 11:35:53 +0000645; CHECK-NEXT: vneg.f32 q0, q0
646; CHECK-NEXT: vfma.f32 q0, q1, r12
647; CHECK-NEXT: vstrb.8 q0, [r2], #16
David Green9cf920e2020-03-20 08:25:19 +0000648; CHECK-NEXT: bne .LBB13_1
649; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup
650; CHECK-NEXT: bx lr
651entry:
652 %0 = and i32 %n, 7
653 %cmp = icmp eq i32 %0, 0
654 tail call void @llvm.assume(i1 %cmp)
655 %cmp110 = icmp sgt i32 %n, 0
656 br i1 %cmp110, label %vector.ph, label %for.cond.cleanup
657
658vector.ph: ; preds = %entry
659 %broadcast.splatinsert12 = insertelement <4 x float> undef, float %C, i32 0
660 %broadcast.splat13 = shufflevector <4 x float> %broadcast.splatinsert12, <4 x float> undef, <4 x i32> zeroinitializer
661 br label %vector.body
662
663vector.body: ; preds = %vector.body, %vector.ph
664 %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
665 %1 = getelementptr inbounds float, float* %A, i32 %index
666 %2 = bitcast float* %1 to <4 x float>*
667 %wide.load = load <4 x float>, <4 x float>* %2, align 4
668 %3 = fmul fast <4 x float> %broadcast.splat13, %wide.load
669 %4 = getelementptr inbounds float, float* %B, i32 %index
670 %5 = bitcast float* %4 to <4 x float>*
671 %wide.load14 = load <4 x float>, <4 x float>* %5, align 4
672 %6 = fsub fast <4 x float> %3, %wide.load14
673 %7 = getelementptr inbounds float, float* %D, i32 %index
674 %8 = bitcast float* %7 to <4 x float>*
675 store <4 x float> %6, <4 x float>* %8, align 4
676 %index.next = add i32 %index, 4
677 %9 = icmp eq i32 %index.next, %n
678 br i1 %9, label %for.cond.cleanup, label %vector.body
679
680for.cond.cleanup: ; preds = %vector.body, %entry
681 ret void
682}
683
684
685define 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, float %in) local_unnamed_addr #0 {
686; CHECK-LABEL: test_nested:
687; CHECK: @ %bb.0: @ %for.body.us.preheader
David Green076e08a2020-05-29 10:53:30 +0100688; CHECK-NEXT: .save {r4, r5, r6, lr}
689; CHECK-NEXT: push {r4, r5, r6, lr}
690; CHECK-NEXT: ldrd lr, r12, [sp, #16]
David Green9cf920e2020-03-20 08:25:19 +0000691; CHECK-NEXT: lsl.w r3, r12, #2
692; CHECK-NEXT: dls lr, lr
693; CHECK-NEXT: .LBB14_1: @ %for.body.us
694; CHECK-NEXT: @ =>This Loop Header: Depth=1
695; CHECK-NEXT: @ Child Loop BB14_2 Depth 2
David Greenb3499f52020-03-20 09:23:57 +0000696; CHECK-NEXT: ldr r4, [r1]
David Green076e08a2020-05-29 10:53:30 +0100697; CHECK-NEXT: mov r5, r2
698; CHECK-NEXT: mov r6, r12
David Green9cf920e2020-03-20 08:25:19 +0000699; CHECK-NEXT: vdup.32 q0, r4
David Green076e08a2020-05-29 10:53:30 +0100700; CHECK-NEXT: mov r4, r0
David Green9cf920e2020-03-20 08:25:19 +0000701; CHECK-NEXT: .LBB14_2: @ %vector.body
702; CHECK-NEXT: @ Parent Loop BB14_1 Depth=1
703; CHECK-NEXT: @ => This Inner Loop Header: Depth=2
David Green076e08a2020-05-29 10:53:30 +0100704; CHECK-NEXT: vldrw.u32 q1, [r5], #16
705; CHECK-NEXT: vldrw.u32 q2, [r4]
706; CHECK-NEXT: subs r6, #4
David Green9cf920e2020-03-20 08:25:19 +0000707; CHECK-NEXT: vfms.f32 q2, q1, q0
David Green076e08a2020-05-29 10:53:30 +0100708; CHECK-NEXT: vstrb.8 q2, [r4], #16
David Green9cf920e2020-03-20 08:25:19 +0000709; CHECK-NEXT: bne .LBB14_2
710; CHECK-NEXT: @ %bb.3: @ %for.cond6.for.end_crit_edge.us
711; CHECK-NEXT: @ in Loop: Header=BB14_1 Depth=1
712; CHECK-NEXT: add r0, r3
713; CHECK-NEXT: add r2, r3
714; CHECK-NEXT: adds r1, #4
715; CHECK-NEXT: le lr, .LBB14_1
716; CHECK-NEXT: @ %bb.4: @ %for.end14
David Green076e08a2020-05-29 10:53:30 +0100717; CHECK-NEXT: pop {r4, r5, r6, pc}
David Green9cf920e2020-03-20 08:25:19 +0000718for.body.us.preheader:
719 %cmp = icmp sgt i32 %numRows, 0
720 tail call void @llvm.assume(i1 %cmp)
721 %cmp1 = icmp sgt i32 %numCols, 0
722 tail call void @llvm.assume(i1 %cmp1)
723 %rem = and i32 %numCols, 7
724 %cmp2 = icmp eq i32 %rem, 0
725 tail call void @llvm.assume(i1 %cmp2)
726 %cmp3 = icmp slt i32 %l, %numCols
727 tail call void @llvm.assume(i1 %cmp3)
728 br label %for.body.us
729
730for.body.us: ; preds = %for.cond6.for.end_crit_edge.us, %for.body.us.preheader
731 %pInT1.addr.038.us = phi float* [ %scevgep40, %for.cond6.for.end_crit_edge.us ], [ %pInT1, %for.body.us.preheader ]
732 %i.037.us = phi i32 [ %inc13.us, %for.cond6.for.end_crit_edge.us ], [ 0, %for.body.us.preheader ]
733 %pOutT1.addr.036.us = phi float* [ %incdec.ptr.us, %for.cond6.for.end_crit_edge.us ], [ %pOutT1, %for.body.us.preheader ]
734 %pPRT_in.addr.035.us = phi float* [ %scevgep, %for.cond6.for.end_crit_edge.us ], [ %pPRT_in, %for.body.us.preheader ]
735 %scevgep = getelementptr float, float* %pPRT_in.addr.035.us, i32 %numCols
736 %0 = load float, float* %pOutT1.addr.036.us, align 4
737 %broadcast.splatinsert47 = insertelement <4 x float> undef, float %0, i32 0
738 %broadcast.splat48 = shufflevector <4 x float> %broadcast.splatinsert47, <4 x float> undef, <4 x i32> zeroinitializer
739 br label %vector.body
740
741vector.body: ; preds = %vector.body, %for.body.us
742 %index = phi i32 [ 0, %for.body.us ], [ %index.next, %vector.body ]
743 %next.gep = getelementptr float, float* %pInT1.addr.038.us, i32 %index
744 %next.gep45 = getelementptr float, float* %pPRT_in.addr.035.us, i32 %index
745 %1 = bitcast float* %next.gep to <4 x float>*
746 %wide.load = load <4 x float>, <4 x float>* %1, align 4
747 %2 = bitcast float* %next.gep45 to <4 x float>*
748 %wide.load46 = load <4 x float>, <4 x float>* %2, align 4
749 %3 = fmul fast <4 x float> %wide.load46, %broadcast.splat48
750 %4 = fsub fast <4 x float> %wide.load, %3
751 store <4 x float> %4, <4 x float>* %1, align 4
752 %index.next = add i32 %index, 4
753 %5 = icmp eq i32 %index.next, %numCols
754 br i1 %5, label %for.cond6.for.end_crit_edge.us, label %vector.body
755
756for.cond6.for.end_crit_edge.us: ; preds = %vector.body
757 %incdec.ptr.us = getelementptr inbounds float, float* %pOutT1.addr.036.us, i32 1
758 %scevgep40 = getelementptr float, float* %pInT1.addr.038.us, i32 %numCols
759 %inc13.us = add nuw nsw i32 %i.037.us, 1
760 %exitcond41 = icmp eq i32 %inc13.us, %numRows
761 br i1 %exitcond41, label %for.end14, label %for.body.us
762
763for.end14: ; preds = %for.cond6.for.end_crit_edge.us
764 ret void
765}
766
767%struct.arm_fir_instance_f32 = type { i16, float*, float* }
768define void @arm_fir_f32_1_4_mve(%struct.arm_fir_instance_f32* nocapture readonly %S, float* nocapture readonly %pSrc, float* %pDst, i32 %blockSize) {
769; CHECK-LABEL: arm_fir_f32_1_4_mve:
770; CHECK: @ %bb.0: @ %entry
David Green37b9cc82020-03-25 11:35:53 +0000771; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
772; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
David Green076e08a2020-05-29 10:53:30 +0100773; CHECK-NEXT: .pad #8
774; CHECK-NEXT: sub sp, #8
775; CHECK-NEXT: ldrh.w r9, [r0]
776; CHECK-NEXT: mov r11, r1
David Greenfa152552020-05-13 14:35:32 +0100777; CHECK-NEXT: ldr.w r12, [r0, #4]
David Green076e08a2020-05-29 10:53:30 +0100778; CHECK-NEXT: sub.w r1, r9, #1
779; CHECK-NEXT: cmp r1, #3
David Green9cf920e2020-03-20 08:25:19 +0000780; CHECK-NEXT: bhi .LBB15_6
781; CHECK-NEXT: @ %bb.1: @ %if.then
David Greenfa152552020-05-13 14:35:32 +0100782; CHECK-NEXT: ldr r4, [r0, #8]
David Green076e08a2020-05-29 10:53:30 +0100783; CHECK-NEXT: lsr.w lr, r3, #2
784; CHECK-NEXT: ldrd r7, r6, [r4]
785; CHECK-NEXT: ldrd r5, r8, [r4, #8]
786; CHECK-NEXT: add.w r4, r12, r1, lsl #2
David Green9cf920e2020-03-20 08:25:19 +0000787; CHECK-NEXT: wls lr, lr, .LBB15_5
788; CHECK-NEXT: @ %bb.2: @ %while.body.lr.ph
David Green076e08a2020-05-29 10:53:30 +0100789; CHECK-NEXT: bic r1, r3, #3
790; CHECK-NEXT: str r1, [sp] @ 4-byte Spill
791; CHECK-NEXT: add.w r10, r12, #4
792; CHECK-NEXT: add.w r1, r2, r1, lsl #2
793; CHECK-NEXT: str r1, [sp, #4] @ 4-byte Spill
794; CHECK-NEXT: mov r1, r11
David Green9cf920e2020-03-20 08:25:19 +0000795; CHECK-NEXT: .LBB15_3: @ %while.body
796; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
David Green076e08a2020-05-29 10:53:30 +0100797; CHECK-NEXT: vldrw.u32 q0, [r1], #16
798; CHECK-NEXT: vstrb.8 q0, [r4], #16
799; CHECK-NEXT: vldrw.u32 q0, [r10, #-4]
800; CHECK-NEXT: vldrw.u32 q1, [r10], #16
David Greenfa152552020-05-13 14:35:32 +0100801; CHECK-NEXT: vmul.f32 q0, q0, r7
David Green076e08a2020-05-29 10:53:30 +0100802; CHECK-NEXT: vldrw.u32 q2, [r10, #-8]
803; CHECK-NEXT: vfma.f32 q0, q1, r6
804; CHECK-NEXT: vldrw.u32 q1, [r10, #-12]
805; CHECK-NEXT: vfma.f32 q0, q1, r5
806; CHECK-NEXT: vfma.f32 q0, q2, r8
807; CHECK-NEXT: vstrb.8 q0, [r2], #16
David Green9cf920e2020-03-20 08:25:19 +0000808; CHECK-NEXT: le lr, .LBB15_3
809; CHECK-NEXT: @ %bb.4: @ %while.end.loopexit
David Green076e08a2020-05-29 10:53:30 +0100810; CHECK-NEXT: ldr r1, [sp] @ 4-byte Reload
811; CHECK-NEXT: ldr r2, [sp, #4] @ 4-byte Reload
812; CHECK-NEXT: add.w r12, r12, r1, lsl #2
813; CHECK-NEXT: add.w r11, r11, r1, lsl #2
David Green9cf920e2020-03-20 08:25:19 +0000814; CHECK-NEXT: .LBB15_5: @ %while.end
David Green076e08a2020-05-29 10:53:30 +0100815; CHECK-NEXT: and r1, r3, #3
816; CHECK-NEXT: vldrw.u32 q0, [r11]
817; CHECK-NEXT: vctp.32 r1
David Green9cf920e2020-03-20 08:25:19 +0000818; CHECK-NEXT: vpst
David Greenfa152552020-05-13 14:35:32 +0100819; CHECK-NEXT: vstrwt.32 q0, [r4]
820; CHECK-NEXT: vldrw.u32 q0, [r12]
821; CHECK-NEXT: vldrw.u32 q1, [r12, #4]
David Green37b9cc82020-03-25 11:35:53 +0000822; CHECK-NEXT: vmul.f32 q0, q0, r7
David Green076e08a2020-05-29 10:53:30 +0100823; CHECK-NEXT: vfma.f32 q0, q1, r6
David Greenfa152552020-05-13 14:35:32 +0100824; CHECK-NEXT: vldrw.u32 q1, [r12, #8]
David Green076e08a2020-05-29 10:53:30 +0100825; CHECK-NEXT: vfma.f32 q0, q1, r5
David Greenfa152552020-05-13 14:35:32 +0100826; CHECK-NEXT: vldrw.u32 q1, [r12, #12]
David Green076e08a2020-05-29 10:53:30 +0100827; CHECK-NEXT: vfma.f32 q0, q1, r8
David Green9cf920e2020-03-20 08:25:19 +0000828; CHECK-NEXT: vpst
David Green37b9cc82020-03-25 11:35:53 +0000829; CHECK-NEXT: vstrwt.32 q0, [r2]
David Greenfa152552020-05-13 14:35:32 +0100830; CHECK-NEXT: ldr.w r12, [r0, #4]
David Green9cf920e2020-03-20 08:25:19 +0000831; CHECK-NEXT: .LBB15_6: @ %if.end
David Green076e08a2020-05-29 10:53:30 +0100832; CHECK-NEXT: add.w r0, r12, r3, lsl #2
833; CHECK-NEXT: lsr.w lr, r9, #2
David Green9cf920e2020-03-20 08:25:19 +0000834; CHECK-NEXT: wls lr, lr, .LBB15_10
835; CHECK-NEXT: @ %bb.7: @ %while.body51.preheader
David Green076e08a2020-05-29 10:53:30 +0100836; CHECK-NEXT: bic r2, r9, #3
837; CHECK-NEXT: adds r1, r2, r3
David Greenfa152552020-05-13 14:35:32 +0100838; CHECK-NEXT: mov r3, r12
David Greenfa152552020-05-13 14:35:32 +0100839; CHECK-NEXT: add.w r1, r12, r1, lsl #2
David Green9cf920e2020-03-20 08:25:19 +0000840; CHECK-NEXT: .LBB15_8: @ %while.body51
841; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
842; CHECK-NEXT: vldrw.u32 q0, [r0], #16
843; CHECK-NEXT: vstrb.8 q0, [r3], #16
844; CHECK-NEXT: le lr, .LBB15_8
845; CHECK-NEXT: @ %bb.9: @ %while.end55.loopexit
David Greenfa152552020-05-13 14:35:32 +0100846; CHECK-NEXT: add.w r12, r12, r2, lsl #2
David Green9cf920e2020-03-20 08:25:19 +0000847; CHECK-NEXT: mov r0, r1
848; CHECK-NEXT: .LBB15_10: @ %while.end55
David Green076e08a2020-05-29 10:53:30 +0100849; CHECK-NEXT: ands r1, r9, #3
David Green9cf920e2020-03-20 08:25:19 +0000850; CHECK-NEXT: beq .LBB15_12
851; CHECK-NEXT: @ %bb.11: @ %if.then59
852; CHECK-NEXT: vldrw.u32 q0, [r0]
853; CHECK-NEXT: vctp.32 r1
854; CHECK-NEXT: vpst
David Greenfa152552020-05-13 14:35:32 +0100855; CHECK-NEXT: vstrwt.32 q0, [r12]
David Green9cf920e2020-03-20 08:25:19 +0000856; CHECK-NEXT: .LBB15_12: @ %if.end61
David Green076e08a2020-05-29 10:53:30 +0100857; CHECK-NEXT: add sp, #8
David Green37b9cc82020-03-25 11:35:53 +0000858; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
David Green9cf920e2020-03-20 08:25:19 +0000859entry:
860 %pState1 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 1
861 %0 = load float*, float** %pState1, align 4
862 %pCoeffs2 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 2
863 %1 = load float*, float** %pCoeffs2, align 4
864 %numTaps3 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 0
865 %2 = load i16, i16* %numTaps3, align 4
866 %conv = zext i16 %2 to i32
867 %sub = add nsw i32 %conv, -1
868 %cmp = icmp ult i32 %sub, 4
869 br i1 %cmp, label %if.then, label %if.end
870
871if.then: ; preds = %entry
872 %arrayidx = getelementptr inbounds float, float* %0, i32 %sub
873 %incdec.ptr = getelementptr inbounds float, float* %1, i32 1
874 %3 = load float, float* %1, align 4
875 %incdec.ptr6 = getelementptr inbounds float, float* %1, i32 2
876 %4 = load float, float* %incdec.ptr, align 4
877 %incdec.ptr7 = getelementptr inbounds float, float* %1, i32 3
878 %5 = load float, float* %incdec.ptr6, align 4
879 %6 = load float, float* %incdec.ptr7, align 4
880 %shr = lshr i32 %blockSize, 2
881 %cmp9146 = icmp eq i32 %shr, 0
882 %.pre161 = insertelement <4 x float> undef, float %3, i32 0
883 %.pre162 = shufflevector <4 x float> %.pre161, <4 x float> undef, <4 x i32> zeroinitializer
884 %.pre163 = insertelement <4 x float> undef, float %4, i32 0
885 %.pre164 = shufflevector <4 x float> %.pre163, <4 x float> undef, <4 x i32> zeroinitializer
886 %.pre165 = insertelement <4 x float> undef, float %5, i32 0
887 %.pre166 = shufflevector <4 x float> %.pre165, <4 x float> undef, <4 x i32> zeroinitializer
888 %.pre167 = insertelement <4 x float> undef, float %6, i32 0
889 %.pre168 = shufflevector <4 x float> %.pre167, <4 x float> undef, <4 x i32> zeroinitializer
890 br i1 %cmp9146, label %while.end, label %while.body.lr.ph
891
892while.body.lr.ph: ; preds = %if.then
893 %7 = and i32 %blockSize, -4
894 %scevgep158 = getelementptr float, float* %pDst, i32 %7
895 br label %while.body
896
897while.body: ; preds = %while.body.lr.ph, %while.body
898 %pStateCur.0151 = phi float* [ %arrayidx, %while.body.lr.ph ], [ %add.ptr, %while.body ]
899 %pSamples.0150 = phi float* [ %0, %while.body.lr.ph ], [ %add.ptr24, %while.body ]
900 %pOutput.0149 = phi float* [ %pDst, %while.body.lr.ph ], [ %add.ptr23, %while.body ]
901 %pTempSrc.0148 = phi float* [ %pSrc, %while.body.lr.ph ], [ %add.ptr11, %while.body ]
902 %blkCnt.0147 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec, %while.body ]
903 %8 = bitcast float* %pTempSrc.0148 to <4 x float>*
904 %9 = load <4 x float>, <4 x float>* %8, align 4
905 %10 = bitcast float* %pStateCur.0151 to <4 x float>*
906 store <4 x float> %9, <4 x float>* %10, align 4
907 %add.ptr = getelementptr inbounds float, float* %pStateCur.0151, i32 4
908 %add.ptr11 = getelementptr inbounds float, float* %pTempSrc.0148, i32 4
909 %11 = bitcast float* %pSamples.0150 to <4 x float>*
910 %12 = load <4 x float>, <4 x float>* %11, align 4
911 %13 = fmul fast <4 x float> %12, %.pre162
912 %arrayidx12 = getelementptr inbounds float, float* %pSamples.0150, i32 1
913 %14 = bitcast float* %arrayidx12 to <4 x float>*
914 %15 = load <4 x float>, <4 x float>* %14, align 4
915 %mul = fmul fast <4 x float> %15, %.pre164
916 %add = fadd fast <4 x float> %mul, %13
917 %arrayidx13 = getelementptr inbounds float, float* %pSamples.0150, i32 2
918 %16 = bitcast float* %arrayidx13 to <4 x float>*
919 %17 = load <4 x float>, <4 x float>* %16, align 4
920 %mul16 = fmul fast <4 x float> %17, %.pre166
921 %add17 = fadd fast <4 x float> %add, %mul16
922 %arrayidx18 = getelementptr inbounds float, float* %pSamples.0150, i32 3
923 %18 = bitcast float* %arrayidx18 to <4 x float>*
924 %19 = load <4 x float>, <4 x float>* %18, align 4
925 %mul21 = fmul fast <4 x float> %19, %.pre168
926 %add22 = fadd fast <4 x float> %add17, %mul21
927 %20 = bitcast float* %pOutput.0149 to <4 x float>*
928 store <4 x float> %add22, <4 x float>* %20, align 4
929 %add.ptr23 = getelementptr inbounds float, float* %pOutput.0149, i32 4
930 %add.ptr24 = getelementptr inbounds float, float* %pSamples.0150, i32 4
931 %dec = add nsw i32 %blkCnt.0147, -1
932 %cmp9 = icmp eq i32 %dec, 0
933 br i1 %cmp9, label %while.end.loopexit, label %while.body
934
935while.end.loopexit: ; preds = %while.body
936 %scevgep157 = getelementptr float, float* %pSrc, i32 %7
937 %scevgep159 = getelementptr float, float* %0, i32 %7
938 br label %while.end
939
940while.end: ; preds = %if.then, %while.end.loopexit
941 %pTempSrc.0.lcssa = phi float* [ %scevgep157, %while.end.loopexit ], [ %pSrc, %if.then ]
942 %pOutput.0.lcssa = phi float* [ %scevgep158, %while.end.loopexit ], [ %pDst, %if.then ]
943 %pSamples.0.lcssa = phi float* [ %scevgep159, %while.end.loopexit ], [ %0, %if.then ]
944 %pStateCur.0.lcssa = phi float* [ %add.ptr, %while.end.loopexit ], [ %arrayidx, %if.then ]
945 %and = and i32 %blockSize, 3
946 %21 = tail call <4 x i1> @llvm.arm.mve.vctp32(i32 %and)
947 %22 = bitcast float* %pTempSrc.0.lcssa to <4 x float>*
948 %23 = load <4 x float>, <4 x float>* %22, align 4
949 %24 = bitcast float* %pStateCur.0.lcssa to <4 x float>*
950 tail call void @llvm.masked.store.v4f32.p0v4f32(<4 x float> %23, <4 x float>* %24, i32 4, <4 x i1> %21)
951 %25 = bitcast float* %pSamples.0.lcssa to <4 x float>*
952 %26 = load <4 x float>, <4 x float>* %25, align 4
953 %27 = fmul fast <4 x float> %26, %.pre162
954 %arrayidx29 = getelementptr inbounds float, float* %pSamples.0.lcssa, i32 1
955 %28 = bitcast float* %arrayidx29 to <4 x float>*
956 %29 = load <4 x float>, <4 x float>* %28, align 4
957 %mul32 = fmul fast <4 x float> %29, %.pre164
958 %add33 = fadd fast <4 x float> %mul32, %27
959 %arrayidx34 = getelementptr inbounds float, float* %pSamples.0.lcssa, i32 2
960 %30 = bitcast float* %arrayidx34 to <4 x float>*
961 %31 = load <4 x float>, <4 x float>* %30, align 4
962 %mul37 = fmul fast <4 x float> %31, %.pre166
963 %add38 = fadd fast <4 x float> %add33, %mul37
964 %arrayidx39 = getelementptr inbounds float, float* %pSamples.0.lcssa, i32 3
965 %32 = bitcast float* %arrayidx39 to <4 x float>*
966 %33 = load <4 x float>, <4 x float>* %32, align 4
967 %mul42 = fmul fast <4 x float> %33, %.pre168
968 %add43 = fadd fast <4 x float> %add38, %mul42
969 %34 = bitcast float* %pOutput.0.lcssa to <4 x float>*
970 tail call void @llvm.masked.store.v4f32.p0v4f32(<4 x float> %add43, <4 x float>* %34, i32 4, <4 x i1> %21)
971 %.pre = load float*, float** %pState1, align 4
972 br label %if.end
973
974if.end: ; preds = %while.end, %entry
975 %35 = phi float* [ %.pre, %while.end ], [ %0, %entry ]
976 %arrayidx45 = getelementptr inbounds float, float* %35, i32 %blockSize
977 %shr47 = lshr i32 %conv, 2
978 %cmp49141 = icmp eq i32 %shr47, 0
979 br i1 %cmp49141, label %while.end55, label %while.body51.preheader
980
981while.body51.preheader: ; preds = %if.end
982 %36 = and i32 %conv, 65532
983 %37 = add i32 %36, %blockSize
984 %scevgep = getelementptr float, float* %35, i32 %37
985 br label %while.body51
986
987while.body51: ; preds = %while.body51.preheader, %while.body51
988 %pTempSrc.1144 = phi float* [ %add.ptr52, %while.body51 ], [ %arrayidx45, %while.body51.preheader ]
989 %pTempDest.0143 = phi float* [ %add.ptr53, %while.body51 ], [ %35, %while.body51.preheader ]
990 %blkCnt.1142 = phi i32 [ %dec54, %while.body51 ], [ %shr47, %while.body51.preheader ]
991 %38 = bitcast float* %pTempSrc.1144 to <4 x float>*
992 %39 = load <4 x float>, <4 x float>* %38, align 4
993 %40 = bitcast float* %pTempDest.0143 to <4 x float>*
994 store <4 x float> %39, <4 x float>* %40, align 4
995 %add.ptr52 = getelementptr inbounds float, float* %pTempSrc.1144, i32 4
996 %add.ptr53 = getelementptr inbounds float, float* %pTempDest.0143, i32 4
997 %dec54 = add nsw i32 %blkCnt.1142, -1
998 %cmp49 = icmp eq i32 %dec54, 0
999 br i1 %cmp49, label %while.end55.loopexit, label %while.body51
1000
1001while.end55.loopexit: ; preds = %while.body51
1002 %scevgep156 = getelementptr float, float* %35, i32 %36
1003 br label %while.end55
1004
1005while.end55: ; preds = %while.end55.loopexit, %if.end
1006 %pTempDest.0.lcssa = phi float* [ %35, %if.end ], [ %scevgep156, %while.end55.loopexit ]
1007 %pTempSrc.1.lcssa = phi float* [ %arrayidx45, %if.end ], [ %scevgep, %while.end55.loopexit ]
1008 %and56 = and i32 %conv, 3
1009 %cmp57 = icmp eq i32 %and56, 0
1010 br i1 %cmp57, label %if.end61, label %if.then59
1011
1012if.then59: ; preds = %while.end55
1013 %41 = tail call <4 x i1> @llvm.arm.mve.vctp32(i32 %and56)
1014 %42 = bitcast float* %pTempSrc.1.lcssa to <4 x float>*
1015 %43 = load <4 x float>, <4 x float>* %42, align 4
1016 %44 = bitcast float* %pTempDest.0.lcssa to <4 x float>*
1017 tail call void @llvm.masked.store.v4f32.p0v4f32(<4 x float> %43, <4 x float>* %44, i32 4, <4 x i1> %41)
1018 br label %if.end61
1019
1020if.end61: ; preds = %while.end55, %if.then59
1021 ret void
1022}
1023
1024
1025define void @fir(%struct.arm_fir_instance_f32* nocapture readonly %S, float* nocapture readonly %pSrc, float* nocapture %pDst, i32 %blockSize) {
1026; CHECK-LABEL: fir:
1027; CHECK: @ %bb.0: @ %entry
1028; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
1029; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
1030; CHECK-NEXT: .pad #4
1031; CHECK-NEXT: sub sp, #4
David Greenb3499f52020-03-20 09:23:57 +00001032; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12, d13}
1033; CHECK-NEXT: vpush {d8, d9, d10, d11, d12, d13}
David Green892af452020-04-22 13:30:22 +01001034; CHECK-NEXT: .pad #32
1035; CHECK-NEXT: sub sp, #32
David Green9cf920e2020-03-20 08:25:19 +00001036; CHECK-NEXT: cmp r3, #8
1037; CHECK-NEXT: blo.w .LBB16_12
1038; CHECK-NEXT: @ %bb.1: @ %if.then
1039; CHECK-NEXT: movs r7, #0
1040; CHECK-NEXT: cmp.w r7, r3, lsr #2
1041; CHECK-NEXT: beq.w .LBB16_12
1042; CHECK-NEXT: @ %bb.2: @ %while.body.lr.ph
David Green892af452020-04-22 13:30:22 +01001043; CHECK-NEXT: ldrh r5, [r0]
1044; CHECK-NEXT: lsr.w r9, r3, #2
1045; CHECK-NEXT: ldrd r8, r12, [r0, #4]
1046; CHECK-NEXT: movs r3, #1
1047; CHECK-NEXT: sub.w r0, r5, #8
David Green9cf920e2020-03-20 08:25:19 +00001048; CHECK-NEXT: add.w r7, r0, r0, lsr #29
David Greenb3499f52020-03-20 09:23:57 +00001049; CHECK-NEXT: and r0, r0, #7
David Green892af452020-04-22 13:30:22 +01001050; CHECK-NEXT: asrs r6, r7, #3
1051; CHECK-NEXT: cmp r6, #1
David Green9cf920e2020-03-20 08:25:19 +00001052; CHECK-NEXT: it gt
David Green892af452020-04-22 13:30:22 +01001053; CHECK-NEXT: asrgt r3, r7, #3
1054; CHECK-NEXT: add.w r7, r8, r5, lsl #2
David Green9cf920e2020-03-20 08:25:19 +00001055; CHECK-NEXT: sub.w r11, r7, #4
David Green892af452020-04-22 13:30:22 +01001056; CHECK-NEXT: str r3, [sp] @ 4-byte Spill
1057; CHECK-NEXT: rsbs r3, r5, #0
1058; CHECK-NEXT: str r3, [sp, #12] @ 4-byte Spill
1059; CHECK-NEXT: add.w r3, r12, #32
1060; CHECK-NEXT: str r0, [sp, #20] @ 4-byte Spill
David Greenb3499f52020-03-20 09:23:57 +00001061; CHECK-NEXT: adds r0, #1
David Green892af452020-04-22 13:30:22 +01001062; CHECK-NEXT: str r5, [sp, #16] @ 4-byte Spill
1063; CHECK-NEXT: str r3, [sp, #8] @ 4-byte Spill
1064; CHECK-NEXT: str r0, [sp, #4] @ 4-byte Spill
David Green9cf920e2020-03-20 08:25:19 +00001065; CHECK-NEXT: b .LBB16_4
1066; CHECK-NEXT: .LBB16_3: @ %while.end
1067; CHECK-NEXT: @ in Loop: Header=BB16_4 Depth=1
David Green892af452020-04-22 13:30:22 +01001068; CHECK-NEXT: ldr r0, [sp, #12] @ 4-byte Reload
1069; CHECK-NEXT: subs.w r9, r9, #1
1070; CHECK-NEXT: ldrd r11, r1, [sp, #24] @ 8-byte Folded Reload
David Green9cf920e2020-03-20 08:25:19 +00001071; CHECK-NEXT: vstrb.8 q0, [r2], #16
David Greenb3499f52020-03-20 09:23:57 +00001072; CHECK-NEXT: add.w r0, r8, r0, lsl #2
David Green892af452020-04-22 13:30:22 +01001073; CHECK-NEXT: add.w r8, r0, #16
David Greenb3499f52020-03-20 09:23:57 +00001074; CHECK-NEXT: beq .LBB16_12
David Green9cf920e2020-03-20 08:25:19 +00001075; CHECK-NEXT: .LBB16_4: @ %while.body
1076; CHECK-NEXT: @ =>This Loop Header: Depth=1
1077; CHECK-NEXT: @ Child Loop BB16_6 Depth 2
1078; CHECK-NEXT: @ Child Loop BB16_10 Depth 2
David Greenb3499f52020-03-20 09:23:57 +00001079; CHECK-NEXT: vldrw.u32 q0, [r1], #16
David Green892af452020-04-22 13:30:22 +01001080; CHECK-NEXT: ldrd r0, r7, [r12]
1081; CHECK-NEXT: ldrd r4, r6, [r12, #8]
1082; CHECK-NEXT: ldrd r5, r3, [r12, #16]
1083; CHECK-NEXT: ldrd lr, r10, [r12, #24]
David Greenb3499f52020-03-20 09:23:57 +00001084; CHECK-NEXT: vstrb.8 q0, [r11], #16
David Green892af452020-04-22 13:30:22 +01001085; CHECK-NEXT: vldrw.u32 q0, [r8], #32
1086; CHECK-NEXT: vldrw.u32 q1, [r8, #-28]
David Greenb3499f52020-03-20 09:23:57 +00001087; CHECK-NEXT: vmul.f32 q0, q0, r0
David Green892af452020-04-22 13:30:22 +01001088; CHECK-NEXT: vldrw.u32 q6, [r8, #-24]
1089; CHECK-NEXT: vldrw.u32 q4, [r8, #-20]
1090; CHECK-NEXT: vfma.f32 q0, q1, r7
1091; CHECK-NEXT: vldrw.u32 q5, [r8, #-16]
1092; CHECK-NEXT: vfma.f32 q0, q6, r4
1093; CHECK-NEXT: vldrw.u32 q2, [r8, #-12]
1094; CHECK-NEXT: vfma.f32 q0, q4, r6
1095; CHECK-NEXT: vldrw.u32 q3, [r8, #-8]
1096; CHECK-NEXT: vfma.f32 q0, q5, r5
Jean-Michel Gorius7019cea2020-05-21 16:30:48 +02001097; CHECK-NEXT: vldrw.u32 q1, [r8, #-4]
Jean-Michel Gorius65cd2c72020-05-22 21:26:46 +02001098; CHECK-NEXT: vfma.f32 q0, q2, r3
1099; CHECK-NEXT: ldr r0, [sp, #16] @ 4-byte Reload
David Green892af452020-04-22 13:30:22 +01001100; CHECK-NEXT: vfma.f32 q0, q3, lr
Jean-Michel Gorius65cd2c72020-05-22 21:26:46 +02001101; CHECK-NEXT: strd r11, r1, [sp, #24] @ 8-byte Folded Spill
Jean-Michel Gorius7019cea2020-05-21 16:30:48 +02001102; CHECK-NEXT: vfma.f32 q0, q1, r10
Jean-Michel Gorius65cd2c72020-05-22 21:26:46 +02001103; CHECK-NEXT: cmp r0, #16
David Greenb3499f52020-03-20 09:23:57 +00001104; CHECK-NEXT: blo .LBB16_7
David Green9cf920e2020-03-20 08:25:19 +00001105; CHECK-NEXT: @ %bb.5: @ %for.body.preheader
1106; CHECK-NEXT: @ in Loop: Header=BB16_4 Depth=1
David Green892af452020-04-22 13:30:22 +01001107; CHECK-NEXT: ldr.w lr, [sp] @ 4-byte Reload
David Green9cf920e2020-03-20 08:25:19 +00001108; CHECK-NEXT: dls lr, lr
David Green892af452020-04-22 13:30:22 +01001109; CHECK-NEXT: ldr r7, [sp, #8] @ 4-byte Reload
David Green9cf920e2020-03-20 08:25:19 +00001110; CHECK-NEXT: .LBB16_6: @ %for.body
1111; CHECK-NEXT: @ Parent Loop BB16_4 Depth=1
1112; CHECK-NEXT: @ => This Inner Loop Header: Depth=2
David Green892af452020-04-22 13:30:22 +01001113; CHECK-NEXT: ldm.w r7, {r0, r3, r4, r5, r6, r10, r11}
1114; CHECK-NEXT: vldrw.u32 q1, [r8], #32
1115; CHECK-NEXT: vldrw.u32 q6, [r8, #-24]
1116; CHECK-NEXT: vldrw.u32 q4, [r8, #-20]
David Green9cf920e2020-03-20 08:25:19 +00001117; CHECK-NEXT: vfma.f32 q0, q1, r0
David Green892af452020-04-22 13:30:22 +01001118; CHECK-NEXT: vldrw.u32 q1, [r8, #-28]
1119; CHECK-NEXT: vldrw.u32 q5, [r8, #-16]
1120; CHECK-NEXT: vldrw.u32 q2, [r8, #-12]
David Greenb3499f52020-03-20 09:23:57 +00001121; CHECK-NEXT: vfma.f32 q0, q1, r3
David Green892af452020-04-22 13:30:22 +01001122; CHECK-NEXT: vldrw.u32 q3, [r8, #-8]
David Greenb3499f52020-03-20 09:23:57 +00001123; CHECK-NEXT: vfma.f32 q0, q6, r4
David Green892af452020-04-22 13:30:22 +01001124; CHECK-NEXT: ldr r1, [r7, #28]
1125; CHECK-NEXT: vfma.f32 q0, q4, r5
1126; CHECK-NEXT: vldrw.u32 q1, [r8, #-4]
1127; CHECK-NEXT: vfma.f32 q0, q5, r6
1128; CHECK-NEXT: adds r7, #32
1129; CHECK-NEXT: vfma.f32 q0, q2, r10
1130; CHECK-NEXT: vfma.f32 q0, q3, r11
1131; CHECK-NEXT: vfma.f32 q0, q1, r1
David Green9cf920e2020-03-20 08:25:19 +00001132; CHECK-NEXT: le lr, .LBB16_6
David Greenb3499f52020-03-20 09:23:57 +00001133; CHECK-NEXT: b .LBB16_8
1134; CHECK-NEXT: .LBB16_7: @ in Loop: Header=BB16_4 Depth=1
David Green892af452020-04-22 13:30:22 +01001135; CHECK-NEXT: ldr r7, [sp, #8] @ 4-byte Reload
David Greenb3499f52020-03-20 09:23:57 +00001136; CHECK-NEXT: .LBB16_8: @ %for.end
David Green9cf920e2020-03-20 08:25:19 +00001137; CHECK-NEXT: @ in Loop: Header=BB16_4 Depth=1
David Green892af452020-04-22 13:30:22 +01001138; CHECK-NEXT: ldr r0, [sp, #20] @ 4-byte Reload
David Greenb3499f52020-03-20 09:23:57 +00001139; CHECK-NEXT: cmp r0, #0
1140; CHECK-NEXT: beq .LBB16_3
1141; CHECK-NEXT: @ %bb.9: @ %while.body76.preheader
David Green9cf920e2020-03-20 08:25:19 +00001142; CHECK-NEXT: @ in Loop: Header=BB16_4 Depth=1
David Green892af452020-04-22 13:30:22 +01001143; CHECK-NEXT: ldr r0, [sp, #4] @ 4-byte Reload
1144; CHECK-NEXT: mov r4, r8
David Green9cf920e2020-03-20 08:25:19 +00001145; CHECK-NEXT: .LBB16_10: @ %while.body76
1146; CHECK-NEXT: @ Parent Loop BB16_4 Depth=1
1147; CHECK-NEXT: @ => This Inner Loop Header: Depth=2
David Green892af452020-04-22 13:30:22 +01001148; CHECK-NEXT: ldr r1, [r7], #4
1149; CHECK-NEXT: vldrw.u32 q1, [r4], #4
1150; CHECK-NEXT: subs r0, #1
David Greenb3499f52020-03-20 09:23:57 +00001151; CHECK-NEXT: vfma.f32 q0, q1, r1
David Green892af452020-04-22 13:30:22 +01001152; CHECK-NEXT: cmp r0, #1
David Green9cf920e2020-03-20 08:25:19 +00001153; CHECK-NEXT: bgt .LBB16_10
1154; CHECK-NEXT: @ %bb.11: @ %while.end.loopexit
1155; CHECK-NEXT: @ in Loop: Header=BB16_4 Depth=1
David Green892af452020-04-22 13:30:22 +01001156; CHECK-NEXT: ldr r0, [sp, #20] @ 4-byte Reload
David Greenb3499f52020-03-20 09:23:57 +00001157; CHECK-NEXT: add.w r8, r8, r0, lsl #2
David Green9cf920e2020-03-20 08:25:19 +00001158; CHECK-NEXT: b .LBB16_3
1159; CHECK-NEXT: .LBB16_12: @ %if.end
David Green892af452020-04-22 13:30:22 +01001160; CHECK-NEXT: add sp, #32
David Greenb3499f52020-03-20 09:23:57 +00001161; CHECK-NEXT: vpop {d8, d9, d10, d11, d12, d13}
David Green9cf920e2020-03-20 08:25:19 +00001162; CHECK-NEXT: add sp, #4
1163; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
1164entry:
1165 %pState1 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 1
1166 %0 = load float*, float** %pState1, align 4
1167 %pCoeffs2 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 2
1168 %1 = load float*, float** %pCoeffs2, align 4
1169 %numTaps3 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 0
1170 %2 = load i16, i16* %numTaps3, align 4
1171 %conv = zext i16 %2 to i32
1172 %cmp = icmp ugt i32 %blockSize, 7
1173 br i1 %cmp, label %if.then, label %if.end
1174
1175if.then: ; preds = %entry
1176 %shr = lshr i32 %blockSize, 2
1177 %cmp5217 = icmp eq i32 %shr, 0
1178 br i1 %cmp5217, label %if.end, label %while.body.lr.ph
1179
1180while.body.lr.ph: ; preds = %if.then
1181 %sub = add nsw i32 %conv, -1
1182 %arrayidx = getelementptr inbounds float, float* %0, i32 %sub
1183 %incdec.ptr = getelementptr inbounds float, float* %1, i32 1
1184 %incdec.ptr7 = getelementptr inbounds float, float* %1, i32 2
1185 %incdec.ptr8 = getelementptr inbounds float, float* %1, i32 3
1186 %incdec.ptr9 = getelementptr inbounds float, float* %1, i32 4
1187 %incdec.ptr10 = getelementptr inbounds float, float* %1, i32 5
1188 %incdec.ptr11 = getelementptr inbounds float, float* %1, i32 6
1189 %incdec.ptr12 = getelementptr inbounds float, float* %1, i32 7
1190 %sub37 = add nsw i32 %conv, -8
1191 %div = sdiv i32 %sub37, 8
1192 %pCoeffsCur.0199 = getelementptr inbounds float, float* %1, i32 8
1193 %cmp38201 = icmp ugt i16 %2, 15
1194 %and = and i32 %sub37, 7
1195 %cmp74210 = icmp eq i32 %and, 0
1196 %idx.neg = sub nsw i32 0, %conv
1197 %3 = icmp sgt i32 %div, 1
1198 %smax = select i1 %3, i32 %div, i32 1
1199 br label %while.body
1200
1201while.body: ; preds = %while.body.lr.ph, %while.end
1202 %blkCnt.0222 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec84, %while.end ]
1203 %pStateCur.0221 = phi float* [ %arrayidx, %while.body.lr.ph ], [ %add.ptr, %while.end ]
1204 %pSamples.0220 = phi float* [ %0, %while.body.lr.ph ], [ %add.ptr83, %while.end ]
1205 %pTempSrc.0219 = phi float* [ %pSrc, %while.body.lr.ph ], [ %add.ptr14, %while.end ]
1206 %pOutput.0218 = phi float* [ %pDst, %while.body.lr.ph ], [ %add.ptr81, %while.end ]
1207 %4 = load float, float* %1, align 4
1208 %5 = load float, float* %incdec.ptr, align 4
1209 %6 = load float, float* %incdec.ptr7, align 4
1210 %7 = load float, float* %incdec.ptr8, align 4
1211 %8 = load float, float* %incdec.ptr9, align 4
1212 %9 = load float, float* %incdec.ptr10, align 4
1213 %10 = load float, float* %incdec.ptr11, align 4
1214 %11 = load float, float* %incdec.ptr12, align 4
1215 %12 = bitcast float* %pTempSrc.0219 to <4 x float>*
1216 %13 = load <4 x float>, <4 x float>* %12, align 4
1217 %14 = bitcast float* %pStateCur.0221 to <4 x float>*
1218 store <4 x float> %13, <4 x float>* %14, align 4
1219 %add.ptr = getelementptr inbounds float, float* %pStateCur.0221, i32 4
1220 %add.ptr14 = getelementptr inbounds float, float* %pTempSrc.0219, i32 4
1221 %15 = bitcast float* %pSamples.0220 to <4 x float>*
1222 %16 = load <4 x float>, <4 x float>* %15, align 4
1223 %.splatinsert = insertelement <4 x float> undef, float %4, i32 0
1224 %.splat = shufflevector <4 x float> %.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer
1225 %17 = fmul fast <4 x float> %16, %.splat
1226 %arrayidx15 = getelementptr inbounds float, float* %pSamples.0220, i32 1
1227 %18 = bitcast float* %arrayidx15 to <4 x float>*
1228 %19 = load <4 x float>, <4 x float>* %18, align 4
1229 %.splatinsert16 = insertelement <4 x float> undef, float %5, i32 0
1230 %.splat17 = shufflevector <4 x float> %.splatinsert16, <4 x float> undef, <4 x i32> zeroinitializer
1231 %20 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %19, <4 x float> %.splat17, <4 x float> %17)
1232 %arrayidx18 = getelementptr inbounds float, float* %pSamples.0220, i32 2
1233 %21 = bitcast float* %arrayidx18 to <4 x float>*
1234 %22 = load <4 x float>, <4 x float>* %21, align 4
1235 %.splatinsert19 = insertelement <4 x float> undef, float %6, i32 0
1236 %.splat20 = shufflevector <4 x float> %.splatinsert19, <4 x float> undef, <4 x i32> zeroinitializer
1237 %23 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %22, <4 x float> %.splat20, <4 x float> %20)
1238 %arrayidx21 = getelementptr inbounds float, float* %pSamples.0220, i32 3
1239 %24 = bitcast float* %arrayidx21 to <4 x float>*
1240 %25 = load <4 x float>, <4 x float>* %24, align 4
1241 %.splatinsert22 = insertelement <4 x float> undef, float %7, i32 0
1242 %.splat23 = shufflevector <4 x float> %.splatinsert22, <4 x float> undef, <4 x i32> zeroinitializer
1243 %26 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %25, <4 x float> %.splat23, <4 x float> %23)
1244 %arrayidx24 = getelementptr inbounds float, float* %pSamples.0220, i32 4
1245 %27 = bitcast float* %arrayidx24 to <4 x float>*
1246 %28 = load <4 x float>, <4 x float>* %27, align 4
1247 %.splatinsert25 = insertelement <4 x float> undef, float %8, i32 0
1248 %.splat26 = shufflevector <4 x float> %.splatinsert25, <4 x float> undef, <4 x i32> zeroinitializer
1249 %29 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %28, <4 x float> %.splat26, <4 x float> %26)
1250 %arrayidx27 = getelementptr inbounds float, float* %pSamples.0220, i32 5
1251 %30 = bitcast float* %arrayidx27 to <4 x float>*
1252 %31 = load <4 x float>, <4 x float>* %30, align 4
1253 %.splatinsert28 = insertelement <4 x float> undef, float %9, i32 0
1254 %.splat29 = shufflevector <4 x float> %.splatinsert28, <4 x float> undef, <4 x i32> zeroinitializer
1255 %32 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %31, <4 x float> %.splat29, <4 x float> %29)
1256 %arrayidx30 = getelementptr inbounds float, float* %pSamples.0220, i32 6
1257 %33 = bitcast float* %arrayidx30 to <4 x float>*
1258 %34 = load <4 x float>, <4 x float>* %33, align 4
1259 %.splatinsert31 = insertelement <4 x float> undef, float %10, i32 0
1260 %.splat32 = shufflevector <4 x float> %.splatinsert31, <4 x float> undef, <4 x i32> zeroinitializer
1261 %35 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %34, <4 x float> %.splat32, <4 x float> %32)
1262 %arrayidx33 = getelementptr inbounds float, float* %pSamples.0220, i32 7
1263 %36 = bitcast float* %arrayidx33 to <4 x float>*
1264 %37 = load <4 x float>, <4 x float>* %36, align 4
1265 %.splatinsert34 = insertelement <4 x float> undef, float %11, i32 0
1266 %.splat35 = shufflevector <4 x float> %.splatinsert34, <4 x float> undef, <4 x i32> zeroinitializer
1267 %38 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %37, <4 x float> %.splat35, <4 x float> %35)
1268 %pSamples.1200 = getelementptr inbounds float, float* %pSamples.0220, i32 8
1269 br i1 %cmp38201, label %for.body, label %for.end
1270
1271for.body: ; preds = %while.body, %for.body
1272 %pSamples.1207 = phi float* [ %pSamples.1, %for.body ], [ %pSamples.1200, %while.body ]
1273 %pCoeffsCur.0206 = phi float* [ %pCoeffsCur.0, %for.body ], [ %pCoeffsCur.0199, %while.body ]
1274 %.pn205 = phi float* [ %pCoeffsCur.0206, %for.body ], [ %1, %while.body ]
1275 %i.0204 = phi i32 [ %inc, %for.body ], [ 0, %while.body ]
1276 %vecAcc0.0203 = phi <4 x float> [ %70, %for.body ], [ %38, %while.body ]
1277 %pSamples.0.pn202 = phi float* [ %pSamples.1207, %for.body ], [ %pSamples.0220, %while.body ]
1278 %incdec.ptr40 = getelementptr inbounds float, float* %.pn205, i32 9
1279 %39 = load float, float* %pCoeffsCur.0206, align 4
1280 %incdec.ptr41 = getelementptr inbounds float, float* %.pn205, i32 10
1281 %40 = load float, float* %incdec.ptr40, align 4
1282 %incdec.ptr42 = getelementptr inbounds float, float* %.pn205, i32 11
1283 %41 = load float, float* %incdec.ptr41, align 4
1284 %incdec.ptr43 = getelementptr inbounds float, float* %.pn205, i32 12
1285 %42 = load float, float* %incdec.ptr42, align 4
1286 %incdec.ptr44 = getelementptr inbounds float, float* %.pn205, i32 13
1287 %43 = load float, float* %incdec.ptr43, align 4
1288 %incdec.ptr45 = getelementptr inbounds float, float* %.pn205, i32 14
1289 %44 = load float, float* %incdec.ptr44, align 4
1290 %incdec.ptr46 = getelementptr inbounds float, float* %.pn205, i32 15
1291 %45 = load float, float* %incdec.ptr45, align 4
1292 %46 = load float, float* %incdec.ptr46, align 4
1293 %47 = bitcast float* %pSamples.1207 to <4 x float>*
1294 %48 = load <4 x float>, <4 x float>* %47, align 4
1295 %.splatinsert48 = insertelement <4 x float> undef, float %39, i32 0
1296 %.splat49 = shufflevector <4 x float> %.splatinsert48, <4 x float> undef, <4 x i32> zeroinitializer
1297 %49 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %48, <4 x float> %.splat49, <4 x float> %vecAcc0.0203)
1298 %arrayidx50 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 9
1299 %50 = bitcast float* %arrayidx50 to <4 x float>*
1300 %51 = load <4 x float>, <4 x float>* %50, align 4
1301 %.splatinsert51 = insertelement <4 x float> undef, float %40, i32 0
1302 %.splat52 = shufflevector <4 x float> %.splatinsert51, <4 x float> undef, <4 x i32> zeroinitializer
1303 %52 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %51, <4 x float> %.splat52, <4 x float> %49)
1304 %arrayidx53 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 10
1305 %53 = bitcast float* %arrayidx53 to <4 x float>*
1306 %54 = load <4 x float>, <4 x float>* %53, align 4
1307 %.splatinsert54 = insertelement <4 x float> undef, float %41, i32 0
1308 %.splat55 = shufflevector <4 x float> %.splatinsert54, <4 x float> undef, <4 x i32> zeroinitializer
1309 %55 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %54, <4 x float> %.splat55, <4 x float> %52)
1310 %arrayidx56 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 11
1311 %56 = bitcast float* %arrayidx56 to <4 x float>*
1312 %57 = load <4 x float>, <4 x float>* %56, align 4
1313 %.splatinsert57 = insertelement <4 x float> undef, float %42, i32 0
1314 %.splat58 = shufflevector <4 x float> %.splatinsert57, <4 x float> undef, <4 x i32> zeroinitializer
1315 %58 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %57, <4 x float> %.splat58, <4 x float> %55)
1316 %arrayidx59 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 12
1317 %59 = bitcast float* %arrayidx59 to <4 x float>*
1318 %60 = load <4 x float>, <4 x float>* %59, align 4
1319 %.splatinsert60 = insertelement <4 x float> undef, float %43, i32 0
1320 %.splat61 = shufflevector <4 x float> %.splatinsert60, <4 x float> undef, <4 x i32> zeroinitializer
1321 %61 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %60, <4 x float> %.splat61, <4 x float> %58)
1322 %arrayidx62 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 13
1323 %62 = bitcast float* %arrayidx62 to <4 x float>*
1324 %63 = load <4 x float>, <4 x float>* %62, align 4
1325 %.splatinsert63 = insertelement <4 x float> undef, float %44, i32 0
1326 %.splat64 = shufflevector <4 x float> %.splatinsert63, <4 x float> undef, <4 x i32> zeroinitializer
1327 %64 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %63, <4 x float> %.splat64, <4 x float> %61)
1328 %arrayidx65 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 14
1329 %65 = bitcast float* %arrayidx65 to <4 x float>*
1330 %66 = load <4 x float>, <4 x float>* %65, align 4
1331 %.splatinsert66 = insertelement <4 x float> undef, float %45, i32 0
1332 %.splat67 = shufflevector <4 x float> %.splatinsert66, <4 x float> undef, <4 x i32> zeroinitializer
1333 %67 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %66, <4 x float> %.splat67, <4 x float> %64)
1334 %arrayidx68 = getelementptr inbounds float, float* %pSamples.0.pn202, i32 15
1335 %68 = bitcast float* %arrayidx68 to <4 x float>*
1336 %69 = load <4 x float>, <4 x float>* %68, align 4
1337 %.splatinsert69 = insertelement <4 x float> undef, float %46, i32 0
1338 %.splat70 = shufflevector <4 x float> %.splatinsert69, <4 x float> undef, <4 x i32> zeroinitializer
1339 %70 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %69, <4 x float> %.splat70, <4 x float> %67)
1340 %inc = add nuw nsw i32 %i.0204, 1
1341 %pCoeffsCur.0 = getelementptr inbounds float, float* %pCoeffsCur.0206, i32 8
1342 %pSamples.1 = getelementptr inbounds float, float* %pSamples.1207, i32 8
1343 %exitcond = icmp eq i32 %inc, %smax
1344 br i1 %exitcond, label %for.end, label %for.body
1345
1346for.end: ; preds = %for.body, %while.body
1347 %vecAcc0.0.lcssa = phi <4 x float> [ %38, %while.body ], [ %70, %for.body ]
1348 %pCoeffsCur.0.lcssa = phi float* [ %pCoeffsCur.0199, %while.body ], [ %pCoeffsCur.0, %for.body ]
1349 %pSamples.1.lcssa = phi float* [ %pSamples.1200, %while.body ], [ %pSamples.1, %for.body ]
1350 br i1 %cmp74210, label %while.end, label %while.body76
1351
1352while.body76: ; preds = %for.end, %while.body76
1353 %pCoeffsCur.1214 = phi float* [ %incdec.ptr77, %while.body76 ], [ %pCoeffsCur.0.lcssa, %for.end ]
1354 %vecAcc0.1213 = phi <4 x float> [ %74, %while.body76 ], [ %vecAcc0.0.lcssa, %for.end ]
1355 %numCnt.0212 = phi i32 [ %dec, %while.body76 ], [ %and, %for.end ]
1356 %pSamples.2211 = phi float* [ %incdec.ptr80, %while.body76 ], [ %pSamples.1.lcssa, %for.end ]
1357 %incdec.ptr77 = getelementptr inbounds float, float* %pCoeffsCur.1214, i32 1
1358 %71 = load float, float* %pCoeffsCur.1214, align 4
1359 %72 = bitcast float* %pSamples.2211 to <4 x float>*
1360 %73 = load <4 x float>, <4 x float>* %72, align 4
1361 %.splatinsert78 = insertelement <4 x float> undef, float %71, i32 0
1362 %.splat79 = shufflevector <4 x float> %.splatinsert78, <4 x float> undef, <4 x i32> zeroinitializer
1363 %74 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %73, <4 x float> %.splat79, <4 x float> %vecAcc0.1213)
1364 %incdec.ptr80 = getelementptr inbounds float, float* %pSamples.2211, i32 1
1365 %dec = add nsw i32 %numCnt.0212, -1
1366 %cmp74 = icmp sgt i32 %numCnt.0212, 1
1367 br i1 %cmp74, label %while.body76, label %while.end.loopexit
1368
1369while.end.loopexit: ; preds = %while.body76
1370 %scevgep = getelementptr float, float* %pSamples.1.lcssa, i32 %and
1371 br label %while.end
1372
1373while.end: ; preds = %while.end.loopexit, %for.end
1374 %pSamples.2.lcssa = phi float* [ %pSamples.1.lcssa, %for.end ], [ %scevgep, %while.end.loopexit ]
1375 %vecAcc0.1.lcssa = phi <4 x float> [ %vecAcc0.0.lcssa, %for.end ], [ %74, %while.end.loopexit ]
1376 %75 = bitcast float* %pOutput.0218 to <4 x float>*
1377 store <4 x float> %vecAcc0.1.lcssa, <4 x float>* %75, align 4
1378 %add.ptr81 = getelementptr inbounds float, float* %pOutput.0218, i32 4
1379 %add.ptr82 = getelementptr inbounds float, float* %pSamples.2.lcssa, i32 4
1380 %add.ptr83 = getelementptr inbounds float, float* %add.ptr82, i32 %idx.neg
1381 %dec84 = add nsw i32 %blkCnt.0222, -1
1382 %cmp5 = icmp eq i32 %dec84, 0
1383 br i1 %cmp5, label %if.end, label %while.body
1384
1385if.end: ; preds = %while.end, %if.then, %entry
1386 ret void
1387}
1388
David Greene8e7b2c2020-05-28 17:49:01 +01001389%struct.arm_biquad_cascade_stereo_df2T_instance_f32 = type { i8, float*, float* }
1390define 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) {
1391; CHECK-LABEL: arm_biquad_cascade_stereo_df2T_f32:
1392; CHECK: @ %bb.0:
1393; CHECK-NEXT: .save {r4, r5, r6, r7, lr}
1394; CHECK-NEXT: push {r4, r5, r6, r7, lr}
1395; CHECK-NEXT: .pad #4
1396; CHECK-NEXT: sub sp, #4
1397; CHECK-NEXT: .vsave {d8, d9, d10, d11}
1398; CHECK-NEXT: vpush {d8, d9, d10, d11}
1399; CHECK-NEXT: .pad #24
1400; CHECK-NEXT: sub sp, #24
1401; CHECK-NEXT: ldrb.w lr, [r0]
1402; CHECK-NEXT: movs r4, #0
1403; CHECK-NEXT: ldrd r12, r0, [r0, #4]
1404; CHECK-NEXT: cmp r3, #0
1405; CHECK-NEXT: strd r4, r4, [sp, #16]
1406; CHECK-NEXT: beq .LBB17_5
1407; CHECK-NEXT: @ %bb.1:
1408; CHECK-NEXT: movs r5, #2
1409; CHECK-NEXT: viwdup.u32 q0, r4, r5, #1
1410; CHECK-NEXT: mov r4, sp
1411; CHECK-NEXT: .LBB17_2: @ =>This Loop Header: Depth=1
1412; CHECK-NEXT: @ Child Loop BB17_3 Depth 2
1413; CHECK-NEXT: mov r7, lr
1414; CHECK-NEXT: ldr.w lr, [r0, #12]
1415; CHECK-NEXT: ldrd r5, r6, [r0]
1416; CHECK-NEXT: vldrw.u32 q1, [r12]
1417; CHECK-NEXT: vldr s12, [r0, #8]
1418; CHECK-NEXT: vdup.32 q2, lr
1419; CHECK-NEXT: vldr s14, [r0, #16]
1420; CHECK-NEXT: vstrw.32 q1, [r4]
1421; CHECK-NEXT: vdup.32 q1, r6
1422; CHECK-NEXT: mov r6, r2
1423; CHECK-NEXT: vmov.f32 s6, s12
1424; CHECK-NEXT: dls lr, r3
1425; CHECK-NEXT: vmov.f32 s10, s14
1426; CHECK-NEXT: vmov.f32 s7, s12
1427; CHECK-NEXT: vmov.f32 s11, s14
1428; CHECK-NEXT: .LBB17_3: @ Parent Loop BB17_2 Depth=1
1429; CHECK-NEXT: @ => This Inner Loop Header: Depth=2
1430; CHECK-NEXT: vldrw.u32 q4, [r1, q0, uxtw #2]
1431; CHECK-NEXT: vldrw.u32 q5, [r4, q0, uxtw #2]
1432; CHECK-NEXT: adds r1, #8
1433; CHECK-NEXT: vfma.f32 q5, q4, r5
1434; CHECK-NEXT: vstmia r6, {s20, s21}
1435; CHECK-NEXT: adds r6, #8
1436; CHECK-NEXT: vldrw.u32 q3, [sp, #8]
1437; CHECK-NEXT: vfma.f32 q3, q5, q2
1438; CHECK-NEXT: vfma.f32 q3, q4, q1
1439; CHECK-NEXT: vstrw.32 q3, [r4]
1440; CHECK-NEXT: le lr, .LBB17_3
1441; CHECK-NEXT: @ %bb.4: @ in Loop: Header=BB17_2 Depth=1
1442; CHECK-NEXT: mov lr, r7
1443; CHECK-NEXT: adds r0, #20
1444; CHECK-NEXT: subs.w lr, r7, #1
1445; CHECK-NEXT: vstrb.8 q3, [r12], #16
1446; CHECK-NEXT: mov r1, r2
1447; CHECK-NEXT: bne .LBB17_2
1448; CHECK-NEXT: b .LBB17_7
1449; CHECK-NEXT: .LBB17_5: @ %.preheader
1450; CHECK-NEXT: mov r0, sp
1451; CHECK-NEXT: dls lr, lr
1452; CHECK-NEXT: .LBB17_6: @ =>This Inner Loop Header: Depth=1
1453; CHECK-NEXT: vldrw.u32 q0, [r12], #16
1454; CHECK-NEXT: vstrw.32 q0, [r0]
1455; CHECK-NEXT: le lr, .LBB17_6
1456; CHECK-NEXT: .LBB17_7:
1457; CHECK-NEXT: add sp, #24
1458; CHECK-NEXT: vpop {d8, d9, d10, d11}
1459; CHECK-NEXT: add sp, #4
1460; CHECK-NEXT: pop {r4, r5, r6, r7, pc}
1461 %5 = alloca [6 x float], align 4
1462 %6 = getelementptr inbounds %struct.arm_biquad_cascade_stereo_df2T_instance_f32, %struct.arm_biquad_cascade_stereo_df2T_instance_f32* %0, i32 0, i32 1
1463 %7 = load float*, float** %6, align 4
1464 %8 = getelementptr inbounds %struct.arm_biquad_cascade_stereo_df2T_instance_f32, %struct.arm_biquad_cascade_stereo_df2T_instance_f32* %0, i32 0, i32 2
1465 %9 = load float*, float** %8, align 4
1466 %10 = getelementptr inbounds %struct.arm_biquad_cascade_stereo_df2T_instance_f32, %struct.arm_biquad_cascade_stereo_df2T_instance_f32* %0, i32 0, i32 0
1467 %11 = load i8, i8* %10, align 4
1468 %12 = zext i8 %11 to i32
1469 %13 = bitcast [6 x float]* %5 to i8*
1470 call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %13) #5
1471 %14 = tail call { <4 x i32>, i32 } @llvm.arm.mve.viwdup.v4i32(i32 0, i32 2, i32 1)
1472 %15 = extractvalue { <4 x i32>, i32 } %14, 0
1473 %16 = getelementptr inbounds [6 x float], [6 x float]* %5, i32 0, i32 4
1474 store float 0.000000e+00, float* %16, align 4
1475 %17 = getelementptr inbounds [6 x float], [6 x float]* %5, i32 0, i32 5
1476 store float 0.000000e+00, float* %17, align 4
1477 %18 = bitcast [6 x float]* %5 to <4 x float>*
1478 %19 = icmp eq i32 %3, 0
1479 %20 = bitcast [6 x float]* %5 to i32*
1480 %21 = getelementptr inbounds [6 x float], [6 x float]* %5, i32 0, i32 2
1481 %22 = bitcast float* %21 to <4 x float>*
1482 br i1 %19, label %23, label %31
1483
148423: ; preds = %4, %23
1485 %24 = phi i32 [ %29, %23 ], [ %12, %4 ]
1486 %25 = phi float* [ %28, %23 ], [ %7, %4 ]
1487 %26 = bitcast float* %25 to <4 x float>*
1488 %27 = load <4 x float>, <4 x float>* %26, align 8
1489 store <4 x float> %27, <4 x float>* %18, align 4
1490 %28 = getelementptr inbounds float, float* %25, i32 4
1491 %29 = add i32 %24, -1
1492 %30 = icmp eq i32 %29, 0
1493 br i1 %30, label %82, label %23
1494
149531: ; preds = %4, %77
1496 %32 = phi i32 [ %80, %77 ], [ %12, %4 ]
1497 %33 = phi float* [ %78, %77 ], [ %9, %4 ]
1498 %34 = phi float* [ %79, %77 ], [ %7, %4 ]
1499 %35 = phi float* [ %2, %77 ], [ %1, %4 ]
1500 %36 = getelementptr inbounds float, float* %33, i32 1
1501 %37 = load float, float* %33, align 4
1502 %38 = getelementptr inbounds float, float* %33, i32 2
1503 %39 = load float, float* %36, align 4
1504 %40 = getelementptr inbounds float, float* %33, i32 3
1505 %41 = load float, float* %38, align 4
1506 %42 = getelementptr inbounds float, float* %33, i32 4
1507 %43 = load float, float* %40, align 4
1508 %44 = load float, float* %42, align 4
1509 %45 = insertelement <4 x float> undef, float %43, i32 0
1510 %46 = shufflevector <4 x float> %45, <4 x float> undef, <4 x i32> <i32 0, i32 0, i32 undef, i32 undef>
1511 %47 = insertelement <4 x float> %46, float %44, i32 2
1512 %48 = insertelement <4 x float> %47, float %44, i32 3
1513 %49 = insertelement <4 x float> undef, float %39, i32 0
1514 %50 = shufflevector <4 x float> %49, <4 x float> undef, <4 x i32> <i32 0, i32 0, i32 undef, i32 undef>
1515 %51 = insertelement <4 x float> %50, float %41, i32 2
1516 %52 = insertelement <4 x float> %51, float %41, i32 3
1517 %53 = bitcast float* %34 to <4 x float>*
1518 %54 = load <4 x float>, <4 x float>* %53, align 8
1519 store <4 x float> %54, <4 x float>* %18, align 4
1520 %55 = insertelement <4 x float> undef, float %37, i32 0
1521 %56 = shufflevector <4 x float> %55, <4 x float> undef, <4 x i32> zeroinitializer
1522 br label %57
1523
152457: ; preds = %31, %57
1525 %58 = phi float* [ %35, %31 ], [ %74, %57 ]
1526 %59 = phi float* [ %2, %31 ], [ %70, %57 ]
1527 %60 = phi i32 [ %3, %31 ], [ %75, %57 ]
1528 %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)
1529 %62 = bitcast <4 x i32> %61 to <4 x float>
1530 %63 = bitcast float* %58 to i32*
1531 %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)
1532 %65 = bitcast <4 x i32> %64 to <4 x float>
1533 %66 = call fast <4 x float> @llvm.fma.v4f32(<4 x float> %65, <4 x float> %56, <4 x float> %62)
1534 %67 = extractelement <4 x float> %66, i32 0
1535 %68 = getelementptr inbounds float, float* %59, i32 1
1536 store float %67, float* %59, align 4
1537 %69 = extractelement <4 x float> %66, i32 1
1538 %70 = getelementptr inbounds float, float* %59, i32 2
1539 store float %69, float* %68, align 4
1540 %71 = load <4 x float>, <4 x float>* %22, align 4
1541 %72 = call fast <4 x float> @llvm.fma.v4f32(<4 x float> %66, <4 x float> %48, <4 x float> %71)
1542 %73 = call fast <4 x float> @llvm.fma.v4f32(<4 x float> %65, <4 x float> %52, <4 x float> %72)
1543 store <4 x float> %73, <4 x float>* %18, align 4
1544 %74 = getelementptr inbounds float, float* %58, i32 2
1545 %75 = add i32 %60, -1
1546 %76 = icmp eq i32 %75, 0
1547 br i1 %76, label %77, label %57
1548
154977: ; preds = %57
1550 %78 = getelementptr inbounds float, float* %33, i32 5
1551 store <4 x float> %73, <4 x float>* %53, align 4
1552 %79 = getelementptr inbounds float, float* %34, i32 4
1553 %80 = add i32 %32, -1
1554 %81 = icmp eq i32 %80, 0
1555 br i1 %81, label %82, label %31
1556
155782: ; preds = %77, %23
1558 call void @llvm.lifetime.end.p0i8(i64 24, i8* nonnull %13) #5
1559 ret void
1560}
1561
1562define arm_aapcs_vfpcc void @fms(float* nocapture readonly %pSrc1, float* nocapture readonly %pSrc2, float* nocapture readonly %pSrc3, float* nocapture %pDst, i32 %N, i32 %M) {
1563; CHECK-LABEL: fms:
1564; CHECK: @ %bb.0: @ %entry
1565; CHECK-NEXT: .save {r4, r5, r7, lr}
1566; CHECK-NEXT: push {r4, r5, r7, lr}
1567; CHECK-NEXT: ldr.w lr, [sp, #16]
1568; CHECK-NEXT: movs r4, #0
1569; CHECK-NEXT: cmp.w r4, lr, lsr #2
1570; CHECK-NEXT: beq .LBB18_5
1571; CHECK-NEXT: @ %bb.1: @ %do.body.preheader
1572; CHECK-NEXT: ldr.w r12, [sp, #20]
1573; CHECK-NEXT: lsr.w r5, lr, #2
1574; CHECK-NEXT: .LBB18_2: @ %do.body
1575; CHECK-NEXT: @ =>This Loop Header: Depth=1
1576; CHECK-NEXT: @ Child Loop BB18_3 Depth 2
1577; CHECK-NEXT: ldr r4, [r2]
1578; CHECK-NEXT: dls lr, r5
1579; CHECK-NEXT: vdup.32 q0, r4
1580; CHECK-NEXT: .LBB18_3: @ %while.body
1581; CHECK-NEXT: @ Parent Loop BB18_2 Depth=1
1582; CHECK-NEXT: @ => This Inner Loop Header: Depth=2
1583; CHECK-NEXT: vldrw.u32 q1, [r1], #16
1584; CHECK-NEXT: vldrw.u32 q2, [r0], #16
1585; CHECK-NEXT: vfms.f32 q2, q0, q1
1586; CHECK-NEXT: vstrb.8 q2, [r3], #16
1587; CHECK-NEXT: le lr, .LBB18_3
1588; CHECK-NEXT: @ %bb.4: @ %while.end
1589; CHECK-NEXT: @ in Loop: Header=BB18_2 Depth=1
1590; CHECK-NEXT: subs.w r12, r12, #1
1591; CHECK-NEXT: add.w r2, r2, #4
1592; CHECK-NEXT: bne .LBB18_2
1593; CHECK-NEXT: .LBB18_5: @ %do.end
1594; CHECK-NEXT: pop {r4, r5, r7, pc}
1595entry:
1596 %shr = lshr i32 %N, 2
1597 %cmp15 = icmp eq i32 %shr, 0
1598 br i1 %cmp15, label %do.end, label %do.body
1599
1600do.body: ; preds = %entry, %while.end
1601 %pDst.addr.0 = phi float* [ %add.ptr2, %while.end ], [ %pDst, %entry ]
1602 %M.addr.0 = phi i32 [ %dec3, %while.end ], [ %M, %entry ]
1603 %pSrc3.addr.0 = phi float* [ %incdec.ptr, %while.end ], [ %pSrc3, %entry ]
1604 %pSrc2.addr.0 = phi float* [ %add.ptr1, %while.end ], [ %pSrc2, %entry ]
1605 %pSrc1.addr.0 = phi float* [ %add.ptr, %while.end ], [ %pSrc1, %entry ]
1606 %0 = load float, float* %pSrc3.addr.0, align 4
1607 %.splatinsert = insertelement <4 x float> undef, float %0, i32 0
1608 %.splat = shufflevector <4 x float> %.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer
1609 br label %while.body
1610
1611while.body: ; preds = %do.body, %while.body
1612 %pSrc1.addr.119 = phi float* [ %pSrc1.addr.0, %do.body ], [ %add.ptr, %while.body ]
1613 %pSrc2.addr.118 = phi float* [ %pSrc2.addr.0, %do.body ], [ %add.ptr1, %while.body ]
1614 %blkCnt.017 = phi i32 [ %shr, %do.body ], [ %dec, %while.body ]
1615 %pDst.addr.116 = phi float* [ %pDst.addr.0, %do.body ], [ %add.ptr2, %while.body ]
1616 %1 = bitcast float* %pSrc1.addr.119 to <4 x float>*
1617 %2 = load <4 x float>, <4 x float>* %1, align 4
1618 %3 = bitcast float* %pSrc2.addr.118 to <4 x float>*
1619 %4 = load <4 x float>, <4 x float>* %3, align 4
1620 %5 = fneg fast <4 x float> %4
1621 %6 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %.splat, <4 x float> %5, <4 x float> %2)
1622 %7 = bitcast float* %pDst.addr.116 to <4 x float>*
1623 store <4 x float> %6, <4 x float>* %7, align 4
1624 %add.ptr = getelementptr inbounds float, float* %pSrc1.addr.119, i32 4
1625 %add.ptr1 = getelementptr inbounds float, float* %pSrc2.addr.118, i32 4
1626 %add.ptr2 = getelementptr inbounds float, float* %pDst.addr.116, i32 4
1627 %dec = add nsw i32 %blkCnt.017, -1
1628 %cmp = icmp eq i32 %dec, 0
1629 br i1 %cmp, label %while.end, label %while.body
1630
1631while.end: ; preds = %while.body
1632 %incdec.ptr = getelementptr inbounds float, float* %pSrc3.addr.0, i32 1
1633 %dec3 = add i32 %M.addr.0, -1
1634 %cmp4 = icmp eq i32 %dec3, 0
1635 br i1 %cmp4, label %do.end, label %do.body
1636
1637do.end: ; preds = %while.end, %entry
1638 ret void
1639}
1640
1641
1642%struct.arm_biquad_casd_df1_inst_f32 = type { i32, float*, float* }
1643define 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) {
1644; CHECK-LABEL: arm_biquad_cascade_df1_f32:
1645; CHECK: @ %bb.0: @ %entry
1646; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
1647; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
1648; CHECK-NEXT: .pad #4
1649; CHECK-NEXT: sub sp, #4
1650; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12, d13, d14, d15}
1651; CHECK-NEXT: vpush {d8, d9, d10, d11, d12, d13, d14, d15}
1652; CHECK-NEXT: .pad #88
1653; CHECK-NEXT: sub sp, #88
1654; CHECK-NEXT: ldrd r12, r10, [r0]
1655; CHECK-NEXT: @ implicit-def: $s2
1656; CHECK-NEXT: and r7, r3, #3
1657; CHECK-NEXT: ldr.w r11, [r0, #8]
1658; CHECK-NEXT: lsrs r0, r3, #2
1659; CHECK-NEXT: str r0, [sp, #60] @ 4-byte Spill
1660; CHECK-NEXT: str r7, [sp, #12] @ 4-byte Spill
1661; CHECK-NEXT: str r2, [sp, #56] @ 4-byte Spill
1662; CHECK-NEXT: b .LBB19_3
1663; CHECK-NEXT: .LBB19_1: @ in Loop: Header=BB19_3 Depth=1
1664; CHECK-NEXT: vmov.f32 s14, s7
1665; CHECK-NEXT: ldr r2, [sp, #56] @ 4-byte Reload
1666; CHECK-NEXT: vmov.f32 s0, s10
1667; CHECK-NEXT: vmov.f32 s7, s6
1668; CHECK-NEXT: .LBB19_2: @ %if.end69
1669; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1
1670; CHECK-NEXT: vstr s8, [r10]
1671; CHECK-NEXT: subs.w r12, r12, #1
1672; CHECK-NEXT: vstr s0, [r10, #4]
1673; CHECK-NEXT: add.w r11, r11, #128
1674; CHECK-NEXT: vstr s14, [r10, #8]
1675; CHECK-NEXT: mov r1, r2
1676; CHECK-NEXT: vstr s7, [r10, #12]
1677; CHECK-NEXT: add.w r10, r10, #16
1678; CHECK-NEXT: beq.w .LBB19_13
1679; CHECK-NEXT: .LBB19_3: @ %do.body
1680; CHECK-NEXT: @ =>This Loop Header: Depth=1
1681; CHECK-NEXT: @ Child Loop BB19_5 Depth 2
1682; CHECK-NEXT: vldr s7, [r10, #8]
1683; CHECK-NEXT: mov r5, r2
1684; CHECK-NEXT: ldr r0, [sp, #60] @ 4-byte Reload
1685; CHECK-NEXT: vldr s8, [r10]
1686; CHECK-NEXT: vldr s10, [r10, #4]
1687; CHECK-NEXT: vldr s6, [r10, #12]
1688; CHECK-NEXT: wls lr, r0, .LBB19_6
1689; CHECK-NEXT: @ %bb.4: @ %while.body.lr.ph
1690; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1
1691; CHECK-NEXT: ldrd r5, lr, [sp, #56] @ 8-byte Folded Reload
1692; CHECK-NEXT: .LBB19_5: @ %while.body
1693; CHECK-NEXT: @ Parent Loop BB19_3 Depth=1
1694; CHECK-NEXT: @ => This Inner Loop Header: Depth=2
1695; CHECK-NEXT: vmov r4, s8
1696; CHECK-NEXT: vldr s8, [r1, #12]
1697; CHECK-NEXT: vldrw.u32 q0, [r11, #112]
1698; CHECK-NEXT: vmov r0, s10
1699; CHECK-NEXT: vldr s10, [r1, #8]
1700; CHECK-NEXT: vmov r7, s7
1701; CHECK-NEXT: vmov r9, s6
1702; CHECK-NEXT: vldrw.u32 q1, [r11]
1703; CHECK-NEXT: vstrw.32 q0, [sp, #64] @ 16-byte Spill
1704; CHECK-NEXT: vmov r8, s8
1705; CHECK-NEXT: vldrw.u32 q0, [r11, #16]
1706; CHECK-NEXT: ldr r6, [r1, #4]
1707; CHECK-NEXT: vldrw.u32 q7, [r11, #32]
1708; CHECK-NEXT: vmul.f32 q1, q1, r8
1709; CHECK-NEXT: vmov r3, s10
1710; CHECK-NEXT: vldrw.u32 q3, [r11, #48]
1711; CHECK-NEXT: vfma.f32 q1, q0, r3
1712; CHECK-NEXT: ldr r3, [r1]
1713; CHECK-NEXT: vfma.f32 q1, q7, r6
1714; CHECK-NEXT: vldrw.u32 q6, [r11, #64]
1715; CHECK-NEXT: vfma.f32 q1, q3, r3
1716; CHECK-NEXT: vldrw.u32 q5, [r11, #80]
1717; CHECK-NEXT: vfma.f32 q1, q6, r4
1718; CHECK-NEXT: vldrw.u32 q4, [r11, #96]
1719; CHECK-NEXT: vfma.f32 q1, q5, r0
1720; CHECK-NEXT: vldrw.u32 q0, [sp, #64] @ 16-byte Reload
1721; CHECK-NEXT: vfma.f32 q1, q4, r7
1722; CHECK-NEXT: adds r1, #16
1723; CHECK-NEXT: vfma.f32 q1, q0, r9
1724; CHECK-NEXT: vmov.f32 s2, s8
1725; CHECK-NEXT: vstrb.8 q1, [r5], #16
1726; CHECK-NEXT: le lr, .LBB19_5
1727; CHECK-NEXT: .LBB19_6: @ %while.end
1728; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1
1729; CHECK-NEXT: ldr r7, [sp, #12] @ 4-byte Reload
1730; CHECK-NEXT: cmp r7, #0
1731; CHECK-NEXT: beq .LBB19_1
1732; CHECK-NEXT: @ %bb.7: @ %if.then
1733; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1
1734; CHECK-NEXT: vldr s24, [r1]
1735; CHECK-NEXT: vmov r0, s8
1736; CHECK-NEXT: vldr s0, [r1, #4]
1737; CHECK-NEXT: vldrw.u32 q3, [r11]
1738; CHECK-NEXT: vldr s3, [r1, #12]
1739; CHECK-NEXT: vldrw.u32 q4, [r11, #32]
1740; CHECK-NEXT: vldr s1, [r1, #8]
1741; CHECK-NEXT: vmov r1, s10
1742; CHECK-NEXT: vldrw.u32 q2, [r11, #96]
1743; CHECK-NEXT: vmov r6, s3
1744; CHECK-NEXT: vmul.f32 q3, q3, r6
1745; CHECK-NEXT: vmov r6, s1
1746; CHECK-NEXT: vstrw.32 q2, [sp, #32] @ 16-byte Spill
1747; CHECK-NEXT: vldrw.u32 q2, [r11, #112]
1748; CHECK-NEXT: vldrw.u32 q5, [r11, #48]
1749; CHECK-NEXT: vmov r4, s0
1750; CHECK-NEXT: vstrw.32 q2, [sp, #64] @ 16-byte Spill
1751; CHECK-NEXT: vldrw.u32 q2, [r11, #80]
1752; CHECK-NEXT: vldrw.u32 q7, [r11, #64]
1753; CHECK-NEXT: vmov r3, s24
1754; CHECK-NEXT: vstrw.32 q2, [sp, #16] @ 16-byte Spill
1755; CHECK-NEXT: vldrw.u32 q2, [r11, #16]
1756; CHECK-NEXT: vmov r2, s7
1757; CHECK-NEXT: cmp r7, #1
1758; CHECK-NEXT: vfma.f32 q3, q2, r6
1759; CHECK-NEXT: vldrw.u32 q2, [sp, #16] @ 16-byte Reload
1760; CHECK-NEXT: vfma.f32 q3, q4, r4
1761; CHECK-NEXT: vmov lr, s6
1762; CHECK-NEXT: vfma.f32 q3, q5, r3
1763; CHECK-NEXT: vfma.f32 q3, q7, r0
1764; CHECK-NEXT: vfma.f32 q3, q2, r1
1765; CHECK-NEXT: vldrw.u32 q2, [sp, #32] @ 16-byte Reload
1766; CHECK-NEXT: vfma.f32 q3, q2, r2
1767; CHECK-NEXT: vldrw.u32 q2, [sp, #64] @ 16-byte Reload
1768; CHECK-NEXT: vfma.f32 q3, q2, lr
1769; CHECK-NEXT: bne .LBB19_9
1770; CHECK-NEXT: @ %bb.8: @ %if.then58
1771; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1
1772; CHECK-NEXT: vstr s12, [r5]
1773; CHECK-NEXT: vmov.f32 s8, s24
1774; CHECK-NEXT: vmov.f32 s0, s2
1775; CHECK-NEXT: vmov.f32 s14, s12
1776; CHECK-NEXT: b .LBB19_11
1777; CHECK-NEXT: .LBB19_9: @ %if.else
1778; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1
1779; CHECK-NEXT: cmp r7, #2
1780; CHECK-NEXT: vstmia r5, {s12, s13}
1781; CHECK-NEXT: bne .LBB19_12
1782; CHECK-NEXT: @ %bb.10: @ in Loop: Header=BB19_3 Depth=1
1783; CHECK-NEXT: vmov.f32 s8, s0
1784; CHECK-NEXT: vmov.f32 s14, s13
1785; CHECK-NEXT: vmov.f32 s0, s24
1786; CHECK-NEXT: vmov.f32 s7, s12
1787; CHECK-NEXT: .LBB19_11: @ %if.end69
1788; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1
1789; CHECK-NEXT: vmov.f32 s2, s3
1790; CHECK-NEXT: ldr r2, [sp, #56] @ 4-byte Reload
1791; CHECK-NEXT: b .LBB19_2
1792; CHECK-NEXT: .LBB19_12: @ %if.else64
1793; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1
1794; CHECK-NEXT: vmov.f32 s7, s13
1795; CHECK-NEXT: ldr r2, [sp, #56] @ 4-byte Reload
1796; CHECK-NEXT: vmov.f32 s2, s3
1797; CHECK-NEXT: vstr s14, [r5, #8]
1798; CHECK-NEXT: vmov.f32 s8, s1
1799; CHECK-NEXT: b .LBB19_2
1800; CHECK-NEXT: .LBB19_13: @ %do.end
1801; CHECK-NEXT: add sp, #88
1802; CHECK-NEXT: vpop {d8, d9, d10, d11, d12, d13, d14, d15}
1803; CHECK-NEXT: add sp, #4
1804; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
1805entry:
1806 %pState1 = getelementptr inbounds %struct.arm_biquad_casd_df1_inst_f32, %struct.arm_biquad_casd_df1_inst_f32* %S, i32 0, i32 1
1807 %0 = load float*, float** %pState1, align 4
1808 %pCoeffs2 = getelementptr inbounds %struct.arm_biquad_casd_df1_inst_f32, %struct.arm_biquad_casd_df1_inst_f32* %S, i32 0, i32 2
1809 %1 = load float*, float** %pCoeffs2, align 4
1810 %numStages = getelementptr inbounds %struct.arm_biquad_casd_df1_inst_f32, %struct.arm_biquad_casd_df1_inst_f32* %S, i32 0, i32 0
1811 %2 = load i32, i32* %numStages, align 4
1812 %shr = lshr i32 %blockSize, 2
1813 %cmp201 = icmp eq i32 %shr, 0
1814 %and = and i32 %blockSize, 3
1815 %tobool = icmp eq i32 %and, 0
1816 %cmp57 = icmp eq i32 %and, 1
1817 %cmp60 = icmp eq i32 %and, 2
1818 br label %do.body
1819
1820do.body: ; preds = %if.end69, %entry
1821 %pState.0 = phi float* [ %0, %entry ], [ %incdec.ptr73, %if.end69 ]
1822 %pCoeffs.0 = phi float* [ %1, %entry ], [ %add.ptr74, %if.end69 ]
1823 %pIn.0 = phi float* [ %pSrc, %entry ], [ %pDst, %if.end69 ]
1824 %X3.0 = phi float [ undef, %entry ], [ %X3.2, %if.end69 ]
1825 %stage.0 = phi i32 [ %2, %entry ], [ %dec75, %if.end69 ]
1826 %3 = load float, float* %pState.0, align 4
1827 %arrayidx3 = getelementptr inbounds float, float* %pState.0, i32 1
1828 %4 = load float, float* %arrayidx3, align 4
1829 %arrayidx4 = getelementptr inbounds float, float* %pState.0, i32 2
1830 %5 = load float, float* %arrayidx4, align 4
1831 %arrayidx5 = getelementptr inbounds float, float* %pState.0, i32 3
1832 %6 = load float, float* %arrayidx5, align 4
1833 br i1 %cmp201, label %while.end, label %while.body.lr.ph
1834
1835while.body.lr.ph: ; preds = %do.body
1836 %7 = bitcast float* %pCoeffs.0 to <4 x float>*
1837 %arrayidx9 = getelementptr inbounds float, float* %pCoeffs.0, i32 4
1838 %8 = bitcast float* %arrayidx9 to <4 x float>*
1839 %arrayidx12 = getelementptr inbounds float, float* %pCoeffs.0, i32 8
1840 %9 = bitcast float* %arrayidx12 to <4 x float>*
1841 %arrayidx15 = getelementptr inbounds float, float* %pCoeffs.0, i32 12
1842 %10 = bitcast float* %arrayidx15 to <4 x float>*
1843 %arrayidx18 = getelementptr inbounds float, float* %pCoeffs.0, i32 16
1844 %11 = bitcast float* %arrayidx18 to <4 x float>*
1845 %arrayidx21 = getelementptr inbounds float, float* %pCoeffs.0, i32 20
1846 %12 = bitcast float* %arrayidx21 to <4 x float>*
1847 %arrayidx24 = getelementptr inbounds float, float* %pCoeffs.0, i32 24
1848 %13 = bitcast float* %arrayidx24 to <4 x float>*
1849 %arrayidx27 = getelementptr inbounds float, float* %pCoeffs.0, i32 28
1850 %14 = bitcast float* %arrayidx27 to <4 x float>*
1851 br label %while.body
1852
1853while.body: ; preds = %while.body.lr.ph, %while.body
1854 %sample.0208 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec, %while.body ]
1855 %pIn.1207 = phi float* [ %pIn.0, %while.body.lr.ph ], [ %incdec.ptr8, %while.body ]
1856 %pOut.1206 = phi float* [ %pDst, %while.body.lr.ph ], [ %add.ptr, %while.body ]
1857 %Yn2.0205 = phi float [ %6, %while.body.lr.ph ], [ %37, %while.body ]
1858 %Yn1.0204 = phi float [ %5, %while.body.lr.ph ], [ %36, %while.body ]
1859 %Xn2.0203 = phi float [ %4, %while.body.lr.ph ], [ %17, %while.body ]
1860 %Xn1.0202 = phi float [ %3, %while.body.lr.ph ], [ %18, %while.body ]
1861 %incdec.ptr = getelementptr inbounds float, float* %pIn.1207, i32 1
1862 %15 = load float, float* %pIn.1207, align 4
1863 %incdec.ptr6 = getelementptr inbounds float, float* %pIn.1207, i32 2
1864 %16 = load float, float* %incdec.ptr, align 4
1865 %incdec.ptr7 = getelementptr inbounds float, float* %pIn.1207, i32 3
1866 %17 = load float, float* %incdec.ptr6, align 4
1867 %incdec.ptr8 = getelementptr inbounds float, float* %pIn.1207, i32 4
1868 %18 = load float, float* %incdec.ptr7, align 4
1869 %19 = load <4 x float>, <4 x float>* %7, align 4
1870 %.splatinsert = insertelement <4 x float> undef, float %18, i32 0
1871 %.splat = shufflevector <4 x float> %.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer
1872 %20 = fmul fast <4 x float> %.splat, %19
1873 %21 = load <4 x float>, <4 x float>* %8, align 4
1874 %.splatinsert10 = insertelement <4 x float> undef, float %17, i32 0
1875 %.splat11 = shufflevector <4 x float> %.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer
1876 %22 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %21, <4 x float> %.splat11, <4 x float> %20)
1877 %23 = load <4 x float>, <4 x float>* %9, align 4
1878 %.splatinsert13 = insertelement <4 x float> undef, float %16, i32 0
1879 %.splat14 = shufflevector <4 x float> %.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer
1880 %24 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %23, <4 x float> %.splat14, <4 x float> %22)
1881 %25 = load <4 x float>, <4 x float>* %10, align 4
1882 %.splatinsert16 = insertelement <4 x float> undef, float %15, i32 0
1883 %.splat17 = shufflevector <4 x float> %.splatinsert16, <4 x float> undef, <4 x i32> zeroinitializer
1884 %26 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %25, <4 x float> %.splat17, <4 x float> %24)
1885 %27 = load <4 x float>, <4 x float>* %11, align 4
1886 %.splatinsert19 = insertelement <4 x float> undef, float %Xn1.0202, i32 0
1887 %.splat20 = shufflevector <4 x float> %.splatinsert19, <4 x float> undef, <4 x i32> zeroinitializer
1888 %28 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %27, <4 x float> %.splat20, <4 x float> %26)
1889 %29 = load <4 x float>, <4 x float>* %12, align 4
1890 %.splatinsert22 = insertelement <4 x float> undef, float %Xn2.0203, i32 0
1891 %.splat23 = shufflevector <4 x float> %.splatinsert22, <4 x float> undef, <4 x i32> zeroinitializer
1892 %30 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %29, <4 x float> %.splat23, <4 x float> %28)
1893 %31 = load <4 x float>, <4 x float>* %13, align 4
1894 %.splatinsert25 = insertelement <4 x float> undef, float %Yn1.0204, i32 0
1895 %.splat26 = shufflevector <4 x float> %.splatinsert25, <4 x float> undef, <4 x i32> zeroinitializer
1896 %32 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %31, <4 x float> %.splat26, <4 x float> %30)
1897 %33 = load <4 x float>, <4 x float>* %14, align 4
1898 %.splatinsert28 = insertelement <4 x float> undef, float %Yn2.0205, i32 0
1899 %.splat29 = shufflevector <4 x float> %.splatinsert28, <4 x float> undef, <4 x i32> zeroinitializer
1900 %34 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %33, <4 x float> %.splat29, <4 x float> %32)
1901 %35 = bitcast float* %pOut.1206 to <4 x float>*
1902 store <4 x float> %34, <4 x float>* %35, align 4
1903 %add.ptr = getelementptr inbounds float, float* %pOut.1206, i32 4
1904 %36 = extractelement <4 x float> %34, i32 3
1905 %37 = extractelement <4 x float> %34, i32 2
1906 %dec = add nsw i32 %sample.0208, -1
1907 %cmp = icmp eq i32 %dec, 0
1908 br i1 %cmp, label %while.end, label %while.body
1909
1910while.end: ; preds = %while.body, %do.body
1911 %Xn1.0.lcssa = phi float [ %3, %do.body ], [ %18, %while.body ]
1912 %Xn2.0.lcssa = phi float [ %4, %do.body ], [ %17, %while.body ]
1913 %Yn1.0.lcssa = phi float [ %5, %do.body ], [ %36, %while.body ]
1914 %Yn2.0.lcssa = phi float [ %6, %do.body ], [ %37, %while.body ]
1915 %pOut.1.lcssa = phi float* [ %pDst, %do.body ], [ %add.ptr, %while.body ]
1916 %pIn.1.lcssa = phi float* [ %pIn.0, %do.body ], [ %incdec.ptr8, %while.body ]
1917 %X3.1.lcssa = phi float [ %X3.0, %do.body ], [ %18, %while.body ]
1918 br i1 %tobool, label %if.end69, label %if.then
1919
1920if.then: ; preds = %while.end
1921 %incdec.ptr30 = getelementptr inbounds float, float* %pIn.1.lcssa, i32 1
1922 %38 = load float, float* %pIn.1.lcssa, align 4
1923 %incdec.ptr31 = getelementptr inbounds float, float* %pIn.1.lcssa, i32 2
1924 %39 = load float, float* %incdec.ptr30, align 4
1925 %incdec.ptr32 = getelementptr inbounds float, float* %pIn.1.lcssa, i32 3
1926 %40 = load float, float* %incdec.ptr31, align 4
1927 %41 = load float, float* %incdec.ptr32, align 4
1928 %42 = bitcast float* %pCoeffs.0 to <4 x float>*
1929 %43 = load <4 x float>, <4 x float>* %42, align 4
1930 %.splatinsert34 = insertelement <4 x float> undef, float %41, i32 0
1931 %.splat35 = shufflevector <4 x float> %.splatinsert34, <4 x float> undef, <4 x i32> zeroinitializer
1932 %44 = fmul fast <4 x float> %.splat35, %43
1933 %arrayidx36 = getelementptr inbounds float, float* %pCoeffs.0, i32 4
1934 %45 = bitcast float* %arrayidx36 to <4 x float>*
1935 %46 = load <4 x float>, <4 x float>* %45, align 4
1936 %.splatinsert37 = insertelement <4 x float> undef, float %40, i32 0
1937 %.splat38 = shufflevector <4 x float> %.splatinsert37, <4 x float> undef, <4 x i32> zeroinitializer
1938 %47 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %46, <4 x float> %.splat38, <4 x float> %44)
1939 %arrayidx39 = getelementptr inbounds float, float* %pCoeffs.0, i32 8
1940 %48 = bitcast float* %arrayidx39 to <4 x float>*
1941 %49 = load <4 x float>, <4 x float>* %48, align 4
1942 %.splatinsert40 = insertelement <4 x float> undef, float %39, i32 0
1943 %.splat41 = shufflevector <4 x float> %.splatinsert40, <4 x float> undef, <4 x i32> zeroinitializer
1944 %50 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %49, <4 x float> %.splat41, <4 x float> %47)
1945 %arrayidx42 = getelementptr inbounds float, float* %pCoeffs.0, i32 12
1946 %51 = bitcast float* %arrayidx42 to <4 x float>*
1947 %52 = load <4 x float>, <4 x float>* %51, align 4
1948 %.splatinsert43 = insertelement <4 x float> undef, float %38, i32 0
1949 %.splat44 = shufflevector <4 x float> %.splatinsert43, <4 x float> undef, <4 x i32> zeroinitializer
1950 %53 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %52, <4 x float> %.splat44, <4 x float> %50)
1951 %arrayidx45 = getelementptr inbounds float, float* %pCoeffs.0, i32 16
1952 %54 = bitcast float* %arrayidx45 to <4 x float>*
1953 %55 = load <4 x float>, <4 x float>* %54, align 4
1954 %.splatinsert46 = insertelement <4 x float> undef, float %Xn1.0.lcssa, i32 0
1955 %.splat47 = shufflevector <4 x float> %.splatinsert46, <4 x float> undef, <4 x i32> zeroinitializer
1956 %56 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %55, <4 x float> %.splat47, <4 x float> %53)
1957 %arrayidx48 = getelementptr inbounds float, float* %pCoeffs.0, i32 20
1958 %57 = bitcast float* %arrayidx48 to <4 x float>*
1959 %58 = load <4 x float>, <4 x float>* %57, align 4
1960 %.splatinsert49 = insertelement <4 x float> undef, float %Xn2.0.lcssa, i32 0
1961 %.splat50 = shufflevector <4 x float> %.splatinsert49, <4 x float> undef, <4 x i32> zeroinitializer
1962 %59 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %58, <4 x float> %.splat50, <4 x float> %56)
1963 %arrayidx51 = getelementptr inbounds float, float* %pCoeffs.0, i32 24
1964 %60 = bitcast float* %arrayidx51 to <4 x float>*
1965 %61 = load <4 x float>, <4 x float>* %60, align 4
1966 %.splatinsert52 = insertelement <4 x float> undef, float %Yn1.0.lcssa, i32 0
1967 %.splat53 = shufflevector <4 x float> %.splatinsert52, <4 x float> undef, <4 x i32> zeroinitializer
1968 %62 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %61, <4 x float> %.splat53, <4 x float> %59)
1969 %arrayidx54 = getelementptr inbounds float, float* %pCoeffs.0, i32 28
1970 %63 = bitcast float* %arrayidx54 to <4 x float>*
1971 %64 = load <4 x float>, <4 x float>* %63, align 4
1972 %.splatinsert55 = insertelement <4 x float> undef, float %Yn2.0.lcssa, i32 0
1973 %.splat56 = shufflevector <4 x float> %.splatinsert55, <4 x float> undef, <4 x i32> zeroinitializer
1974 %65 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %64, <4 x float> %.splat56, <4 x float> %62)
1975 %66 = extractelement <4 x float> %65, i32 0
1976 br i1 %cmp57, label %if.then58, label %if.else
1977
1978if.then58: ; preds = %if.then
1979 store float %66, float* %pOut.1.lcssa, align 4
1980 br label %if.end69
1981
1982if.else: ; preds = %if.then
1983 %incdec.ptr62 = getelementptr inbounds float, float* %pOut.1.lcssa, i32 1
1984 store float %66, float* %pOut.1.lcssa, align 4
1985 %67 = extractelement <4 x float> %65, i32 1
1986 store float %67, float* %incdec.ptr62, align 4
1987 br i1 %cmp60, label %if.end69, label %if.else64
1988
1989if.else64: ; preds = %if.else
1990 %incdec.ptr63 = getelementptr inbounds float, float* %pOut.1.lcssa, i32 2
1991 %68 = extractelement <4 x float> %65, i32 2
1992 store float %68, float* %incdec.ptr63, align 4
1993 br label %if.end69
1994
1995if.end69: ; preds = %if.else, %while.end, %if.then58, %if.else64
1996 %Xn1.1 = phi float [ %38, %if.then58 ], [ %40, %if.else64 ], [ %Xn1.0.lcssa, %while.end ], [ %39, %if.else ]
1997 %Xn2.1 = phi float [ %X3.1.lcssa, %if.then58 ], [ %39, %if.else64 ], [ %Xn2.0.lcssa, %while.end ], [ %38, %if.else ]
1998 %Yn1.1 = phi float [ %66, %if.then58 ], [ %68, %if.else64 ], [ %Yn1.0.lcssa, %while.end ], [ %67, %if.else ]
1999 %Yn2.1 = phi float [ %Yn1.0.lcssa, %if.then58 ], [ %67, %if.else64 ], [ %Yn2.0.lcssa, %while.end ], [ %66, %if.else ]
2000 %X3.2 = phi float [ %41, %if.then58 ], [ %41, %if.else64 ], [ %X3.1.lcssa, %while.end ], [ %41, %if.else ]
2001 store float %Xn1.1, float* %pState.0, align 4
2002 store float %Xn2.1, float* %arrayidx3, align 4
2003 store float %Yn1.1, float* %arrayidx4, align 4
2004 %incdec.ptr73 = getelementptr inbounds float, float* %pState.0, i32 4
2005 store float %Yn2.1, float* %arrayidx5, align 4
2006 %add.ptr74 = getelementptr inbounds float, float* %pCoeffs.0, i32 32
2007 %dec75 = add i32 %stage.0, -1
2008 %cmp76 = icmp eq i32 %dec75, 0
2009 br i1 %cmp76, label %do.end, label %do.body
2010
2011do.end: ; preds = %if.end69
2012 ret void
2013}
2014
2015declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture)
2016declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture)
2017declare { <4 x i32>, i32 } @llvm.arm.mve.viwdup.v4i32(i32, i32, i32)
2018declare <4 x i32> @llvm.arm.mve.vldr.gather.offset.v4i32.p0i32.v4i32(i32*, <4 x i32>, i32, i32, i32)
David Green9cf920e2020-03-20 08:25:19 +00002019declare void @llvm.assume(i1)
2020declare <4 x i1> @llvm.arm.mve.vctp32(i32)
2021declare <4 x float> @llvm.fma.v4f32(<4 x float>, <4 x float>, <4 x float>)
2022declare void @llvm.masked.store.v4f32.p0v4f32(<4 x float>, <4 x float>*, i32 immarg, <4 x i1>)