1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp -verify-machineinstrs %s -o - | FileCheck %s
4 define arm_aapcs_vfpcc <4 x i32> @loads_i32(ptr %A, ptr %B, ptr %C) {
5 ; CHECK-LABEL: loads_i32:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: .save {r4, r5, r6, lr}
8 ; CHECK-NEXT: push {r4, r5, r6, lr}
9 ; CHECK-NEXT: vldrw.u32 q2, [r1]
10 ; CHECK-NEXT: vmov.i64 q1, #0xffffffff
11 ; CHECK-NEXT: vmov.f32 s0, s10
12 ; CHECK-NEXT: vmov.f32 s2, s11
13 ; CHECK-NEXT: vand q0, q0, q1
14 ; CHECK-NEXT: vmov.f32 s10, s9
15 ; CHECK-NEXT: vmov r3, r4, d0
16 ; CHECK-NEXT: vand q2, q2, q1
17 ; CHECK-NEXT: vmov r5, r1, d1
18 ; CHECK-NEXT: vldrw.u32 q0, [r0]
19 ; CHECK-NEXT: vldrw.u32 q1, [r2]
20 ; CHECK-NEXT: vmov lr, r12, d5
21 ; CHECK-NEXT: vmov.f32 s12, s2
22 ; CHECK-NEXT: vmov.f32 s2, s3
23 ; CHECK-NEXT: vmov r0, s12
24 ; CHECK-NEXT: vmov.f32 s12, s6
25 ; CHECK-NEXT: vmov.f32 s6, s7
26 ; CHECK-NEXT: asrs r2, r0, #31
27 ; CHECK-NEXT: adds r0, r0, r3
28 ; CHECK-NEXT: adc.w r3, r2, r4
29 ; CHECK-NEXT: vmov r2, s12
30 ; CHECK-NEXT: asrl r0, r3, r2
31 ; CHECK-NEXT: vmov r2, s2
32 ; CHECK-NEXT: vmov.f32 s2, s1
33 ; CHECK-NEXT: asrs r3, r2, #31
34 ; CHECK-NEXT: adds r2, r2, r5
35 ; CHECK-NEXT: adcs r1, r3
36 ; CHECK-NEXT: vmov r3, s6
37 ; CHECK-NEXT: asrl r2, r1, r3
38 ; CHECK-NEXT: vmov r4, r5, d4
39 ; CHECK-NEXT: vmov r1, s2
40 ; CHECK-NEXT: vmov.f32 s2, s5
41 ; CHECK-NEXT: adds.w r6, r1, lr
42 ; CHECK-NEXT: asr.w r3, r1, #31
43 ; CHECK-NEXT: adc.w r1, r3, r12
44 ; CHECK-NEXT: vmov r3, s2
45 ; CHECK-NEXT: asrl r6, r1, r3
46 ; CHECK-NEXT: vmov r1, s0
47 ; CHECK-NEXT: adds r4, r4, r1
48 ; CHECK-NEXT: asr.w r3, r1, #31
49 ; CHECK-NEXT: adc.w r1, r3, r5
50 ; CHECK-NEXT: vmov r3, s4
51 ; CHECK-NEXT: asrl r4, r1, r3
52 ; CHECK-NEXT: vmov q0[2], q0[0], r4, r0
53 ; CHECK-NEXT: vmov q0[3], q0[1], r6, r2
54 ; CHECK-NEXT: pop {r4, r5, r6, pc}
56 %a = load <4 x i32>, ptr %A, align 4
57 %b = load <4 x i32>, ptr %B, align 4
58 %c = load <4 x i32>, ptr %C, align 4
59 %sa = sext <4 x i32> %a to <4 x i64>
60 %sb = zext <4 x i32> %b to <4 x i64>
61 %sc = zext <4 x i32> %c to <4 x i64>
62 %add = add <4 x i64> %sa, %sb
63 %sh = ashr <4 x i64> %add, %sc
64 %t = trunc <4 x i64> %sh to <4 x i32>
68 define arm_aapcs_vfpcc <8 x i16> @loads_i16(ptr %A, ptr %B, ptr %C) {
69 ; CHECK-LABEL: loads_i16:
70 ; CHECK: @ %bb.0: @ %entry
71 ; CHECK-NEXT: vldrw.u32 q0, [r1]
72 ; CHECK-NEXT: vldrw.u32 q2, [r0]
73 ; CHECK-NEXT: vmovlb.s16 q1, q0
74 ; CHECK-NEXT: vmovlb.s16 q3, q2
75 ; CHECK-NEXT: vmovlt.s16 q0, q0
76 ; CHECK-NEXT: vmovlt.s16 q2, q2
77 ; CHECK-NEXT: vadd.i32 q0, q2, q0
78 ; CHECK-NEXT: vldrw.u32 q2, [r2]
79 ; CHECK-NEXT: vadd.i32 q1, q3, q1
80 ; CHECK-NEXT: vmovlt.u16 q3, q2
81 ; CHECK-NEXT: vneg.s32 q3, q3
82 ; CHECK-NEXT: vshl.s32 q3, q0, q3
83 ; CHECK-NEXT: vmovlb.u16 q0, q2
84 ; CHECK-NEXT: vneg.s32 q0, q0
85 ; CHECK-NEXT: vshl.s32 q0, q1, q0
86 ; CHECK-NEXT: vmovnt.i32 q0, q3
89 %a = load <8 x i16>, ptr %A, align 4
90 %b = load <8 x i16>, ptr %B, align 4
91 %c = load <8 x i16>, ptr %C, align 4
92 %sa = sext <8 x i16> %a to <8 x i32>
93 %sb = sext <8 x i16> %b to <8 x i32>
94 %sc = zext <8 x i16> %c to <8 x i32>
95 %add = add <8 x i32> %sa, %sb
96 %sh = ashr <8 x i32> %add, %sc
97 %t = trunc <8 x i32> %sh to <8 x i16>
101 define arm_aapcs_vfpcc <16 x i8> @loads_i8(ptr %A, ptr %B, ptr %C) {
102 ; CHECK-LABEL: loads_i8:
103 ; CHECK: @ %bb.0: @ %entry
104 ; CHECK-NEXT: vldrw.u32 q0, [r1]
105 ; CHECK-NEXT: vldrw.u32 q2, [r0]
106 ; CHECK-NEXT: vmovlb.s8 q1, q0
107 ; CHECK-NEXT: vmovlb.s8 q3, q2
108 ; CHECK-NEXT: vmovlt.s8 q0, q0
109 ; CHECK-NEXT: vmovlt.s8 q2, q2
110 ; CHECK-NEXT: vadd.i16 q0, q2, q0
111 ; CHECK-NEXT: vldrw.u32 q2, [r2]
112 ; CHECK-NEXT: vadd.i16 q1, q3, q1
113 ; CHECK-NEXT: vmovlt.u8 q3, q2
114 ; CHECK-NEXT: vneg.s16 q3, q3
115 ; CHECK-NEXT: vshl.s16 q3, q0, q3
116 ; CHECK-NEXT: vmovlb.u8 q0, q2
117 ; CHECK-NEXT: vneg.s16 q0, q0
118 ; CHECK-NEXT: vshl.s16 q0, q1, q0
119 ; CHECK-NEXT: vmovnt.i16 q0, q3
122 %a = load <16 x i8>, ptr %A, align 4
123 %b = load <16 x i8>, ptr %B, align 4
124 %c = load <16 x i8>, ptr %C, align 4
125 %sa = sext <16 x i8> %a to <16 x i16>
126 %sb = sext <16 x i8> %b to <16 x i16>
127 %sc = zext <16 x i8> %c to <16 x i16>
128 %add = add <16 x i16> %sa, %sb
129 %sh = ashr <16 x i16> %add, %sc
130 %t = trunc <16 x i16> %sh to <16 x i8>
134 define arm_aapcs_vfpcc void @load_store_i32(ptr %A, ptr %B, ptr %C, ptr %D) {
135 ; CHECK-LABEL: load_store_i32:
136 ; CHECK: @ %bb.0: @ %entry
137 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, lr}
138 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, lr}
139 ; CHECK-NEXT: .vsave {d8}
140 ; CHECK-NEXT: vpush {d8}
141 ; CHECK-NEXT: vldrw.u32 q2, [r1]
142 ; CHECK-NEXT: vmov.i64 q0, #0xffffffff
143 ; CHECK-NEXT: vmov.f32 s4, s10
144 ; CHECK-NEXT: vmov.f32 s6, s11
145 ; CHECK-NEXT: vmov.f32 s10, s9
146 ; CHECK-NEXT: vand q1, q1, q0
147 ; CHECK-NEXT: vand q2, q2, q0
148 ; CHECK-NEXT: vldrw.u32 q0, [r0]
149 ; CHECK-NEXT: vmov r6, r4, d3
150 ; CHECK-NEXT: vmov.f32 s12, s2
151 ; CHECK-NEXT: vmov.f32 s2, s3
152 ; CHECK-NEXT: vmov lr, r12, d2
153 ; CHECK-NEXT: vldrw.u32 q1, [r2]
154 ; CHECK-NEXT: vmov r5, r1, d5
155 ; CHECK-NEXT: vmov.f32 s16, s6
156 ; CHECK-NEXT: vmov.f32 s6, s7
157 ; CHECK-NEXT: vmov.f32 s10, s1
158 ; CHECK-NEXT: vmov r0, s2
159 ; CHECK-NEXT: vmov.f32 s2, s5
160 ; CHECK-NEXT: adds.w r8, r0, r6
161 ; CHECK-NEXT: asr.w r2, r0, #31
162 ; CHECK-NEXT: adc.w r7, r2, r4
163 ; CHECK-NEXT: vmov r2, s6
164 ; CHECK-NEXT: asrl r8, r7, r2
165 ; CHECK-NEXT: vmov r2, s10
166 ; CHECK-NEXT: asrs r4, r2, #31
167 ; CHECK-NEXT: adds r2, r2, r5
168 ; CHECK-NEXT: adcs r1, r4
169 ; CHECK-NEXT: vmov r4, s2
170 ; CHECK-NEXT: asrl r2, r1, r4
171 ; CHECK-NEXT: vmov r5, r7, d4
172 ; CHECK-NEXT: vmov r1, s12
173 ; CHECK-NEXT: adds.w r6, r1, lr
174 ; CHECK-NEXT: asr.w r4, r1, #31
175 ; CHECK-NEXT: adc.w r1, r4, r12
176 ; CHECK-NEXT: vmov r4, s16
177 ; CHECK-NEXT: asrl r6, r1, r4
178 ; CHECK-NEXT: vmov r1, s0
179 ; CHECK-NEXT: adds r0, r1, r5
180 ; CHECK-NEXT: asr.w r4, r1, #31
181 ; CHECK-NEXT: adc.w r1, r4, r7
182 ; CHECK-NEXT: vmov r7, s4
183 ; CHECK-NEXT: asrl r0, r1, r7
184 ; CHECK-NEXT: vmov q0[2], q0[0], r0, r6
185 ; CHECK-NEXT: vmov q0[3], q0[1], r2, r8
186 ; CHECK-NEXT: vstrw.32 q0, [r3]
187 ; CHECK-NEXT: vpop {d8}
188 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, pc}
190 %a = load <4 x i32>, ptr %A, align 4
191 %b = load <4 x i32>, ptr %B, align 4
192 %c = load <4 x i32>, ptr %C, align 4
193 %sa = sext <4 x i32> %a to <4 x i64>
194 %sb = zext <4 x i32> %b to <4 x i64>
195 %sc = zext <4 x i32> %c to <4 x i64>
196 %add = add <4 x i64> %sa, %sb
197 %sh = ashr <4 x i64> %add, %sc
198 %t = trunc <4 x i64> %sh to <4 x i32>
199 store <4 x i32> %t, ptr %D, align 4
203 define arm_aapcs_vfpcc void @load_store_i16(ptr %A, ptr %B, ptr %C, ptr %D) {
204 ; CHECK-LABEL: load_store_i16:
205 ; CHECK: @ %bb.0: @ %entry
206 ; CHECK-NEXT: vldrh.s32 q0, [r1, #8]
207 ; CHECK-NEXT: vldrh.s32 q1, [r0, #8]
208 ; CHECK-NEXT: vldrh.s32 q2, [r0]
209 ; CHECK-NEXT: vadd.i32 q0, q1, q0
210 ; CHECK-NEXT: vldrh.u32 q1, [r2, #8]
211 ; CHECK-NEXT: vneg.s32 q1, q1
212 ; CHECK-NEXT: vshl.s32 q0, q0, q1
213 ; CHECK-NEXT: vldrh.s32 q1, [r1]
214 ; CHECK-NEXT: vadd.i32 q1, q2, q1
215 ; CHECK-NEXT: vldrh.u32 q2, [r2]
216 ; CHECK-NEXT: vstrh.32 q0, [r3, #8]
217 ; CHECK-NEXT: vneg.s32 q2, q2
218 ; CHECK-NEXT: vshl.s32 q1, q1, q2
219 ; CHECK-NEXT: vstrh.32 q1, [r3]
222 %a = load <8 x i16>, ptr %A, align 4
223 %b = load <8 x i16>, ptr %B, align 4
224 %c = load <8 x i16>, ptr %C, align 4
225 %sa = sext <8 x i16> %a to <8 x i32>
226 %sb = sext <8 x i16> %b to <8 x i32>
227 %sc = zext <8 x i16> %c to <8 x i32>
228 %add = add <8 x i32> %sa, %sb
229 %sh = ashr <8 x i32> %add, %sc
230 %t = trunc <8 x i32> %sh to <8 x i16>
231 store <8 x i16> %t, ptr %D, align 4
235 define arm_aapcs_vfpcc void @load_store_i8(ptr %A, ptr %B, ptr %C, ptr %D) {
236 ; CHECK-LABEL: load_store_i8:
237 ; CHECK: @ %bb.0: @ %entry
238 ; CHECK-NEXT: vldrb.s16 q0, [r1, #8]
239 ; CHECK-NEXT: vldrb.s16 q1, [r0, #8]
240 ; CHECK-NEXT: vldrb.s16 q2, [r0]
241 ; CHECK-NEXT: vadd.i16 q0, q1, q0
242 ; CHECK-NEXT: vldrb.u16 q1, [r2, #8]
243 ; CHECK-NEXT: vneg.s16 q1, q1
244 ; CHECK-NEXT: vshl.s16 q0, q0, q1
245 ; CHECK-NEXT: vldrb.s16 q1, [r1]
246 ; CHECK-NEXT: vadd.i16 q1, q2, q1
247 ; CHECK-NEXT: vldrb.u16 q2, [r2]
248 ; CHECK-NEXT: vstrb.16 q0, [r3, #8]
249 ; CHECK-NEXT: vneg.s16 q2, q2
250 ; CHECK-NEXT: vshl.s16 q1, q1, q2
251 ; CHECK-NEXT: vstrb.16 q1, [r3]
254 %a = load <16 x i8>, ptr %A, align 4
255 %b = load <16 x i8>, ptr %B, align 4
256 %c = load <16 x i8>, ptr %C, align 4
257 %sa = sext <16 x i8> %a to <16 x i16>
258 %sb = sext <16 x i8> %b to <16 x i16>
259 %sc = zext <16 x i8> %c to <16 x i16>
260 %add = add <16 x i16> %sa, %sb
261 %sh = ashr <16 x i16> %add, %sc
262 %t = trunc <16 x i16> %sh to <16 x i8>
263 store <16 x i8> %t, ptr %D, align 4
268 define arm_aapcs_vfpcc void @load_one_store_i32(ptr %A, ptr %D) {
269 ; CHECK-LABEL: load_one_store_i32:
270 ; CHECK: @ %bb.0: @ %entry
271 ; CHECK-NEXT: .save {r4, r5, r6, lr}
272 ; CHECK-NEXT: push {r4, r5, r6, lr}
273 ; CHECK-NEXT: vldrw.u32 q0, [r0]
274 ; CHECK-NEXT: vmov.f32 s4, s2
275 ; CHECK-NEXT: vmov.f32 s2, s3
276 ; CHECK-NEXT: vmov r2, s2
277 ; CHECK-NEXT: vmov.f32 s2, s1
278 ; CHECK-NEXT: adds.w r12, r2, r2
279 ; CHECK-NEXT: asr.w r3, r2, #31
280 ; CHECK-NEXT: adc.w r3, r3, r2, asr #31
281 ; CHECK-NEXT: asrl r12, r3, r2
282 ; CHECK-NEXT: vmov r3, s2
283 ; CHECK-NEXT: adds r2, r3, r3
284 ; CHECK-NEXT: asr.w r0, r3, #31
285 ; CHECK-NEXT: adc.w r5, r0, r3, asr #31
286 ; CHECK-NEXT: vmov r0, s4
287 ; CHECK-NEXT: asrl r2, r5, r3
288 ; CHECK-NEXT: adds r4, r0, r0
289 ; CHECK-NEXT: asr.w r3, r0, #31
290 ; CHECK-NEXT: adc.w r3, r3, r0, asr #31
291 ; CHECK-NEXT: asrl r4, r3, r0
292 ; CHECK-NEXT: vmov r0, s0
293 ; CHECK-NEXT: adds r6, r0, r0
294 ; CHECK-NEXT: asr.w r3, r0, #31
295 ; CHECK-NEXT: adc.w r3, r3, r0, asr #31
296 ; CHECK-NEXT: asrl r6, r3, r0
297 ; CHECK-NEXT: vmov q0[2], q0[0], r6, r4
298 ; CHECK-NEXT: vmov q0[3], q0[1], r2, r12
299 ; CHECK-NEXT: vstrw.32 q0, [r1]
300 ; CHECK-NEXT: pop {r4, r5, r6, pc}
302 %a = load <4 x i32>, ptr %A, align 4
303 %sa = sext <4 x i32> %a to <4 x i64>
304 %add = add <4 x i64> %sa, %sa
305 %sh = ashr <4 x i64> %add, %sa
306 %t = trunc <4 x i64> %sh to <4 x i32>
307 store <4 x i32> %t, ptr %D, align 4
311 define arm_aapcs_vfpcc void @load_one_store_i16(ptr %A, ptr %D) {
312 ; CHECK-LABEL: load_one_store_i16:
313 ; CHECK: @ %bb.0: @ %entry
314 ; CHECK-NEXT: vldrh.s32 q0, [r0, #8]
315 ; CHECK-NEXT: vneg.s32 q1, q0
316 ; CHECK-NEXT: vadd.i32 q0, q0, q0
317 ; CHECK-NEXT: vshl.s32 q0, q0, q1
318 ; CHECK-NEXT: vldrh.s32 q1, [r0]
319 ; CHECK-NEXT: vstrh.32 q0, [r1, #8]
320 ; CHECK-NEXT: vneg.s32 q2, q1
321 ; CHECK-NEXT: vadd.i32 q1, q1, q1
322 ; CHECK-NEXT: vshl.s32 q1, q1, q2
323 ; CHECK-NEXT: vstrh.32 q1, [r1]
326 %a = load <8 x i16>, ptr %A, align 4
327 %sa = sext <8 x i16> %a to <8 x i32>
328 %add = add <8 x i32> %sa, %sa
329 %sh = ashr <8 x i32> %add, %sa
330 %t = trunc <8 x i32> %sh to <8 x i16>
331 store <8 x i16> %t, ptr %D, align 4
335 define arm_aapcs_vfpcc void @load_one_store_i8(ptr %A, ptr %D) {
336 ; CHECK-LABEL: load_one_store_i8:
337 ; CHECK: @ %bb.0: @ %entry
338 ; CHECK-NEXT: vldrb.s16 q0, [r0, #8]
339 ; CHECK-NEXT: vneg.s16 q1, q0
340 ; CHECK-NEXT: vadd.i16 q0, q0, q0
341 ; CHECK-NEXT: vshl.s16 q0, q0, q1
342 ; CHECK-NEXT: vldrb.s16 q1, [r0]
343 ; CHECK-NEXT: vstrb.16 q0, [r1, #8]
344 ; CHECK-NEXT: vneg.s16 q2, q1
345 ; CHECK-NEXT: vadd.i16 q1, q1, q1
346 ; CHECK-NEXT: vshl.s16 q1, q1, q2
347 ; CHECK-NEXT: vstrb.16 q1, [r1]
350 %a = load <16 x i8>, ptr %A, align 4
351 %sa = sext <16 x i8> %a to <16 x i16>
352 %add = add <16 x i16> %sa, %sa
353 %sh = ashr <16 x i16> %add, %sa
354 %t = trunc <16 x i16> %sh to <16 x i8>
355 store <16 x i8> %t, ptr %D, align 4
360 define arm_aapcs_vfpcc void @mul_i32(ptr %A, ptr %B, i64 %C, ptr %D) {
361 ; CHECK-LABEL: mul_i32:
362 ; CHECK: @ %bb.0: @ %entry
363 ; CHECK-NEXT: .save {r4, r5, r6, r7, lr}
364 ; CHECK-NEXT: push {r4, r5, r6, r7, lr}
365 ; CHECK-NEXT: vldrw.u32 q1, [r0]
366 ; CHECK-NEXT: vldrw.u32 q0, [r1]
367 ; CHECK-NEXT: ldr.w lr, [sp, #20]
368 ; CHECK-NEXT: vmov.f32 s14, s5
369 ; CHECK-NEXT: vmov.f32 s10, s1
370 ; CHECK-NEXT: vmov r5, s4
371 ; CHECK-NEXT: vmov.f32 s4, s6
372 ; CHECK-NEXT: vmov.f32 s6, s7
373 ; CHECK-NEXT: vmov r1, s14
374 ; CHECK-NEXT: vmov r0, s10
375 ; CHECK-NEXT: smull r12, r3, r1, r0
376 ; CHECK-NEXT: vmov r0, s0
377 ; CHECK-NEXT: vmov.f32 s0, s2
378 ; CHECK-NEXT: vmov.f32 s2, s3
379 ; CHECK-NEXT: vmullb.s32 q2, q1, q0
380 ; CHECK-NEXT: asrl r12, r3, r2
381 ; CHECK-NEXT: vmov r6, r1, d4
382 ; CHECK-NEXT: vmov r4, r7, d5
383 ; CHECK-NEXT: asrl r6, r1, r2
384 ; CHECK-NEXT: asrl r4, r7, r2
385 ; CHECK-NEXT: smull r0, r5, r5, r0
386 ; CHECK-NEXT: asrl r0, r5, r2
387 ; CHECK-NEXT: vmov q0[2], q0[0], r0, r6
388 ; CHECK-NEXT: vmov q0[3], q0[1], r12, r4
389 ; CHECK-NEXT: vstrw.32 q0, [lr]
390 ; CHECK-NEXT: pop {r4, r5, r6, r7, pc}
392 %a = load <4 x i32>, ptr %A, align 4
393 %b = load <4 x i32>, ptr %B, align 4
394 %i = insertelement <4 x i64> undef, i64 %C, i32 0
395 %c = shufflevector <4 x i64> %i, <4 x i64> undef, <4 x i32> zeroinitializer
396 %sa = sext <4 x i32> %a to <4 x i64>
397 %sb = sext <4 x i32> %b to <4 x i64>
398 %add = mul <4 x i64> %sa, %sb
399 %sh = ashr <4 x i64> %add, %c
400 %t = trunc <4 x i64> %sh to <4 x i32>
401 store <4 x i32> %t, ptr %D, align 4
405 define arm_aapcs_vfpcc void @mul_i16(ptr %A, ptr %B, i32 %C, ptr %D) {
406 ; CHECK-LABEL: mul_i16:
407 ; CHECK: @ %bb.0: @ %entry
408 ; CHECK-NEXT: vldrw.u32 q0, [r1]
409 ; CHECK-NEXT: vldrw.u32 q1, [r0]
410 ; CHECK-NEXT: rsbs r2, r2, #0
411 ; CHECK-NEXT: vmullt.s16 q2, q1, q0
412 ; CHECK-NEXT: vmullb.s16 q0, q1, q0
413 ; CHECK-NEXT: vshl.s32 q2, r2
414 ; CHECK-NEXT: vshl.s32 q0, r2
415 ; CHECK-NEXT: vmovnt.i32 q0, q2
416 ; CHECK-NEXT: vstrw.32 q0, [r3]
419 %a = load <8 x i16>, ptr %A, align 4
420 %b = load <8 x i16>, ptr %B, align 4
421 %i = insertelement <8 x i32> undef, i32 %C, i32 0
422 %c = shufflevector <8 x i32> %i, <8 x i32> undef, <8 x i32> zeroinitializer
423 %sa = sext <8 x i16> %a to <8 x i32>
424 %sb = sext <8 x i16> %b to <8 x i32>
425 %add = mul <8 x i32> %sa, %sb
426 %sh = ashr <8 x i32> %add, %c
427 %t = trunc <8 x i32> %sh to <8 x i16>
428 store <8 x i16> %t, ptr %D, align 4
432 define arm_aapcs_vfpcc void @mul_i8(ptr %A, ptr %B, i16 %C, ptr %D) {
433 ; CHECK-LABEL: mul_i8:
434 ; CHECK: @ %bb.0: @ %entry
435 ; CHECK-NEXT: vldrw.u32 q0, [r1]
436 ; CHECK-NEXT: vldrw.u32 q1, [r0]
437 ; CHECK-NEXT: rsbs r2, r2, #0
438 ; CHECK-NEXT: vmullt.s8 q2, q1, q0
439 ; CHECK-NEXT: vmullb.s8 q0, q1, q0
440 ; CHECK-NEXT: vshl.s16 q2, r2
441 ; CHECK-NEXT: vshl.s16 q0, r2
442 ; CHECK-NEXT: vmovnt.i16 q0, q2
443 ; CHECK-NEXT: vstrw.32 q0, [r3]
446 %a = load <16 x i8>, ptr %A, align 4
447 %b = load <16 x i8>, ptr %B, align 4
448 %i = insertelement <16 x i16> undef, i16 %C, i32 0
449 %c = shufflevector <16 x i16> %i, <16 x i16> undef, <16 x i32> zeroinitializer
450 %sa = sext <16 x i8> %a to <16 x i16>
451 %sb = sext <16 x i8> %b to <16 x i16>
452 %add = mul <16 x i16> %sa, %sb
453 %sh = ashr <16 x i16> %add, %c
454 %t = trunc <16 x i16> %sh to <16 x i8>
455 store <16 x i8> %t, ptr %D, align 4