1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc < %s -mtriple=arm64-none-linux-gnu -mattr=+neon -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-SD
3 ; RUN: llc < %s -mtriple=arm64-none-linux-gnu -mattr=+neon -global-isel -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-GI
5 declare float @llvm.aarch64.neon.fminnmv.f32.v4f32(<4 x float>)
6 declare float @llvm.aarch64.neon.fmaxnmv.f32.v4f32(<4 x float>)
7 declare float @llvm.aarch64.neon.fminv.f32.v4f32(<4 x float>)
8 declare float @llvm.aarch64.neon.fmaxv.f32.v4f32(<4 x float>)
9 declare i32 @llvm.aarch64.neon.saddv.i32.v4i32(<4 x i32>)
10 declare i32 @llvm.aarch64.neon.saddv.i32.v8i16(<8 x i16>)
11 declare i32 @llvm.aarch64.neon.saddv.i32.v16i8(<16 x i8>)
12 declare i32 @llvm.aarch64.neon.saddv.i32.v4i16(<4 x i16>)
13 declare i32 @llvm.aarch64.neon.saddv.i32.v8i8(<8 x i8>)
14 declare i32 @llvm.aarch64.neon.uminv.i32.v4i32(<4 x i32>)
15 declare i32 @llvm.aarch64.neon.uminv.i32.v8i16(<8 x i16>)
16 declare i32 @llvm.aarch64.neon.uminv.i32.v16i8(<16 x i8>)
17 declare i32 @llvm.aarch64.neon.sminv.i32.v4i32(<4 x i32>)
18 declare i32 @llvm.aarch64.neon.sminv.i32.v8i16(<8 x i16>)
19 declare i32 @llvm.aarch64.neon.sminv.i32.v16i8(<16 x i8>)
20 declare i32 @llvm.aarch64.neon.uminv.i32.v4i16(<4 x i16>)
21 declare i32 @llvm.aarch64.neon.uminv.i32.v8i8(<8 x i8>)
22 declare i32 @llvm.aarch64.neon.sminv.i32.v4i16(<4 x i16>)
23 declare i32 @llvm.aarch64.neon.sminv.i32.v8i8(<8 x i8>)
24 declare i32 @llvm.aarch64.neon.umaxv.i32.v4i32(<4 x i32>)
25 declare i32 @llvm.aarch64.neon.umaxv.i32.v8i16(<8 x i16>)
26 declare i32 @llvm.aarch64.neon.umaxv.i32.v16i8(<16 x i8>)
27 declare i32 @llvm.aarch64.neon.smaxv.i32.v4i32(<4 x i32>)
28 declare i32 @llvm.aarch64.neon.smaxv.i32.v8i16(<8 x i16>)
29 declare i32 @llvm.aarch64.neon.smaxv.i32.v16i8(<16 x i8>)
30 declare i32 @llvm.aarch64.neon.umaxv.i32.v4i16(<4 x i16>)
31 declare i32 @llvm.aarch64.neon.umaxv.i32.v8i8(<8 x i8>)
32 declare i32 @llvm.aarch64.neon.smaxv.i32.v4i16(<4 x i16>)
33 declare i32 @llvm.aarch64.neon.smaxv.i32.v8i8(<8 x i8>)
34 declare i64 @llvm.aarch64.neon.uaddlv.i64.v4i32(<4 x i32>)
35 declare i32 @llvm.aarch64.neon.uaddlv.i32.v8i16(<8 x i16>)
36 declare i32 @llvm.aarch64.neon.uaddlv.i32.v16i8(<16 x i8>)
37 declare i64 @llvm.aarch64.neon.saddlv.i64.v4i32(<4 x i32>)
38 declare i32 @llvm.aarch64.neon.saddlv.i32.v8i16(<8 x i16>)
39 declare i32 @llvm.aarch64.neon.saddlv.i32.v16i8(<16 x i8>)
40 declare i32 @llvm.aarch64.neon.uaddlv.i32.v4i16(<4 x i16>)
41 declare i32 @llvm.aarch64.neon.uaddlv.i32.v8i8(<8 x i8>)
42 declare i32 @llvm.aarch64.neon.saddlv.i32.v4i16(<4 x i16>)
43 declare i32 @llvm.aarch64.neon.saddlv.i32.v8i8(<8 x i8>)
45 define i16 @test_vaddlv_s8(<8 x i8> %a) {
46 ; CHECK-LABEL: test_vaddlv_s8:
47 ; CHECK: // %bb.0: // %entry
48 ; CHECK-NEXT: saddlv h0, v0.8b
49 ; CHECK-NEXT: fmov w0, s0
52 %saddlvv.i = tail call i32 @llvm.aarch64.neon.saddlv.i32.v8i8(<8 x i8> %a)
53 %0 = trunc i32 %saddlvv.i to i16
57 define i32 @test_vaddlv_s16(<4 x i16> %a) {
58 ; CHECK-LABEL: test_vaddlv_s16:
59 ; CHECK: // %bb.0: // %entry
60 ; CHECK-NEXT: saddlv s0, v0.4h
61 ; CHECK-NEXT: fmov w0, s0
64 %saddlvv.i = tail call i32 @llvm.aarch64.neon.saddlv.i32.v4i16(<4 x i16> %a)
68 define i16 @test_vaddlv_u8(<8 x i8> %a) {
69 ; CHECK-LABEL: test_vaddlv_u8:
70 ; CHECK: // %bb.0: // %entry
71 ; CHECK-NEXT: uaddlv h0, v0.8b
72 ; CHECK-NEXT: fmov w0, s0
75 %uaddlvv.i = tail call i32 @llvm.aarch64.neon.uaddlv.i32.v8i8(<8 x i8> %a)
76 %0 = trunc i32 %uaddlvv.i to i16
80 define i32 @test_vaddlv_u16(<4 x i16> %a) {
81 ; CHECK-LABEL: test_vaddlv_u16:
82 ; CHECK: // %bb.0: // %entry
83 ; CHECK-NEXT: uaddlv s0, v0.4h
84 ; CHECK-NEXT: fmov w0, s0
87 %uaddlvv.i = tail call i32 @llvm.aarch64.neon.uaddlv.i32.v4i16(<4 x i16> %a)
91 define i16 @test_vaddlvq_s8(<16 x i8> %a) {
92 ; CHECK-LABEL: test_vaddlvq_s8:
93 ; CHECK: // %bb.0: // %entry
94 ; CHECK-NEXT: saddlv h0, v0.16b
95 ; CHECK-NEXT: fmov w0, s0
98 %saddlvv.i = tail call i32 @llvm.aarch64.neon.saddlv.i32.v16i8(<16 x i8> %a)
99 %0 = trunc i32 %saddlvv.i to i16
103 define i32 @test_vaddlvq_s16(<8 x i16> %a) {
104 ; CHECK-LABEL: test_vaddlvq_s16:
105 ; CHECK: // %bb.0: // %entry
106 ; CHECK-NEXT: saddlv s0, v0.8h
107 ; CHECK-NEXT: fmov w0, s0
110 %saddlvv.i = tail call i32 @llvm.aarch64.neon.saddlv.i32.v8i16(<8 x i16> %a)
114 define i64 @test_vaddlvq_s32(<4 x i32> %a) {
115 ; CHECK-LABEL: test_vaddlvq_s32:
116 ; CHECK: // %bb.0: // %entry
117 ; CHECK-NEXT: saddlv d0, v0.4s
118 ; CHECK-NEXT: fmov x0, d0
121 %saddlvv.i = tail call i64 @llvm.aarch64.neon.saddlv.i64.v4i32(<4 x i32> %a)
125 define i16 @test_vaddlvq_u8(<16 x i8> %a) {
126 ; CHECK-LABEL: test_vaddlvq_u8:
127 ; CHECK: // %bb.0: // %entry
128 ; CHECK-NEXT: uaddlv h0, v0.16b
129 ; CHECK-NEXT: fmov w0, s0
132 %uaddlvv.i = tail call i32 @llvm.aarch64.neon.uaddlv.i32.v16i8(<16 x i8> %a)
133 %0 = trunc i32 %uaddlvv.i to i16
137 define i32 @test_vaddlvq_u16(<8 x i16> %a) {
138 ; CHECK-LABEL: test_vaddlvq_u16:
139 ; CHECK: // %bb.0: // %entry
140 ; CHECK-NEXT: uaddlv s0, v0.8h
141 ; CHECK-NEXT: fmov w0, s0
144 %uaddlvv.i = tail call i32 @llvm.aarch64.neon.uaddlv.i32.v8i16(<8 x i16> %a)
148 define i64 @test_vaddlvq_u32(<4 x i32> %a) {
149 ; CHECK-LABEL: test_vaddlvq_u32:
150 ; CHECK: // %bb.0: // %entry
151 ; CHECK-NEXT: uaddlv d0, v0.4s
152 ; CHECK-NEXT: fmov x0, d0
155 %uaddlvv.i = tail call i64 @llvm.aarch64.neon.uaddlv.i64.v4i32(<4 x i32> %a)
159 define i8 @test_vmaxv_s8(<8 x i8> %a) {
160 ; CHECK-SD-LABEL: test_vmaxv_s8:
161 ; CHECK-SD: // %bb.0: // %entry
162 ; CHECK-SD-NEXT: smaxv b0, v0.8b
163 ; CHECK-SD-NEXT: fmov w0, s0
166 ; CHECK-GI-LABEL: test_vmaxv_s8:
167 ; CHECK-GI: // %bb.0: // %entry
168 ; CHECK-GI-NEXT: smaxv b0, v0.8b
169 ; CHECK-GI-NEXT: smov w0, v0.b[0]
172 %smaxv.i = tail call i32 @llvm.aarch64.neon.smaxv.i32.v8i8(<8 x i8> %a)
173 %0 = trunc i32 %smaxv.i to i8
177 define i16 @test_vmaxv_s16(<4 x i16> %a) {
178 ; CHECK-SD-LABEL: test_vmaxv_s16:
179 ; CHECK-SD: // %bb.0: // %entry
180 ; CHECK-SD-NEXT: smaxv h0, v0.4h
181 ; CHECK-SD-NEXT: fmov w0, s0
184 ; CHECK-GI-LABEL: test_vmaxv_s16:
185 ; CHECK-GI: // %bb.0: // %entry
186 ; CHECK-GI-NEXT: smaxv h0, v0.4h
187 ; CHECK-GI-NEXT: smov w0, v0.h[0]
190 %smaxv.i = tail call i32 @llvm.aarch64.neon.smaxv.i32.v4i16(<4 x i16> %a)
191 %0 = trunc i32 %smaxv.i to i16
195 define i8 @test_vmaxv_u8(<8 x i8> %a) {
196 ; CHECK-LABEL: test_vmaxv_u8:
197 ; CHECK: // %bb.0: // %entry
198 ; CHECK-NEXT: umaxv b0, v0.8b
199 ; CHECK-NEXT: fmov w0, s0
202 %umaxv.i = tail call i32 @llvm.aarch64.neon.umaxv.i32.v8i8(<8 x i8> %a)
203 %0 = trunc i32 %umaxv.i to i8
207 define i16 @test_vmaxv_u16(<4 x i16> %a) {
208 ; CHECK-LABEL: test_vmaxv_u16:
209 ; CHECK: // %bb.0: // %entry
210 ; CHECK-NEXT: umaxv h0, v0.4h
211 ; CHECK-NEXT: fmov w0, s0
214 %umaxv.i = tail call i32 @llvm.aarch64.neon.umaxv.i32.v4i16(<4 x i16> %a)
215 %0 = trunc i32 %umaxv.i to i16
219 define i8 @test_vmaxvq_s8(<16 x i8> %a) {
220 ; CHECK-SD-LABEL: test_vmaxvq_s8:
221 ; CHECK-SD: // %bb.0: // %entry
222 ; CHECK-SD-NEXT: smaxv b0, v0.16b
223 ; CHECK-SD-NEXT: fmov w0, s0
226 ; CHECK-GI-LABEL: test_vmaxvq_s8:
227 ; CHECK-GI: // %bb.0: // %entry
228 ; CHECK-GI-NEXT: smaxv b0, v0.16b
229 ; CHECK-GI-NEXT: smov w0, v0.b[0]
232 %smaxv.i = tail call i32 @llvm.aarch64.neon.smaxv.i32.v16i8(<16 x i8> %a)
233 %0 = trunc i32 %smaxv.i to i8
237 define i16 @test_vmaxvq_s16(<8 x i16> %a) {
238 ; CHECK-SD-LABEL: test_vmaxvq_s16:
239 ; CHECK-SD: // %bb.0: // %entry
240 ; CHECK-SD-NEXT: smaxv h0, v0.8h
241 ; CHECK-SD-NEXT: fmov w0, s0
244 ; CHECK-GI-LABEL: test_vmaxvq_s16:
245 ; CHECK-GI: // %bb.0: // %entry
246 ; CHECK-GI-NEXT: smaxv h0, v0.8h
247 ; CHECK-GI-NEXT: smov w0, v0.h[0]
250 %smaxv.i = tail call i32 @llvm.aarch64.neon.smaxv.i32.v8i16(<8 x i16> %a)
251 %0 = trunc i32 %smaxv.i to i16
255 define i32 @test_vmaxvq_s32(<4 x i32> %a) {
256 ; CHECK-LABEL: test_vmaxvq_s32:
257 ; CHECK: // %bb.0: // %entry
258 ; CHECK-NEXT: smaxv s0, v0.4s
259 ; CHECK-NEXT: fmov w0, s0
262 %smaxv.i = tail call i32 @llvm.aarch64.neon.smaxv.i32.v4i32(<4 x i32> %a)
266 define i8 @test_vmaxvq_u8(<16 x i8> %a) {
267 ; CHECK-LABEL: test_vmaxvq_u8:
268 ; CHECK: // %bb.0: // %entry
269 ; CHECK-NEXT: umaxv b0, v0.16b
270 ; CHECK-NEXT: fmov w0, s0
273 %umaxv.i = tail call i32 @llvm.aarch64.neon.umaxv.i32.v16i8(<16 x i8> %a)
274 %0 = trunc i32 %umaxv.i to i8
278 define i16 @test_vmaxvq_u16(<8 x i16> %a) {
279 ; CHECK-LABEL: test_vmaxvq_u16:
280 ; CHECK: // %bb.0: // %entry
281 ; CHECK-NEXT: umaxv h0, v0.8h
282 ; CHECK-NEXT: fmov w0, s0
285 %umaxv.i = tail call i32 @llvm.aarch64.neon.umaxv.i32.v8i16(<8 x i16> %a)
286 %0 = trunc i32 %umaxv.i to i16
290 define i32 @test_vmaxvq_u32(<4 x i32> %a) {
291 ; CHECK-LABEL: test_vmaxvq_u32:
292 ; CHECK: // %bb.0: // %entry
293 ; CHECK-NEXT: umaxv s0, v0.4s
294 ; CHECK-NEXT: fmov w0, s0
297 %umaxv.i = tail call i32 @llvm.aarch64.neon.umaxv.i32.v4i32(<4 x i32> %a)
301 define i8 @test_vminv_s8(<8 x i8> %a) {
302 ; CHECK-SD-LABEL: test_vminv_s8:
303 ; CHECK-SD: // %bb.0: // %entry
304 ; CHECK-SD-NEXT: sminv b0, v0.8b
305 ; CHECK-SD-NEXT: fmov w0, s0
308 ; CHECK-GI-LABEL: test_vminv_s8:
309 ; CHECK-GI: // %bb.0: // %entry
310 ; CHECK-GI-NEXT: sminv b0, v0.8b
311 ; CHECK-GI-NEXT: smov w0, v0.b[0]
314 %sminv.i = tail call i32 @llvm.aarch64.neon.sminv.i32.v8i8(<8 x i8> %a)
315 %0 = trunc i32 %sminv.i to i8
319 define i16 @test_vminv_s16(<4 x i16> %a) {
320 ; CHECK-SD-LABEL: test_vminv_s16:
321 ; CHECK-SD: // %bb.0: // %entry
322 ; CHECK-SD-NEXT: sminv h0, v0.4h
323 ; CHECK-SD-NEXT: fmov w0, s0
326 ; CHECK-GI-LABEL: test_vminv_s16:
327 ; CHECK-GI: // %bb.0: // %entry
328 ; CHECK-GI-NEXT: sminv h0, v0.4h
329 ; CHECK-GI-NEXT: smov w0, v0.h[0]
332 %sminv.i = tail call i32 @llvm.aarch64.neon.sminv.i32.v4i16(<4 x i16> %a)
333 %0 = trunc i32 %sminv.i to i16
337 define i8 @test_vminv_u8(<8 x i8> %a) {
338 ; CHECK-LABEL: test_vminv_u8:
339 ; CHECK: // %bb.0: // %entry
340 ; CHECK-NEXT: uminv b0, v0.8b
341 ; CHECK-NEXT: fmov w0, s0
344 %uminv.i = tail call i32 @llvm.aarch64.neon.uminv.i32.v8i8(<8 x i8> %a)
345 %0 = trunc i32 %uminv.i to i8
349 define i16 @test_vminv_u16(<4 x i16> %a) {
350 ; CHECK-LABEL: test_vminv_u16:
351 ; CHECK: // %bb.0: // %entry
352 ; CHECK-NEXT: uminv h0, v0.4h
353 ; CHECK-NEXT: fmov w0, s0
356 %uminv.i = tail call i32 @llvm.aarch64.neon.uminv.i32.v4i16(<4 x i16> %a)
357 %0 = trunc i32 %uminv.i to i16
361 define i8 @test_vminvq_s8(<16 x i8> %a) {
362 ; CHECK-SD-LABEL: test_vminvq_s8:
363 ; CHECK-SD: // %bb.0: // %entry
364 ; CHECK-SD-NEXT: sminv b0, v0.16b
365 ; CHECK-SD-NEXT: fmov w0, s0
368 ; CHECK-GI-LABEL: test_vminvq_s8:
369 ; CHECK-GI: // %bb.0: // %entry
370 ; CHECK-GI-NEXT: sminv b0, v0.16b
371 ; CHECK-GI-NEXT: smov w0, v0.b[0]
374 %sminv.i = tail call i32 @llvm.aarch64.neon.sminv.i32.v16i8(<16 x i8> %a)
375 %0 = trunc i32 %sminv.i to i8
379 define i16 @test_vminvq_s16(<8 x i16> %a) {
380 ; CHECK-SD-LABEL: test_vminvq_s16:
381 ; CHECK-SD: // %bb.0: // %entry
382 ; CHECK-SD-NEXT: sminv h0, v0.8h
383 ; CHECK-SD-NEXT: fmov w0, s0
386 ; CHECK-GI-LABEL: test_vminvq_s16:
387 ; CHECK-GI: // %bb.0: // %entry
388 ; CHECK-GI-NEXT: sminv h0, v0.8h
389 ; CHECK-GI-NEXT: smov w0, v0.h[0]
392 %sminv.i = tail call i32 @llvm.aarch64.neon.sminv.i32.v8i16(<8 x i16> %a)
393 %0 = trunc i32 %sminv.i to i16
397 define i32 @test_vminvq_s32(<4 x i32> %a) {
398 ; CHECK-LABEL: test_vminvq_s32:
399 ; CHECK: // %bb.0: // %entry
400 ; CHECK-NEXT: sminv s0, v0.4s
401 ; CHECK-NEXT: fmov w0, s0
404 %sminv.i = tail call i32 @llvm.aarch64.neon.sminv.i32.v4i32(<4 x i32> %a)
408 define i8 @test_vminvq_u8(<16 x i8> %a) {
409 ; CHECK-LABEL: test_vminvq_u8:
410 ; CHECK: // %bb.0: // %entry
411 ; CHECK-NEXT: uminv b0, v0.16b
412 ; CHECK-NEXT: fmov w0, s0
415 %uminv.i = tail call i32 @llvm.aarch64.neon.uminv.i32.v16i8(<16 x i8> %a)
416 %0 = trunc i32 %uminv.i to i8
420 define i16 @test_vminvq_u16(<8 x i16> %a) {
421 ; CHECK-LABEL: test_vminvq_u16:
422 ; CHECK: // %bb.0: // %entry
423 ; CHECK-NEXT: uminv h0, v0.8h
424 ; CHECK-NEXT: fmov w0, s0
427 %uminv.i = tail call i32 @llvm.aarch64.neon.uminv.i32.v8i16(<8 x i16> %a)
428 %0 = trunc i32 %uminv.i to i16
432 define i32 @test_vminvq_u32(<4 x i32> %a) {
433 ; CHECK-LABEL: test_vminvq_u32:
434 ; CHECK: // %bb.0: // %entry
435 ; CHECK-NEXT: uminv s0, v0.4s
436 ; CHECK-NEXT: fmov w0, s0
439 %uminv.i = tail call i32 @llvm.aarch64.neon.uminv.i32.v4i32(<4 x i32> %a)
443 define i8 @test_vaddv_s8(<8 x i8> %a) {
444 ; CHECK-SD-LABEL: test_vaddv_s8:
445 ; CHECK-SD: // %bb.0: // %entry
446 ; CHECK-SD-NEXT: addv b0, v0.8b
447 ; CHECK-SD-NEXT: fmov w0, s0
450 ; CHECK-GI-LABEL: test_vaddv_s8:
451 ; CHECK-GI: // %bb.0: // %entry
452 ; CHECK-GI-NEXT: addv b0, v0.8b
453 ; CHECK-GI-NEXT: smov w0, v0.b[0]
456 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v8i8(<8 x i8> %a)
457 %0 = trunc i32 %vaddv.i to i8
461 define i16 @test_vaddv_s16(<4 x i16> %a) {
462 ; CHECK-SD-LABEL: test_vaddv_s16:
463 ; CHECK-SD: // %bb.0: // %entry
464 ; CHECK-SD-NEXT: addv h0, v0.4h
465 ; CHECK-SD-NEXT: fmov w0, s0
468 ; CHECK-GI-LABEL: test_vaddv_s16:
469 ; CHECK-GI: // %bb.0: // %entry
470 ; CHECK-GI-NEXT: addv h0, v0.4h
471 ; CHECK-GI-NEXT: smov w0, v0.h[0]
474 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v4i16(<4 x i16> %a)
475 %0 = trunc i32 %vaddv.i to i16
479 define i8 @test_vaddv_u8(<8 x i8> %a) {
480 ; CHECK-SD-LABEL: test_vaddv_u8:
481 ; CHECK-SD: // %bb.0: // %entry
482 ; CHECK-SD-NEXT: addv b0, v0.8b
483 ; CHECK-SD-NEXT: fmov w0, s0
486 ; CHECK-GI-LABEL: test_vaddv_u8:
487 ; CHECK-GI: // %bb.0: // %entry
488 ; CHECK-GI-NEXT: addv b0, v0.8b
489 ; CHECK-GI-NEXT: smov w0, v0.b[0]
492 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v8i8(<8 x i8> %a)
493 %0 = trunc i32 %vaddv.i to i8
497 define i16 @test_vaddv_u16(<4 x i16> %a) {
498 ; CHECK-SD-LABEL: test_vaddv_u16:
499 ; CHECK-SD: // %bb.0: // %entry
500 ; CHECK-SD-NEXT: addv h0, v0.4h
501 ; CHECK-SD-NEXT: fmov w0, s0
504 ; CHECK-GI-LABEL: test_vaddv_u16:
505 ; CHECK-GI: // %bb.0: // %entry
506 ; CHECK-GI-NEXT: addv h0, v0.4h
507 ; CHECK-GI-NEXT: smov w0, v0.h[0]
510 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v4i16(<4 x i16> %a)
511 %0 = trunc i32 %vaddv.i to i16
515 define i8 @test_vaddvq_s8(<16 x i8> %a) {
516 ; CHECK-SD-LABEL: test_vaddvq_s8:
517 ; CHECK-SD: // %bb.0: // %entry
518 ; CHECK-SD-NEXT: addv b0, v0.16b
519 ; CHECK-SD-NEXT: fmov w0, s0
522 ; CHECK-GI-LABEL: test_vaddvq_s8:
523 ; CHECK-GI: // %bb.0: // %entry
524 ; CHECK-GI-NEXT: addv b0, v0.16b
525 ; CHECK-GI-NEXT: smov w0, v0.b[0]
528 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v16i8(<16 x i8> %a)
529 %0 = trunc i32 %vaddv.i to i8
533 define i16 @test_vaddvq_s16(<8 x i16> %a) {
534 ; CHECK-SD-LABEL: test_vaddvq_s16:
535 ; CHECK-SD: // %bb.0: // %entry
536 ; CHECK-SD-NEXT: addv h0, v0.8h
537 ; CHECK-SD-NEXT: fmov w0, s0
540 ; CHECK-GI-LABEL: test_vaddvq_s16:
541 ; CHECK-GI: // %bb.0: // %entry
542 ; CHECK-GI-NEXT: addv h0, v0.8h
543 ; CHECK-GI-NEXT: smov w0, v0.h[0]
546 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v8i16(<8 x i16> %a)
547 %0 = trunc i32 %vaddv.i to i16
551 define i32 @test_vaddvq_s32(<4 x i32> %a) {
552 ; CHECK-LABEL: test_vaddvq_s32:
553 ; CHECK: // %bb.0: // %entry
554 ; CHECK-NEXT: addv s0, v0.4s
555 ; CHECK-NEXT: fmov w0, s0
558 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v4i32(<4 x i32> %a)
562 define i8 @test_vaddvq_u8(<16 x i8> %a) {
563 ; CHECK-SD-LABEL: test_vaddvq_u8:
564 ; CHECK-SD: // %bb.0: // %entry
565 ; CHECK-SD-NEXT: addv b0, v0.16b
566 ; CHECK-SD-NEXT: fmov w0, s0
569 ; CHECK-GI-LABEL: test_vaddvq_u8:
570 ; CHECK-GI: // %bb.0: // %entry
571 ; CHECK-GI-NEXT: addv b0, v0.16b
572 ; CHECK-GI-NEXT: smov w0, v0.b[0]
575 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v16i8(<16 x i8> %a)
576 %0 = trunc i32 %vaddv.i to i8
580 define i16 @test_vaddvq_u16(<8 x i16> %a) {
581 ; CHECK-SD-LABEL: test_vaddvq_u16:
582 ; CHECK-SD: // %bb.0: // %entry
583 ; CHECK-SD-NEXT: addv h0, v0.8h
584 ; CHECK-SD-NEXT: fmov w0, s0
587 ; CHECK-GI-LABEL: test_vaddvq_u16:
588 ; CHECK-GI: // %bb.0: // %entry
589 ; CHECK-GI-NEXT: addv h0, v0.8h
590 ; CHECK-GI-NEXT: smov w0, v0.h[0]
593 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v8i16(<8 x i16> %a)
594 %0 = trunc i32 %vaddv.i to i16
598 define i32 @test_vaddvq_u32(<4 x i32> %a) {
599 ; CHECK-LABEL: test_vaddvq_u32:
600 ; CHECK: // %bb.0: // %entry
601 ; CHECK-NEXT: addv s0, v0.4s
602 ; CHECK-NEXT: fmov w0, s0
605 %vaddv.i = tail call i32 @llvm.aarch64.neon.saddv.i32.v4i32(<4 x i32> %a)
609 define float @test_vmaxvq_f32(<4 x float> %a) {
610 ; CHECK-LABEL: test_vmaxvq_f32:
611 ; CHECK: // %bb.0: // %entry
612 ; CHECK-NEXT: fmaxv s0, v0.4s
615 %0 = call float @llvm.aarch64.neon.fmaxv.f32.v4f32(<4 x float> %a)
619 define float @test_vminvq_f32(<4 x float> %a) {
620 ; CHECK-LABEL: test_vminvq_f32:
621 ; CHECK: // %bb.0: // %entry
622 ; CHECK-NEXT: fminv s0, v0.4s
625 %0 = call float @llvm.aarch64.neon.fminv.f32.v4f32(<4 x float> %a)
629 define float @test_vmaxnmvq_f32(<4 x float> %a) {
630 ; CHECK-LABEL: test_vmaxnmvq_f32:
631 ; CHECK: // %bb.0: // %entry
632 ; CHECK-NEXT: fmaxnmv s0, v0.4s
635 %0 = call float @llvm.aarch64.neon.fmaxnmv.f32.v4f32(<4 x float> %a)
639 define float @test_vminnmvq_f32(<4 x float> %a) {
640 ; CHECK-LABEL: test_vminnmvq_f32:
641 ; CHECK: // %bb.0: // %entry
642 ; CHECK-NEXT: fminnmv s0, v0.4s
645 %0 = call float @llvm.aarch64.neon.fminnmv.f32.v4f32(<4 x float> %a)