1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-none-linux-gnu -mattr=+neon | FileCheck %s --check-prefixes=CHECK,CHECK-SD
3 ; RUN: llc < %s -global-isel=1 -verify-machineinstrs -mtriple=arm64-none-linux-gnu -mattr=+neon | FileCheck %s --check-prefixes=CHECK,CHECK-GI
5 declare float @llvm.aarch64.neon.fminnmv.f32.v4f32(<4 x float>)
7 declare float @llvm.aarch64.neon.fmaxnmv.f32.v4f32(<4 x float>)
9 declare float @llvm.aarch64.neon.fminv.f32.v4f32(<4 x float>)
11 declare float @llvm.aarch64.neon.fmaxv.f32.v4f32(<4 x float>)
13 declare i32 @llvm.aarch64.neon.saddv.i32.v4i32(<4 x i32>)
15 declare i32 @llvm.aarch64.neon.saddv.i32.v8i16(<8 x i16>)
17 declare i32 @llvm.aarch64.neon.saddv.i32.v16i8(<16 x i8>)
19 declare i32 @llvm.aarch64.neon.saddv.i32.v4i16(<4 x i16>)
21 declare i32 @llvm.aarch64.neon.saddv.i32.v8i8(<8 x i8>)
23 declare i32 @llvm.aarch64.neon.uminv.i32.v4i32(<4 x i32>)
25 declare i32 @llvm.aarch64.neon.uminv.i32.v8i16(<8 x i16>)
27 declare i32 @llvm.aarch64.neon.uminv.i32.v16i8(<16 x i8>)
29 declare i32 @llvm.aarch64.neon.sminv.i32.v4i32(<4 x i32>)
31 declare i32 @llvm.aarch64.neon.sminv.i32.v8i16(<8 x i16>)
33 declare i32 @llvm.aarch64.neon.sminv.i32.v16i8(<16 x i8>)
35 declare i32 @llvm.aarch64.neon.uminv.i32.v4i16(<4 x i16>)
37 declare i32 @llvm.aarch64.neon.uminv.i32.v8i8(<8 x i8>)
39 declare i32 @llvm.aarch64.neon.sminv.i32.v4i16(<4 x i16>)
41 declare i32 @llvm.aarch64.neon.sminv.i32.v8i8(<8 x i8>)
43 declare i32 @llvm.aarch64.neon.umaxv.i32.v4i32(<4 x i32>)
45 declare i32 @llvm.aarch64.neon.umaxv.i32.v8i16(<8 x i16>)
47 declare i32 @llvm.aarch64.neon.umaxv.i32.v16i8(<16 x i8>)
49 declare i32 @llvm.aarch64.neon.smaxv.i32.v4i32(<4 x i32>)
51 declare i32 @llvm.aarch64.neon.smaxv.i32.v8i16(<8 x i16>)
53 declare i32 @llvm.aarch64.neon.smaxv.i32.v16i8(<16 x i8>)
55 declare i32 @llvm.aarch64.neon.umaxv.i32.v4i16(<4 x i16>)
57 declare i32 @llvm.aarch64.neon.umaxv.i32.v8i8(<8 x i8>)
59 declare i32 @llvm.aarch64.neon.smaxv.i32.v4i16(<4 x i16>)
61 declare i32 @llvm.aarch64.neon.smaxv.i32.v8i8(<8 x i8>)
63 declare i64 @llvm.aarch64.neon.uaddlv.i64.v4i32(<4 x i32>)
65 declare i32 @llvm.aarch64.neon.uaddlv.i32.v8i16(<8 x i16>)
67 declare i32 @llvm.aarch64.neon.uaddlv.i32.v16i8(<16 x i8>)
69 declare i64 @llvm.aarch64.neon.saddlv.i64.v4i32(<4 x i32>)
71 declare i32 @llvm.aarch64.neon.saddlv.i32.v8i16(<8 x i16>)
73 declare i32 @llvm.aarch64.neon.saddlv.i32.v16i8(<16 x i8>)
75 declare i32 @llvm.aarch64.neon.uaddlv.i32.v4i16(<4 x i16>)
77 declare i32 @llvm.aarch64.neon.uaddlv.i32.v8i8(<8 x i8>)
79 declare i32 @llvm.aarch64.neon.saddlv.i32.v4i16(<4 x i16>)
81 declare i32 @llvm.aarch64.neon.saddlv.i32.v8i8(<8 x i8>)
83 define i16 @test_vaddlv_s8(<8 x i8> %a) {
84 ; CHECK-LABEL: test_vaddlv_s8:
85 ; CHECK: // %bb.0: // %entry
86 ; CHECK-NEXT: saddlv h0, v0.8b
87 ; CHECK-NEXT: smov w0, v0.h[0]
90 %saddlvv.i = tail call i32 @llvm.aarch64.neon.saddlv.i32.v8i8(<8 x i8> %a)
91 %0 = trunc i32 %saddlvv.i to i16
95 define i32 @test_vaddlv_s16(<4 x i16> %a) {
96 ; CHECK-LABEL: test_vaddlv_s16:
97 ; CHECK: // %bb.0: // %entry
98 ; CHECK-NEXT: saddlv s0, v0.4h
99 ; CHECK-NEXT: fmov w0, s0
102 %saddlvv.i = tail call i32 @llvm.aarch64.neon.saddlv.i32.v4i16(<4 x i16> %a)
106 define i16 @test_vaddlv_u8(<8 x i8> %a) {
107 ; CHECK-LABEL: test_vaddlv_u8:
108 ; CHECK: // %bb.0: // %entry
109 ; CHECK-NEXT: uaddlv h0, v0.8b
110 ; CHECK-NEXT: fmov w0, s0
113 %uaddlvv.i = tail call i32 @llvm.aarch64.neon.uaddlv.i32.v8i8(<8 x i8> %a)
114 %0 = trunc i32 %uaddlvv.i to i16
118 define i32 @test_vaddlv_u16(<4 x i16> %a) {
119 ; CHECK-LABEL: test_vaddlv_u16:
120 ; CHECK: // %bb.0: // %entry
121 ; CHECK-NEXT: uaddlv s0, v0.4h
122 ; CHECK-NEXT: fmov w0, s0
125 %uaddlvv.i = tail call i32 @llvm.aarch64.neon.uaddlv.i32.v4i16(<4 x i16> %a)
129 define i16 @test_vaddlvq_s8(<16 x i8> %a) {
130 ; CHECK-LABEL: test_vaddlvq_s8:
131 ; CHECK: // %bb.0: // %entry
132 ; CHECK-NEXT: saddlv h0, v0.16b
133 ; CHECK-NEXT: smov w0, v0.h[0]
136 %saddlvv.i = tail call i32 @llvm.aarch64.neon.saddlv.i32.v16i8(<16 x i8> %a)
137 %0 = trunc i32 %saddlvv.i to i16
141 define i32 @test_vaddlvq_s16(<8 x i16> %a) {
142 ; CHECK-LABEL: test_vaddlvq_s16:
143 ; CHECK: // %bb.0: // %entry
144 ; CHECK-NEXT: saddlv s0, v0.8h
145 ; CHECK-NEXT: fmov w0, s0
148 %saddlvv.i = tail call i32 @llvm.aarch64.neon.saddlv.i32.v8i16(<8 x i16> %a)
152 define i64 @test_vaddlvq_s32(<4 x i32> %a) {
153 ; CHECK-LABEL: test_vaddlvq_s32:
154 ; CHECK: // %bb.0: // %entry
155 ; CHECK-NEXT: saddlv d0, v0.4s
156 ; CHECK-NEXT: fmov x0, d0
159 %saddlvv.i = tail call i64 @llvm.aarch64.neon.saddlv.i64.v4i32(<4 x i32> %a)
163 define i16 @test_vaddlvq_u8(<16 x i8> %a) {
164 ; CHECK-LABEL: test_vaddlvq_u8:
165 ; CHECK: // %bb.0: // %entry
166 ; CHECK-NEXT: uaddlv h0, v0.16b
167 ; CHECK-NEXT: fmov w0, s0
170 %uaddlvv.i = tail call i32 @llvm.aarch64.neon.uaddlv.i32.v16i8(<16 x i8> %a)
171 %0 = trunc i32 %uaddlvv.i to i16
175 define i32 @test_vaddlvq_u16(<8 x i16> %a) {
176 ; CHECK-LABEL: test_vaddlvq_u16:
177 ; CHECK: // %bb.0: // %entry
178 ; CHECK-NEXT: uaddlv s0, v0.8h
179 ; CHECK-NEXT: fmov w0, s0
182 %uaddlvv.i = tail call i32 @llvm.aarch64.neon.uaddlv.i32.v8i16(<8 x i16> %a)
186 define i64 @test_vaddlvq_u32(<4 x i32> %a) {
187 ; CHECK-LABEL: test_vaddlvq_u32:
188 ; CHECK: // %bb.0: // %entry
189 ; CHECK-NEXT: uaddlv d0, v0.4s
190 ; CHECK-NEXT: fmov x0, d0
193 %uaddlvv.i = tail call i64 @llvm.aarch64.neon.uaddlv.i64.v4i32(<4 x i32> %a)
197 define i8 @test_vmaxv_s8(<8 x i8> %a) {
198 ; CHECK-SD-LABEL: test_vmaxv_s8:
199 ; CHECK-SD: // %bb.0: // %entry
200 ; CHECK-SD-NEXT: smaxv b0, v0.8b
201 ; CHECK-SD-NEXT: fmov w0, s0
204 ; CHECK-GI-LABEL: test_vmaxv_s8:
205 ; CHECK-GI: // %bb.0: // %entry
206 ; CHECK-GI-NEXT: smaxv b0, v0.8b
207 ; CHECK-GI-NEXT: smov w0, v0.b[0]
210 %smaxv.i = tail call i32 @llvm.aarch64.neon.smaxv.i32.v8i8(<8 x i8> %a)
211 %0 = trunc i32 %smaxv.i to i8
215 define i16 @test_vmaxv_s16(<4 x i16> %a) {
216 ; CHECK-SD-LABEL: test_vmaxv_s16:
217 ; CHECK-SD: // %bb.0: // %entry
218 ; CHECK-SD-NEXT: smaxv h0, v0.4h
219 ; CHECK-SD-NEXT: fmov w0, s0
222 ; CHECK-GI-LABEL: test_vmaxv_s16:
223 ; CHECK-GI: // %bb.0: // %entry
224 ; CHECK-GI-NEXT: smaxv h0, v0.4h
225 ; CHECK-GI-NEXT: smov w0, v0.h[0]
228 %smaxv.i = tail call i32 @llvm.aarch64.neon.smaxv.i32.v4i16(<4 x i16> %a)
229 %0 = trunc i32 %smaxv.i to i16
233 define i8 @test_vmaxv_u8(<8 x i8> %a) {
234 ; CHECK-LABEL: test_vmaxv_u8:
235 ; CHECK: // %bb.0: // %entry
236 ; CHECK-NEXT: umaxv b0, v0.8b
237 ; CHECK-NEXT: fmov w0, s0
240 %umaxv.i = tail call i32 @llvm.aarch64.neon.umaxv.i32.v8i8(<8 x i8> %a)
241 %0 = trunc i32 %umaxv.i to i8
245 define i16 @test_vmaxv_u16(<4 x i16> %a) {
246 ; CHECK-LABEL: test_vmaxv_u16:
247 ; CHECK: // %bb.0: // %entry
248 ; CHECK-NEXT: umaxv h0, v0.4h
249 ; CHECK-NEXT: fmov w0, s0
252 %umaxv.i = tail call i32 @llvm.aarch64.neon.umaxv.i32.v4i16(<4 x i16> %a)
253 %0 = trunc i32 %umaxv.i to i16
257 define i8 @test_vmaxvq_s8(<16 x i8> %a) {
258 ; CHECK-SD-LABEL: test_vmaxvq_s8:
259 ; CHECK-SD: // %bb.0: // %entry
260 ; CHECK-SD-NEXT: smaxv b0, v0.16b
261 ; CHECK-SD-NEXT: fmov w0, s0
264 ; CHECK-GI-LABEL: test_vmaxvq_s8:
265 ; CHECK-GI: // %bb.0: // %entry
266 ; CHECK-GI-NEXT: smaxv b0, v0.16b
267 ; CHECK-GI-NEXT: smov w0, v0.b[0]
270 %smaxv.i = tail call i32 @llvm.aarch64.neon.smaxv.i32.v16i8(<16 x i8> %a)
271 %0 = trunc i32 %smaxv.i to i8
275 define i16 @test_vmaxvq_s16(<8 x i16> %a) {
276 ; CHECK-SD-LABEL: test_vmaxvq_s16:
277 ; CHECK-SD: // %bb.0: // %entry
278 ; CHECK-SD-NEXT: smaxv h0, v0.8h
279 ; CHECK-SD-NEXT: fmov w0, s0
282 ; CHECK-GI-LABEL: test_vmaxvq_s16:
283 ; CHECK-GI: // %bb.0: // %entry
284 ; CHECK-GI-NEXT: smaxv h0, v0.8h
285 ; CHECK-GI-NEXT: smov w0, v0.h[0]
288 %smaxv.i = tail call i32 @llvm.aarch64.neon.smaxv.i32.v8i16(<8 x i16> %a)
289 %0 = trunc i32 %smaxv.i to i16
293 define i32 @test_vmaxvq_s32(<4 x i32> %a) {
294 ; CHECK-LABEL: test_vmaxvq_s32:
295 ; CHECK: // %bb.0: // %entry
296 ; CHECK-NEXT: smaxv s0, v0.4s
297 ; CHECK-NEXT: fmov w0, s0
300 %smaxv.i = tail call i32 @llvm.aarch64.neon.smaxv.i32.v4i32(<4 x i32> %a)
304 define i8 @test_vmaxvq_u8(<16 x i8> %a) {
305 ; CHECK-LABEL: test_vmaxvq_u8:
306 ; CHECK: // %bb.0: // %entry
307 ; CHECK-NEXT: umaxv b0, v0.16b
308 ; CHECK-NEXT: fmov w0, s0
311 %umaxv.i = tail call i32 @llvm.aarch64.neon.umaxv.i32.v16i8(<16 x i8> %a)
312 %0 = trunc i32 %umaxv.i to i8
316 define i16 @test_vmaxvq_u16(<8 x i16> %a) {
317 ; CHECK-LABEL: test_vmaxvq_u16:
318 ; CHECK: // %bb.0: // %entry
319 ; CHECK-NEXT: umaxv h0, v0.8h
320 ; CHECK-NEXT: fmov w0, s0
323 %umaxv.i = tail call i32 @llvm.aarch64.neon.umaxv.i32.v8i16(<8 x i16> %a)
324 %0 = trunc i32 %umaxv.i to i16
328 define i32 @test_vmaxvq_u32(<4 x i32> %a) {
329 ; CHECK-LABEL: test_vmaxvq_u32:
330 ; CHECK: // %bb.0: // %entry
331 ; CHECK-NEXT: umaxv s0, v0.4s
332 ; CHECK-NEXT: fmov w0, s0
335 %umaxv.i = tail call i32 @llvm.aarch64.neon.umaxv.i32.v4i32(<4 x i32> %a)
339 define i8 @test_vminv_s8(<8 x i8> %a) {
340 ; CHECK-SD-LABEL: test_vminv_s8:
341 ; CHECK-SD: // %bb.0: // %entry
342 ; CHECK-SD-NEXT: sminv b0, v0.8b
343 ; CHECK-SD-NEXT: fmov w0, s0
346 ; CHECK-GI-LABEL: test_vminv_s8:
347 ; CHECK-GI: // %bb.0: // %entry
348 ; CHECK-GI-NEXT: sminv b0, v0.8b
349 ; CHECK-GI-NEXT: smov w0, v0.b[0]
352 %sminv.i = tail call i32 @llvm.aarch64.neon.sminv.i32.v8i8(<8 x i8> %a)
353 %0 = trunc i32 %sminv.i to i8
357 define i16 @test_vminv_s16(<4 x i16> %a) {
358 ; CHECK-SD-LABEL: test_vminv_s16:
359 ; CHECK-SD: // %bb.0: // %entry
360 ; CHECK-SD-NEXT: sminv h0, v0.4h
361 ; CHECK-SD-NEXT: fmov w0, s0
364 ; CHECK-GI-LABEL: test_vminv_s16:
365 ; CHECK-GI: // %bb.0: // %entry
366 ; CHECK-GI-NEXT: sminv h0, v0.4h
367 ; CHECK-GI-NEXT: smov w0, v0.h[0]
370 %sminv.i = tail call i32 @llvm.aarch64.neon.sminv.i32.v4i16(<4 x i16> %a)
371 %0 = trunc i32 %sminv.i to i16
375 define i8 @test_vminv_u8(<8 x i8> %a) {
376 ; CHECK-LABEL: test_vminv_u8:
377 ; CHECK: // %bb.0: // %entry
378 ; CHECK-NEXT: uminv b0, v0.8b
379 ; CHECK-NEXT: fmov w0, s0
382 %uminv.i = tail call i32 @llvm.aarch64.neon.uminv.i32.v8i8(<8 x i8> %a)
383 %0 = trunc i32 %uminv.i to i8
387 define i16 @test_vminv_u16(<4 x i16> %a) {
388 ; CHECK-LABEL: test_vminv_u16:
389 ; CHECK: // %bb.0: // %entry
390 ; CHECK-NEXT: uminv h0, v0.4h
391 ; CHECK-NEXT: fmov w0, s0
394 %uminv.i = tail call i32 @llvm.aarch64.neon.uminv.i32.v4i16(<4 x i16> %a)
395 %0 = trunc i32 %uminv.i to i16
399 define i8 @test_vminvq_s8(<16 x i8> %a) {
400 ; CHECK-SD-LABEL: test_vminvq_s8:
401 ; CHECK-SD: // %bb.0: // %entry
402 ; CHECK-SD-NEXT: sminv b0, v0.16b
403 ; CHECK-SD-NEXT: fmov w0, s0
406 ; CHECK-GI-LABEL: test_vminvq_s8:
407 ; CHECK-GI: // %bb.0: // %entry
408 ; CHECK-GI-NEXT: sminv b0, v0.16b
409 ; CHECK-GI-NEXT: smov w0, v0.b[0]
412 %sminv.i = tail call i32 @llvm.aarch64.neon.sminv.i32.v16i8(<16 x i8> %a)
413 %0 = trunc i32 %sminv.i to i8
417 define i16 @test_vminvq_s16(<8 x i16> %a) {
418 ; CHECK-SD-LABEL: test_vminvq_s16:
419 ; CHECK-SD: // %bb.0: // %entry
420 ; CHECK-SD-NEXT: sminv h0, v0.8h
421 ; CHECK-SD-NEXT: fmov w0, s0
424 ; CHECK-GI-LABEL: test_vminvq_s16:
425 ; CHECK-GI: // %bb.0: // %entry
426 ; CHECK-GI-NEXT: sminv h0, v0.8h
427 ; CHECK-GI-NEXT: smov w0, v0.h[0]
430 %sminv.i = tail call i32 @llvm.aarch64.neon.sminv.i32.v8i16(<8 x i16> %a)
431 %0 = trunc i32 %sminv.i to i16
435 define i32 @test_vminvq_s32(<4 x i32> %a) {
436 ; CHECK-LABEL: test_vminvq_s32:
437 ; CHECK: // %bb.0: // %entry
438 ; CHECK-NEXT: sminv s0, v0.4s
439 ; CHECK-NEXT: fmov w0, s0
442 %sminv.i = tail call i32 @llvm.aarch64.neon.sminv.i32.v4i32(<4 x i32> %a)
446 define i8 @test_vminvq_u8(<16 x i8> %a) {
447 ; CHECK-LABEL: test_vminvq_u8:
448 ; CHECK: // %bb.0: // %entry
449 ; CHECK-NEXT: uminv b0, v0.16b
450 ; CHECK-NEXT: fmov w0, s0
453 %uminv.i = tail call i32 @llvm.aarch64.neon.uminv.i32.v16i8(<16 x i8> %a)
454 %0 = trunc i32 %uminv.i to i8
458 define i16 @test_vminvq_u16(<8 x i16> %a) {
459 ; CHECK-LABEL: test_vminvq_u16:
460 ; CHECK: // %bb.0: // %entry
461 ; CHECK-NEXT: uminv h0, v0.8h
462 ; CHECK-NEXT: fmov w0, s0
465 %uminv.i = tail call i32 @llvm.aarch64.neon.uminv.i32.v8i16(<8 x i16> %a)
466 %0 = trunc i32 %uminv.i to i16
470 define i32 @test_vminvq_u32(<4 x i32> %a) {
471 ; CHECK-LABEL: test_vminvq_u32:
472 ; CHECK: // %bb.0: // %entry
473 ; CHECK-NEXT: uminv s0, v0.4s
474 ; CHECK-NEXT: fmov w0, s0
477 %uminv.i = tail call i32 @llvm.aarch64.neon.uminv.i32.v4i32(<4 x i32> %a)
481 define i8 @test_vaddv_s8(<8 x i8> %a) {
482 ; CHECK-SD-LABEL: test_vaddv_s8:
483 ; CHECK-SD: // %bb.0: // %entry
484 ; CHECK-SD-NEXT: addv b0, v0.8b
485 ; CHECK-SD-NEXT: fmov w0, s0
488 ; CHECK-GI-LABEL: test_vaddv_s8:
489 ; CHECK-GI: // %bb.0: // %entry
490 ; CHECK-GI-NEXT: addv b0, v0.8b
491 ; CHECK-GI-NEXT: smov w0, v0.b[0]
494 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v8i8(<8 x i8> %a)
495 %0 = trunc i32 %vaddv.i to i8
499 define i16 @test_vaddv_s16(<4 x i16> %a) {
500 ; CHECK-SD-LABEL: test_vaddv_s16:
501 ; CHECK-SD: // %bb.0: // %entry
502 ; CHECK-SD-NEXT: addv h0, v0.4h
503 ; CHECK-SD-NEXT: fmov w0, s0
506 ; CHECK-GI-LABEL: test_vaddv_s16:
507 ; CHECK-GI: // %bb.0: // %entry
508 ; CHECK-GI-NEXT: addv h0, v0.4h
509 ; CHECK-GI-NEXT: smov w0, v0.h[0]
512 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v4i16(<4 x i16> %a)
513 %0 = trunc i32 %vaddv.i to i16
517 define i8 @test_vaddv_u8(<8 x i8> %a) {
518 ; CHECK-SD-LABEL: test_vaddv_u8:
519 ; CHECK-SD: // %bb.0: // %entry
520 ; CHECK-SD-NEXT: addv b0, v0.8b
521 ; CHECK-SD-NEXT: fmov w0, s0
524 ; CHECK-GI-LABEL: test_vaddv_u8:
525 ; CHECK-GI: // %bb.0: // %entry
526 ; CHECK-GI-NEXT: addv b0, v0.8b
527 ; CHECK-GI-NEXT: smov w0, v0.b[0]
530 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v8i8(<8 x i8> %a)
531 %0 = trunc i32 %vaddv.i to i8
535 define i16 @test_vaddv_u16(<4 x i16> %a) {
536 ; CHECK-SD-LABEL: test_vaddv_u16:
537 ; CHECK-SD: // %bb.0: // %entry
538 ; CHECK-SD-NEXT: addv h0, v0.4h
539 ; CHECK-SD-NEXT: fmov w0, s0
542 ; CHECK-GI-LABEL: test_vaddv_u16:
543 ; CHECK-GI: // %bb.0: // %entry
544 ; CHECK-GI-NEXT: addv h0, v0.4h
545 ; CHECK-GI-NEXT: smov w0, v0.h[0]
548 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v4i16(<4 x i16> %a)
549 %0 = trunc i32 %vaddv.i to i16
553 define i8 @test_vaddvq_s8(<16 x i8> %a) {
554 ; CHECK-SD-LABEL: test_vaddvq_s8:
555 ; CHECK-SD: // %bb.0: // %entry
556 ; CHECK-SD-NEXT: addv b0, v0.16b
557 ; CHECK-SD-NEXT: fmov w0, s0
560 ; CHECK-GI-LABEL: test_vaddvq_s8:
561 ; CHECK-GI: // %bb.0: // %entry
562 ; CHECK-GI-NEXT: addv b0, v0.16b
563 ; CHECK-GI-NEXT: smov w0, v0.b[0]
566 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v16i8(<16 x i8> %a)
567 %0 = trunc i32 %vaddv.i to i8
571 define i16 @test_vaddvq_s16(<8 x i16> %a) {
572 ; CHECK-SD-LABEL: test_vaddvq_s16:
573 ; CHECK-SD: // %bb.0: // %entry
574 ; CHECK-SD-NEXT: addv h0, v0.8h
575 ; CHECK-SD-NEXT: fmov w0, s0
578 ; CHECK-GI-LABEL: test_vaddvq_s16:
579 ; CHECK-GI: // %bb.0: // %entry
580 ; CHECK-GI-NEXT: addv h0, v0.8h
581 ; CHECK-GI-NEXT: smov w0, v0.h[0]
584 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v8i16(<8 x i16> %a)
585 %0 = trunc i32 %vaddv.i to i16
589 define i32 @test_vaddvq_s32(<4 x i32> %a) {
590 ; CHECK-LABEL: test_vaddvq_s32:
591 ; CHECK: // %bb.0: // %entry
592 ; CHECK-NEXT: addv s0, v0.4s
593 ; CHECK-NEXT: fmov w0, s0
596 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v4i32(<4 x i32> %a)
600 define i8 @test_vaddvq_u8(<16 x i8> %a) {
601 ; CHECK-SD-LABEL: test_vaddvq_u8:
602 ; CHECK-SD: // %bb.0: // %entry
603 ; CHECK-SD-NEXT: addv b0, v0.16b
604 ; CHECK-SD-NEXT: fmov w0, s0
607 ; CHECK-GI-LABEL: test_vaddvq_u8:
608 ; CHECK-GI: // %bb.0: // %entry
609 ; CHECK-GI-NEXT: addv b0, v0.16b
610 ; CHECK-GI-NEXT: smov w0, v0.b[0]
613 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v16i8(<16 x i8> %a)
614 %0 = trunc i32 %vaddv.i to i8
618 define i16 @test_vaddvq_u16(<8 x i16> %a) {
619 ; CHECK-SD-LABEL: test_vaddvq_u16:
620 ; CHECK-SD: // %bb.0: // %entry
621 ; CHECK-SD-NEXT: addv h0, v0.8h
622 ; CHECK-SD-NEXT: fmov w0, s0
625 ; CHECK-GI-LABEL: test_vaddvq_u16:
626 ; CHECK-GI: // %bb.0: // %entry
627 ; CHECK-GI-NEXT: addv h0, v0.8h
628 ; CHECK-GI-NEXT: smov w0, v0.h[0]
631 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v8i16(<8 x i16> %a)
632 %0 = trunc i32 %vaddv.i to i16
636 define i32 @test_vaddvq_u32(<4 x i32> %a) {
637 ; CHECK-LABEL: test_vaddvq_u32:
638 ; CHECK: // %bb.0: // %entry
639 ; CHECK-NEXT: addv s0, v0.4s
640 ; CHECK-NEXT: fmov w0, s0
643 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v4i32(<4 x i32> %a)
647 define float @test_vmaxvq_f32(<4 x float> %a) {
648 ; CHECK-LABEL: test_vmaxvq_f32:
649 ; CHECK: // %bb.0: // %entry
650 ; CHECK-NEXT: fmaxv s0, v0.4s
653 %0 = call float @llvm.aarch64.neon.fmaxv.f32.v4f32(<4 x float> %a)
657 define float @test_vminvq_f32(<4 x float> %a) {
658 ; CHECK-LABEL: test_vminvq_f32:
659 ; CHECK: // %bb.0: // %entry
660 ; CHECK-NEXT: fminv s0, v0.4s
663 %0 = call float @llvm.aarch64.neon.fminv.f32.v4f32(<4 x float> %a)
667 define float @test_vmaxnmvq_f32(<4 x float> %a) {
668 ; CHECK-LABEL: test_vmaxnmvq_f32:
669 ; CHECK: // %bb.0: // %entry
670 ; CHECK-NEXT: fmaxnmv s0, v0.4s
673 %0 = call float @llvm.aarch64.neon.fmaxnmv.f32.v4f32(<4 x float> %a)
677 define float @test_vminnmvq_f32(<4 x float> %a) {
678 ; CHECK-LABEL: test_vminnmvq_f32:
679 ; CHECK: // %bb.0: // %entry
680 ; CHECK-NEXT: fminnmv s0, v0.4s
683 %0 = call float @llvm.aarch64.neon.fminnmv.f32.v4f32(<4 x float> %a)