1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
4 define i64 @saddv_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
5 ; CHECK-LABEL: saddv_i8:
7 ; CHECK-NEXT: saddv d0, p0, z0.b
8 ; CHECK-NEXT: fmov x0, d0
10 %out = call i64 @llvm.aarch64.sve.saddv.nxv16i8(<vscale x 16 x i1> %pg,
11 <vscale x 16 x i8> %a)
15 define i64 @saddv_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
16 ; CHECK-LABEL: saddv_i16:
18 ; CHECK-NEXT: saddv d0, p0, z0.h
19 ; CHECK-NEXT: fmov x0, d0
21 %out = call i64 @llvm.aarch64.sve.saddv.nxv8i16(<vscale x 8 x i1> %pg,
22 <vscale x 8 x i16> %a)
27 define i64 @saddv_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
28 ; CHECK-LABEL: saddv_i32:
30 ; CHECK-NEXT: saddv d0, p0, z0.s
31 ; CHECK-NEXT: fmov x0, d0
33 %out = call i64 @llvm.aarch64.sve.saddv.nxv4i32(<vscale x 4 x i1> %pg,
34 <vscale x 4 x i32> %a)
38 define i64 @saddv_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
39 ; CHECK-LABEL: saddv_i64:
41 ; CHECK-NEXT: uaddv d0, p0, z0.d
42 ; CHECK-NEXT: fmov x0, d0
44 %out = call i64 @llvm.aarch64.sve.saddv.nxv2i64(<vscale x 2 x i1> %pg,
45 <vscale x 2 x i64> %a)
49 define i64 @uaddv_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
50 ; CHECK-LABEL: uaddv_i8:
52 ; CHECK-NEXT: uaddv d0, p0, z0.b
53 ; CHECK-NEXT: fmov x0, d0
55 %out = call i64 @llvm.aarch64.sve.uaddv.nxv16i8(<vscale x 16 x i1> %pg,
56 <vscale x 16 x i8> %a)
60 define i64 @uaddv_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
61 ; CHECK-LABEL: uaddv_i16:
63 ; CHECK-NEXT: uaddv d0, p0, z0.h
64 ; CHECK-NEXT: fmov x0, d0
66 %out = call i64 @llvm.aarch64.sve.uaddv.nxv8i16(<vscale x 8 x i1> %pg,
67 <vscale x 8 x i16> %a)
72 define i64 @uaddv_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
73 ; CHECK-LABEL: uaddv_i32:
75 ; CHECK-NEXT: uaddv d0, p0, z0.s
76 ; CHECK-NEXT: fmov x0, d0
78 %out = call i64 @llvm.aarch64.sve.uaddv.nxv4i32(<vscale x 4 x i1> %pg,
79 <vscale x 4 x i32> %a)
83 define i64 @uaddv_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
84 ; CHECK-LABEL: uaddv_i64:
86 ; CHECK-NEXT: uaddv d0, p0, z0.d
87 ; CHECK-NEXT: fmov x0, d0
89 %out = call i64 @llvm.aarch64.sve.uaddv.nxv2i64(<vscale x 2 x i1> %pg,
90 <vscale x 2 x i64> %a)
94 define i8 @smaxv_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
95 ; CHECK-LABEL: smaxv_i8:
97 ; CHECK-NEXT: smaxv b0, p0, z0.b
98 ; CHECK-NEXT: fmov w0, s0
100 %out = call i8 @llvm.aarch64.sve.smaxv.nxv16i8(<vscale x 16 x i1> %pg,
101 <vscale x 16 x i8> %a)
105 define i16 @smaxv_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
106 ; CHECK-LABEL: smaxv_i16:
108 ; CHECK-NEXT: smaxv h0, p0, z0.h
109 ; CHECK-NEXT: fmov w0, s0
111 %out = call i16 @llvm.aarch64.sve.smaxv.nxv8i16(<vscale x 8 x i1> %pg,
112 <vscale x 8 x i16> %a)
116 define i32 @smaxv_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
117 ; CHECK-LABEL: smaxv_i32:
119 ; CHECK-NEXT: smaxv s0, p0, z0.s
120 ; CHECK-NEXT: fmov w0, s0
122 %out = call i32 @llvm.aarch64.sve.smaxv.nxv4i32(<vscale x 4 x i1> %pg,
123 <vscale x 4 x i32> %a)
127 define i64 @smaxv_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
128 ; CHECK-LABEL: smaxv_i64:
130 ; CHECK-NEXT: smaxv d0, p0, z0.d
131 ; CHECK-NEXT: fmov x0, d0
133 %out = call i64 @llvm.aarch64.sve.smaxv.nxv2i64(<vscale x 2 x i1> %pg,
134 <vscale x 2 x i64> %a)
138 define i8 @umaxv_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
139 ; CHECK-LABEL: umaxv_i8:
141 ; CHECK-NEXT: umaxv b0, p0, z0.b
142 ; CHECK-NEXT: fmov w0, s0
144 %out = call i8 @llvm.aarch64.sve.umaxv.nxv16i8(<vscale x 16 x i1> %pg,
145 <vscale x 16 x i8> %a)
149 define i16 @umaxv_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
150 ; CHECK-LABEL: umaxv_i16:
152 ; CHECK-NEXT: umaxv h0, p0, z0.h
153 ; CHECK-NEXT: fmov w0, s0
155 %out = call i16 @llvm.aarch64.sve.umaxv.nxv8i16(<vscale x 8 x i1> %pg,
156 <vscale x 8 x i16> %a)
160 define i32 @umaxv_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
161 ; CHECK-LABEL: umaxv_i32:
163 ; CHECK-NEXT: umaxv s0, p0, z0.s
164 ; CHECK-NEXT: fmov w0, s0
166 %out = call i32 @llvm.aarch64.sve.umaxv.nxv4i32(<vscale x 4 x i1> %pg,
167 <vscale x 4 x i32> %a)
171 define i64 @umaxv_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
172 ; CHECK-LABEL: umaxv_i64:
174 ; CHECK-NEXT: umaxv d0, p0, z0.d
175 ; CHECK-NEXT: fmov x0, d0
177 %out = call i64 @llvm.aarch64.sve.umaxv.nxv2i64(<vscale x 2 x i1> %pg,
178 <vscale x 2 x i64> %a)
182 define i8 @sminv_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
183 ; CHECK-LABEL: sminv_i8:
185 ; CHECK-NEXT: sminv b0, p0, z0.b
186 ; CHECK-NEXT: fmov w0, s0
188 %out = call i8 @llvm.aarch64.sve.sminv.nxv16i8(<vscale x 16 x i1> %pg,
189 <vscale x 16 x i8> %a)
193 define i16 @sminv_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
194 ; CHECK-LABEL: sminv_i16:
196 ; CHECK-NEXT: sminv h0, p0, z0.h
197 ; CHECK-NEXT: fmov w0, s0
199 %out = call i16 @llvm.aarch64.sve.sminv.nxv8i16(<vscale x 8 x i1> %pg,
200 <vscale x 8 x i16> %a)
204 define i32 @sminv_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
205 ; CHECK-LABEL: sminv_i32:
207 ; CHECK-NEXT: sminv s0, p0, z0.s
208 ; CHECK-NEXT: fmov w0, s0
210 %out = call i32 @llvm.aarch64.sve.sminv.nxv4i32(<vscale x 4 x i1> %pg,
211 <vscale x 4 x i32> %a)
215 define i64 @sminv_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
216 ; CHECK-LABEL: sminv_i64:
218 ; CHECK-NEXT: sminv d0, p0, z0.d
219 ; CHECK-NEXT: fmov x0, d0
221 %out = call i64 @llvm.aarch64.sve.sminv.nxv2i64(<vscale x 2 x i1> %pg,
222 <vscale x 2 x i64> %a)
226 define i8 @uminv_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
227 ; CHECK-LABEL: uminv_i8:
229 ; CHECK-NEXT: uminv b0, p0, z0.b
230 ; CHECK-NEXT: fmov w0, s0
232 %out = call i8 @llvm.aarch64.sve.uminv.nxv16i8(<vscale x 16 x i1> %pg,
233 <vscale x 16 x i8> %a)
237 define i16 @uminv_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
238 ; CHECK-LABEL: uminv_i16:
240 ; CHECK-NEXT: uminv h0, p0, z0.h
241 ; CHECK-NEXT: fmov w0, s0
243 %out = call i16 @llvm.aarch64.sve.uminv.nxv8i16(<vscale x 8 x i1> %pg,
244 <vscale x 8 x i16> %a)
248 define i32 @uminv_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
249 ; CHECK-LABEL: uminv_i32:
251 ; CHECK-NEXT: uminv s0, p0, z0.s
252 ; CHECK-NEXT: fmov w0, s0
254 %out = call i32 @llvm.aarch64.sve.uminv.nxv4i32(<vscale x 4 x i1> %pg,
255 <vscale x 4 x i32> %a)
259 define i64 @uminv_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
260 ; CHECK-LABEL: uminv_i64:
262 ; CHECK-NEXT: uminv d0, p0, z0.d
263 ; CHECK-NEXT: fmov x0, d0
265 %out = call i64 @llvm.aarch64.sve.uminv.nxv2i64(<vscale x 2 x i1> %pg,
266 <vscale x 2 x i64> %a)
270 define i8 @orv_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
271 ; CHECK-LABEL: orv_i8:
273 ; CHECK-NEXT: orv b0, p0, z0.b
274 ; CHECK-NEXT: fmov w0, s0
276 %out = call i8 @llvm.aarch64.sve.orv.nxv16i8(<vscale x 16 x i1> %pg,
277 <vscale x 16 x i8> %a)
281 define i16 @orv_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
282 ; CHECK-LABEL: orv_i16:
284 ; CHECK-NEXT: orv h0, p0, z0.h
285 ; CHECK-NEXT: fmov w0, s0
287 %out = call i16 @llvm.aarch64.sve.orv.nxv8i16(<vscale x 8 x i1> %pg,
288 <vscale x 8 x i16> %a)
292 define i32 @orv_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
293 ; CHECK-LABEL: orv_i32:
295 ; CHECK-NEXT: orv s0, p0, z0.s
296 ; CHECK-NEXT: fmov w0, s0
298 %out = call i32 @llvm.aarch64.sve.orv.nxv4i32(<vscale x 4 x i1> %pg,
299 <vscale x 4 x i32> %a)
303 define i64 @orv_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
304 ; CHECK-LABEL: orv_i64:
306 ; CHECK-NEXT: orv d0, p0, z0.d
307 ; CHECK-NEXT: fmov x0, d0
309 %out = call i64 @llvm.aarch64.sve.orv.nxv2i64(<vscale x 2 x i1> %pg,
310 <vscale x 2 x i64> %a)
314 define i8 @eorv_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
315 ; CHECK-LABEL: eorv_i8:
317 ; CHECK-NEXT: eorv b0, p0, z0.b
318 ; CHECK-NEXT: fmov w0, s0
320 %out = call i8 @llvm.aarch64.sve.eorv.nxv16i8(<vscale x 16 x i1> %pg,
321 <vscale x 16 x i8> %a)
325 define i16 @eorv_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
326 ; CHECK-LABEL: eorv_i16:
328 ; CHECK-NEXT: eorv h0, p0, z0.h
329 ; CHECK-NEXT: fmov w0, s0
331 %out = call i16 @llvm.aarch64.sve.eorv.nxv8i16(<vscale x 8 x i1> %pg,
332 <vscale x 8 x i16> %a)
336 define i32 @eorv_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
337 ; CHECK-LABEL: eorv_i32:
339 ; CHECK-NEXT: eorv s0, p0, z0.s
340 ; CHECK-NEXT: fmov w0, s0
342 %out = call i32 @llvm.aarch64.sve.eorv.nxv4i32(<vscale x 4 x i1> %pg,
343 <vscale x 4 x i32> %a)
347 define i64 @eorv_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
348 ; CHECK-LABEL: eorv_i64:
350 ; CHECK-NEXT: eorv d0, p0, z0.d
351 ; CHECK-NEXT: fmov x0, d0
353 %out = call i64 @llvm.aarch64.sve.eorv.nxv2i64(<vscale x 2 x i1> %pg,
354 <vscale x 2 x i64> %a)
358 define i8 @andv_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
359 ; CHECK-LABEL: andv_i8:
361 ; CHECK-NEXT: andv b0, p0, z0.b
362 ; CHECK-NEXT: fmov w0, s0
364 %out = call i8 @llvm.aarch64.sve.andv.nxv16i8(<vscale x 16 x i1> %pg,
365 <vscale x 16 x i8> %a)
369 define i16 @andv_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
370 ; CHECK-LABEL: andv_i16:
372 ; CHECK-NEXT: andv h0, p0, z0.h
373 ; CHECK-NEXT: fmov w0, s0
375 %out = call i16 @llvm.aarch64.sve.andv.nxv8i16(<vscale x 8 x i1> %pg,
376 <vscale x 8 x i16> %a)
380 define i32 @andv_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
381 ; CHECK-LABEL: andv_i32:
383 ; CHECK-NEXT: andv s0, p0, z0.s
384 ; CHECK-NEXT: fmov w0, s0
386 %out = call i32 @llvm.aarch64.sve.andv.nxv4i32(<vscale x 4 x i1> %pg,
387 <vscale x 4 x i32> %a)
391 define i64 @andv_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
392 ; CHECK-LABEL: andv_i64:
394 ; CHECK-NEXT: andv d0, p0, z0.d
395 ; CHECK-NEXT: fmov x0, d0
397 %out = call i64 @llvm.aarch64.sve.andv.nxv2i64(<vscale x 2 x i1> %pg,
398 <vscale x 2 x i64> %a)
402 declare i64 @llvm.aarch64.sve.saddv.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>)
403 declare i64 @llvm.aarch64.sve.saddv.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>)
404 declare i64 @llvm.aarch64.sve.saddv.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>)
405 declare i64 @llvm.aarch64.sve.saddv.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>)
406 declare i64 @llvm.aarch64.sve.uaddv.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>)
407 declare i64 @llvm.aarch64.sve.uaddv.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>)
408 declare i64 @llvm.aarch64.sve.uaddv.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>)
409 declare i64 @llvm.aarch64.sve.uaddv.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>)
410 declare i8 @llvm.aarch64.sve.smaxv.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>)
411 declare i16 @llvm.aarch64.sve.smaxv.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>)
412 declare i32 @llvm.aarch64.sve.smaxv.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>)
413 declare i64 @llvm.aarch64.sve.smaxv.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>)
414 declare i8 @llvm.aarch64.sve.umaxv.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>)
415 declare i16 @llvm.aarch64.sve.umaxv.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>)
416 declare i32 @llvm.aarch64.sve.umaxv.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>)
417 declare i64 @llvm.aarch64.sve.umaxv.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>)
418 declare i8 @llvm.aarch64.sve.sminv.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>)
419 declare i16 @llvm.aarch64.sve.sminv.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>)
420 declare i32 @llvm.aarch64.sve.sminv.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>)
421 declare i64 @llvm.aarch64.sve.sminv.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>)
422 declare i8 @llvm.aarch64.sve.uminv.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>)
423 declare i16 @llvm.aarch64.sve.uminv.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>)
424 declare i32 @llvm.aarch64.sve.uminv.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>)
425 declare i64 @llvm.aarch64.sve.uminv.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>)
426 declare i8 @llvm.aarch64.sve.orv.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>)
427 declare i16 @llvm.aarch64.sve.orv.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>)
428 declare i32 @llvm.aarch64.sve.orv.nxv4i32 (<vscale x 4 x i1>, <vscale x 4 x i32>)
429 declare i64 @llvm.aarch64.sve.orv.nxv2i64 (<vscale x 2 x i1>, <vscale x 2 x i64>)
430 declare i8 @llvm.aarch64.sve.eorv.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>)
431 declare i16 @llvm.aarch64.sve.eorv.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>)
432 declare i32 @llvm.aarch64.sve.eorv.nxv4i32 (<vscale x 4 x i1>, <vscale x 4 x i32>)
433 declare i64 @llvm.aarch64.sve.eorv.nxv2i64 (<vscale x 2 x i1>, <vscale x 2 x i64>)
434 declare i8 @llvm.aarch64.sve.andv.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>)
435 declare i16 @llvm.aarch64.sve.andv.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>)
436 declare i32 @llvm.aarch64.sve.andv.nxv4i32 (<vscale x 4 x i1>, <vscale x 4 x i32>)
437 declare i64 @llvm.aarch64.sve.andv.nxv2i64 (<vscale x 2 x i1>, <vscale x 2 x i64>)