1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve < %s | FileCheck %s -check-prefixes=CHECK,SVE1
3 ; RUN: llc -mattr=+sve2 < %s | FileCheck %s -check-prefixes=CHECK,SVE2
5 target triple = "aarch64-unknown-linux-gnu"
11 define <vscale x 16 x i8> @add_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
12 ; CHECK-LABEL: add_i8:
14 ; CHECK-NEXT: add z0.b, z0.b, z1.b
16 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.add.u.nxv16i8(<vscale x 16 x i1> %pg,
17 <vscale x 16 x i8> %a,
18 <vscale x 16 x i8> %b)
19 ret <vscale x 16 x i8> %out
22 define <vscale x 8 x i16> @add_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
23 ; CHECK-LABEL: add_i16:
25 ; CHECK-NEXT: add z0.h, z0.h, z1.h
27 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.add.u.nxv8i16(<vscale x 8 x i1> %pg,
28 <vscale x 8 x i16> %a,
29 <vscale x 8 x i16> %b)
30 ret <vscale x 8 x i16> %out
33 define <vscale x 4 x i32> @add_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
34 ; CHECK-LABEL: add_i32:
36 ; CHECK-NEXT: add z0.s, z0.s, z1.s
38 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.add.u.nxv4i32(<vscale x 4 x i1> %pg,
39 <vscale x 4 x i32> %a,
40 <vscale x 4 x i32> %b)
41 ret <vscale x 4 x i32> %out
44 define <vscale x 2 x i64> @add_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
45 ; CHECK-LABEL: add_i64:
47 ; CHECK-NEXT: add z0.d, z0.d, z1.d
49 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.add.u.nxv2i64(<vscale x 2 x i1> %pg,
50 <vscale x 2 x i64> %a,
51 <vscale x 2 x i64> %b)
52 ret <vscale x 2 x i64> %out
59 define <vscale x 16 x i8> @add_imm_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
60 ; CHECK-LABEL: add_imm_i8:
62 ; CHECK-NEXT: add z0.b, z0.b, #3 // =0x3
64 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.add.u.nxv16i8(<vscale x 16 x i1> %pg,
65 <vscale x 16 x i8> %a,
66 <vscale x 16 x i8> splat(i8 3))
67 ret <vscale x 16 x i8> %out
70 define <vscale x 8 x i16> @add_imm_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
71 ; CHECK-LABEL: add_imm_i16:
73 ; CHECK-NEXT: add z0.h, z0.h, #4 // =0x4
75 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.add.u.nxv8i16(<vscale x 8 x i1> %pg,
76 <vscale x 8 x i16> %a,
77 <vscale x 8 x i16> splat(i16 4))
78 ret <vscale x 8 x i16> %out
81 define <vscale x 4 x i32> @add_imm_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
82 ; CHECK-LABEL: add_imm_i32:
84 ; CHECK-NEXT: add z0.s, z0.s, #5 // =0x5
86 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.add.u.nxv4i32(<vscale x 4 x i1> %pg,
87 <vscale x 4 x i32> %a,
88 <vscale x 4 x i32> splat(i32 5))
89 ret <vscale x 4 x i32> %out
92 define <vscale x 2 x i64> @add_imm_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
93 ; CHECK-LABEL: add_imm_i64:
95 ; CHECK-NEXT: add z0.d, z0.d, #6 // =0x6
97 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.add.u.nxv2i64(<vscale x 2 x i1> %pg,
98 <vscale x 2 x i64> %a,
99 <vscale x 2 x i64> splat(i64 6))
100 ret <vscale x 2 x i64> %out
107 define <vscale x 16 x i8> @mla_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b, <vscale x 16 x i8> %c) {
108 ; CHECK-LABEL: mla_i8:
110 ; CHECK-NEXT: mla z0.b, p0/m, z1.b, z2.b
112 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.mla.u.nxv16i8(<vscale x 16 x i1> %pg,
113 <vscale x 16 x i8> %a,
114 <vscale x 16 x i8> %b,
115 <vscale x 16 x i8> %c)
116 ret <vscale x 16 x i8> %out
119 define <vscale x 8 x i16> @mla_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b, <vscale x 8 x i16> %c) {
120 ; CHECK-LABEL: mla_i16:
122 ; CHECK-NEXT: mla z0.h, p0/m, z1.h, z2.h
124 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.mla.u.nxv8i16(<vscale x 8 x i1> %pg,
125 <vscale x 8 x i16> %a,
126 <vscale x 8 x i16> %b,
127 <vscale x 8 x i16> %c)
128 ret <vscale x 8 x i16> %out
131 define <vscale x 4 x i32> @mla_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, <vscale x 4 x i32> %c) {
132 ; CHECK-LABEL: mla_i32:
134 ; CHECK-NEXT: mla z0.s, p0/m, z1.s, z2.s
136 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.mla.u.nxv4i32(<vscale x 4 x i1> %pg,
137 <vscale x 4 x i32> %a,
138 <vscale x 4 x i32> %b,
139 <vscale x 4 x i32> %c)
140 ret <vscale x 4 x i32> %out
143 define <vscale x 2 x i64> @mla_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b, <vscale x 2 x i64> %c) {
144 ; CHECK-LABEL: mla_i64:
146 ; CHECK-NEXT: mla z0.d, p0/m, z1.d, z2.d
148 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.mla.u.nxv2i64(<vscale x 2 x i1> %pg,
149 <vscale x 2 x i64> %a,
150 <vscale x 2 x i64> %b,
151 <vscale x 2 x i64> %c)
152 ret <vscale x 2 x i64> %out
159 define <vscale x 16 x i8> @mls_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b, <vscale x 16 x i8> %c) {
160 ; CHECK-LABEL: mls_i8:
162 ; CHECK-NEXT: mls z0.b, p0/m, z1.b, z2.b
164 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.mls.u.nxv16i8(<vscale x 16 x i1> %pg,
165 <vscale x 16 x i8> %a,
166 <vscale x 16 x i8> %b,
167 <vscale x 16 x i8> %c)
168 ret <vscale x 16 x i8> %out
171 define <vscale x 8 x i16> @mls_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b, <vscale x 8 x i16> %c) {
172 ; CHECK-LABEL: mls_i16:
174 ; CHECK-NEXT: mls z0.h, p0/m, z1.h, z2.h
176 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.mls.u.nxv8i16(<vscale x 8 x i1> %pg,
177 <vscale x 8 x i16> %a,
178 <vscale x 8 x i16> %b,
179 <vscale x 8 x i16> %c)
180 ret <vscale x 8 x i16> %out
183 define <vscale x 4 x i32> @mls_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, <vscale x 4 x i32> %c) {
184 ; CHECK-LABEL: mls_i32:
186 ; CHECK-NEXT: mls z0.s, p0/m, z1.s, z2.s
188 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.mls.u.nxv4i32(<vscale x 4 x i1> %pg,
189 <vscale x 4 x i32> %a,
190 <vscale x 4 x i32> %b,
191 <vscale x 4 x i32> %c)
192 ret <vscale x 4 x i32> %out
195 define <vscale x 2 x i64> @mls_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b, <vscale x 2 x i64> %c) {
196 ; CHECK-LABEL: mls_i64:
198 ; CHECK-NEXT: mls z0.d, p0/m, z1.d, z2.d
200 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.mls.u.nxv2i64(<vscale x 2 x i1> %pg,
201 <vscale x 2 x i64> %a,
202 <vscale x 2 x i64> %b,
203 <vscale x 2 x i64> %c)
204 ret <vscale x 2 x i64> %out
211 define <vscale x 16 x i8> @mul_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
212 ; SVE1-LABEL: mul_i8:
214 ; SVE1-NEXT: mul z0.b, p0/m, z0.b, z1.b
217 ; SVE2-LABEL: mul_i8:
219 ; SVE2-NEXT: mul z0.b, z0.b, z1.b
221 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.mul.u.nxv16i8(<vscale x 16 x i1> %pg,
222 <vscale x 16 x i8> %a,
223 <vscale x 16 x i8> %b)
224 ret <vscale x 16 x i8> %out
227 define <vscale x 8 x i16> @mul_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
228 ; SVE1-LABEL: mul_i16:
230 ; SVE1-NEXT: mul z0.h, p0/m, z0.h, z1.h
233 ; SVE2-LABEL: mul_i16:
235 ; SVE2-NEXT: mul z0.h, z0.h, z1.h
237 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.mul.u.nxv8i16(<vscale x 8 x i1> %pg,
238 <vscale x 8 x i16> %a,
239 <vscale x 8 x i16> %b)
240 ret <vscale x 8 x i16> %out
243 define <vscale x 4 x i32> @mul_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
244 ; SVE1-LABEL: mul_i32:
246 ; SVE1-NEXT: mul z0.s, p0/m, z0.s, z1.s
249 ; SVE2-LABEL: mul_i32:
251 ; SVE2-NEXT: mul z0.s, z0.s, z1.s
253 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.mul.u.nxv4i32(<vscale x 4 x i1> %pg,
254 <vscale x 4 x i32> %a,
255 <vscale x 4 x i32> %b)
256 ret <vscale x 4 x i32> %out
259 define <vscale x 2 x i64> @mul_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
260 ; SVE1-LABEL: mul_i64:
262 ; SVE1-NEXT: mul z0.d, p0/m, z0.d, z1.d
265 ; SVE2-LABEL: mul_i64:
267 ; SVE2-NEXT: mul z0.d, z0.d, z1.d
269 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.mul.u.nxv2i64(<vscale x 2 x i1> %pg,
270 <vscale x 2 x i64> %a,
271 <vscale x 2 x i64> %b)
272 ret <vscale x 2 x i64> %out
279 define <vscale x 16 x i8> @mul_imm_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
280 ; CHECK-LABEL: mul_imm_i8:
282 ; CHECK-NEXT: mul z0.b, z0.b, #3
284 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.mul.u.nxv16i8(<vscale x 16 x i1> %pg,
285 <vscale x 16 x i8> %a,
286 <vscale x 16 x i8> splat(i8 3))
287 ret <vscale x 16 x i8> %out
290 define <vscale x 8 x i16> @mul_imm_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
291 ; CHECK-LABEL: mul_imm_i16:
293 ; CHECK-NEXT: mul z0.h, z0.h, #4
295 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.mul.u.nxv8i16(<vscale x 8 x i1> %pg,
296 <vscale x 8 x i16> %a,
297 <vscale x 8 x i16> splat(i16 4))
298 ret <vscale x 8 x i16> %out
301 define <vscale x 4 x i32> @mul_imm_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
302 ; CHECK-LABEL: mul_imm_i32:
304 ; CHECK-NEXT: mul z0.s, z0.s, #5
306 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.mul.u.nxv4i32(<vscale x 4 x i1> %pg,
307 <vscale x 4 x i32> %a,
308 <vscale x 4 x i32> splat(i32 5))
309 ret <vscale x 4 x i32> %out
312 define <vscale x 2 x i64> @mul_imm_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
313 ; CHECK-LABEL: mul_imm_i64:
315 ; CHECK-NEXT: mul z0.d, z0.d, #6
317 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.mul.u.nxv2i64(<vscale x 2 x i1> %pg,
318 <vscale x 2 x i64> %a,
319 <vscale x 2 x i64> splat(i64 6))
320 ret <vscale x 2 x i64> %out
327 define <vscale x 16 x i8> @sabd_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
328 ; CHECK-LABEL: sabd_i8:
330 ; CHECK-NEXT: ptrue p0.b
331 ; CHECK-NEXT: sabd z0.b, p0/m, z0.b, z1.b
333 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sabd.u.nxv16i8(<vscale x 16 x i1> %pg,
334 <vscale x 16 x i8> %a,
335 <vscale x 16 x i8> %b)
336 ret <vscale x 16 x i8> %out
339 define <vscale x 8 x i16> @sabd_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
340 ; CHECK-LABEL: sabd_i16:
342 ; CHECK-NEXT: ptrue p0.h
343 ; CHECK-NEXT: sabd z0.h, p0/m, z0.h, z1.h
345 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sabd.u.nxv8i16(<vscale x 8 x i1> %pg,
346 <vscale x 8 x i16> %a,
347 <vscale x 8 x i16> %b)
348 ret <vscale x 8 x i16> %out
351 define <vscale x 4 x i32> @sabd_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
352 ; CHECK-LABEL: sabd_i32:
354 ; CHECK-NEXT: ptrue p0.s
355 ; CHECK-NEXT: sabd z0.s, p0/m, z0.s, z1.s
357 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sabd.u.nxv4i32(<vscale x 4 x i1> %pg,
358 <vscale x 4 x i32> %a,
359 <vscale x 4 x i32> %b)
360 ret <vscale x 4 x i32> %out
363 define <vscale x 2 x i64> @sabd_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
364 ; CHECK-LABEL: sabd_i64:
366 ; CHECK-NEXT: ptrue p0.d
367 ; CHECK-NEXT: sabd z0.d, p0/m, z0.d, z1.d
369 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sabd.u.nxv2i64(<vscale x 2 x i1> %pg,
370 <vscale x 2 x i64> %a,
371 <vscale x 2 x i64> %b)
372 ret <vscale x 2 x i64> %out
379 define <vscale x 4 x i32> @sdiv_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
380 ; CHECK-LABEL: sdiv_i32:
382 ; CHECK-NEXT: sdiv z0.s, p0/m, z0.s, z1.s
384 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sdiv.u.nxv4i32(<vscale x 4 x i1> %pg,
385 <vscale x 4 x i32> %a,
386 <vscale x 4 x i32> %b)
387 ret <vscale x 4 x i32> %out
390 define <vscale x 2 x i64> @sdiv_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
391 ; CHECK-LABEL: sdiv_i64:
393 ; CHECK-NEXT: sdiv z0.d, p0/m, z0.d, z1.d
395 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sdiv.u.nxv2i64(<vscale x 2 x i1> %pg,
396 <vscale x 2 x i64> %a,
397 <vscale x 2 x i64> %b)
398 ret <vscale x 2 x i64> %out
405 define <vscale x 4 x i32> @sdivr_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
406 ; CHECK-LABEL: sdivr_i32:
408 ; CHECK-NEXT: sdivr z0.s, p0/m, z0.s, z1.s
410 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sdiv.u.nxv4i32(<vscale x 4 x i1> %pg,
411 <vscale x 4 x i32> %b,
412 <vscale x 4 x i32> %a)
413 ret <vscale x 4 x i32> %out
416 define <vscale x 2 x i64> @sdivr_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
417 ; CHECK-LABEL: sdivr_i64:
419 ; CHECK-NEXT: sdivr z0.d, p0/m, z0.d, z1.d
421 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sdiv.u.nxv2i64(<vscale x 2 x i1> %pg,
422 <vscale x 2 x i64> %b,
423 <vscale x 2 x i64> %a)
424 ret <vscale x 2 x i64> %out
431 define <vscale x 16 x i8> @smax_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
432 ; CHECK-LABEL: smax_i8:
434 ; CHECK-NEXT: smax z0.b, p0/m, z0.b, z1.b
436 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.smax.u.nxv16i8(<vscale x 16 x i1> %pg,
437 <vscale x 16 x i8> %a,
438 <vscale x 16 x i8> %b)
439 ret <vscale x 16 x i8> %out
442 define <vscale x 8 x i16> @smax_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
443 ; CHECK-LABEL: smax_i16:
445 ; CHECK-NEXT: smax z0.h, p0/m, z0.h, z1.h
447 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.smax.u.nxv8i16(<vscale x 8 x i1> %pg,
448 <vscale x 8 x i16> %a,
449 <vscale x 8 x i16> %b)
450 ret <vscale x 8 x i16> %out
453 define <vscale x 4 x i32> @smax_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
454 ; CHECK-LABEL: smax_i32:
456 ; CHECK-NEXT: smax z0.s, p0/m, z0.s, z1.s
458 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.smax.u.nxv4i32(<vscale x 4 x i1> %pg,
459 <vscale x 4 x i32> %a,
460 <vscale x 4 x i32> %b)
461 ret <vscale x 4 x i32> %out
464 define <vscale x 2 x i64> @smax_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
465 ; CHECK-LABEL: smax_i64:
467 ; CHECK-NEXT: smax z0.d, p0/m, z0.d, z1.d
469 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.smax.u.nxv2i64(<vscale x 2 x i1> %pg,
470 <vscale x 2 x i64> %a,
471 <vscale x 2 x i64> %b)
472 ret <vscale x 2 x i64> %out
479 define <vscale x 16 x i8> @smax_imm_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
480 ; CHECK-LABEL: smax_imm_i8:
482 ; CHECK-NEXT: smax z0.b, z0.b, #3
484 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.smax.u.nxv16i8(<vscale x 16 x i1> %pg,
485 <vscale x 16 x i8> %a,
486 <vscale x 16 x i8> splat(i8 3))
487 ret <vscale x 16 x i8> %out
490 define <vscale x 8 x i16> @smax_imm_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
491 ; CHECK-LABEL: smax_imm_i16:
493 ; CHECK-NEXT: smax z0.h, z0.h, #4
495 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.smax.u.nxv8i16(<vscale x 8 x i1> %pg,
496 <vscale x 8 x i16> %a,
497 <vscale x 8 x i16> splat(i16 4))
498 ret <vscale x 8 x i16> %out
501 define <vscale x 4 x i32> @smax_imm_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
502 ; CHECK-LABEL: smax_imm_i32:
504 ; CHECK-NEXT: smax z0.s, z0.s, #5
506 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.smax.u.nxv4i32(<vscale x 4 x i1> %pg,
507 <vscale x 4 x i32> %a,
508 <vscale x 4 x i32> splat(i32 5))
509 ret <vscale x 4 x i32> %out
512 define <vscale x 2 x i64> @smax_imm_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
513 ; CHECK-LABEL: smax_imm_i64:
515 ; CHECK-NEXT: smax z0.d, z0.d, #6
517 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.smax.u.nxv2i64(<vscale x 2 x i1> %pg,
518 <vscale x 2 x i64> %a,
519 <vscale x 2 x i64> splat(i64 6))
520 ret <vscale x 2 x i64> %out
527 define <vscale x 16 x i8> @smin_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
528 ; CHECK-LABEL: smin_i8:
530 ; CHECK-NEXT: smin z0.b, p0/m, z0.b, z1.b
532 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.smin.u.nxv16i8(<vscale x 16 x i1> %pg,
533 <vscale x 16 x i8> %a,
534 <vscale x 16 x i8> %b)
535 ret <vscale x 16 x i8> %out
538 define <vscale x 8 x i16> @smin_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
539 ; CHECK-LABEL: smin_i16:
541 ; CHECK-NEXT: smin z0.h, p0/m, z0.h, z1.h
543 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.smin.u.nxv8i16(<vscale x 8 x i1> %pg,
544 <vscale x 8 x i16> %a,
545 <vscale x 8 x i16> %b)
546 ret <vscale x 8 x i16> %out
549 define <vscale x 4 x i32> @smin_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
550 ; CHECK-LABEL: smin_i32:
552 ; CHECK-NEXT: smin z0.s, p0/m, z0.s, z1.s
554 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.smin.u.nxv4i32(<vscale x 4 x i1> %pg,
555 <vscale x 4 x i32> %a,
556 <vscale x 4 x i32> %b)
557 ret <vscale x 4 x i32> %out
560 define <vscale x 2 x i64> @smin_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
561 ; CHECK-LABEL: smin_i64:
563 ; CHECK-NEXT: smin z0.d, p0/m, z0.d, z1.d
565 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.smin.u.nxv2i64(<vscale x 2 x i1> %pg,
566 <vscale x 2 x i64> %a,
567 <vscale x 2 x i64> %b)
568 ret <vscale x 2 x i64> %out
575 define <vscale x 16 x i8> @smin_imm_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
576 ; CHECK-LABEL: smin_imm_i8:
578 ; CHECK-NEXT: smin z0.b, z0.b, #3
580 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.smin.u.nxv16i8(<vscale x 16 x i1> %pg,
581 <vscale x 16 x i8> %a,
582 <vscale x 16 x i8> splat(i8 3))
583 ret <vscale x 16 x i8> %out
586 define <vscale x 8 x i16> @smin_imm_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
587 ; CHECK-LABEL: smin_imm_i16:
589 ; CHECK-NEXT: smin z0.h, z0.h, #4
591 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.smin.u.nxv8i16(<vscale x 8 x i1> %pg,
592 <vscale x 8 x i16> %a,
593 <vscale x 8 x i16> splat(i16 4))
594 ret <vscale x 8 x i16> %out
597 define <vscale x 4 x i32> @smin_imm_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
598 ; CHECK-LABEL: smin_imm_i32:
600 ; CHECK-NEXT: smin z0.s, z0.s, #5
602 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.smin.u.nxv4i32(<vscale x 4 x i1> %pg,
603 <vscale x 4 x i32> %a,
604 <vscale x 4 x i32> splat(i32 5))
605 ret <vscale x 4 x i32> %out
608 define <vscale x 2 x i64> @smin_imm_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
609 ; CHECK-LABEL: smin_imm_i64:
611 ; CHECK-NEXT: smin z0.d, z0.d, #6
613 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.smin.u.nxv2i64(<vscale x 2 x i1> %pg,
614 <vscale x 2 x i64> %a,
615 <vscale x 2 x i64> splat(i64 6))
616 ret <vscale x 2 x i64> %out
623 define <vscale x 16 x i8> @smulh_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
624 ; SVE1-LABEL: smulh_i8:
626 ; SVE1-NEXT: smulh z0.b, p0/m, z0.b, z1.b
629 ; SVE2-LABEL: smulh_i8:
631 ; SVE2-NEXT: smulh z0.b, z0.b, z1.b
633 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.smulh.u.nxv16i8(<vscale x 16 x i1> %pg,
634 <vscale x 16 x i8> %a,
635 <vscale x 16 x i8> %b)
636 ret <vscale x 16 x i8> %out
639 define <vscale x 8 x i16> @smulh_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
640 ; SVE1-LABEL: smulh_i16:
642 ; SVE1-NEXT: smulh z0.h, p0/m, z0.h, z1.h
645 ; SVE2-LABEL: smulh_i16:
647 ; SVE2-NEXT: smulh z0.h, z0.h, z1.h
649 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.smulh.u.nxv8i16(<vscale x 8 x i1> %pg,
650 <vscale x 8 x i16> %a,
651 <vscale x 8 x i16> %b)
652 ret <vscale x 8 x i16> %out
655 define <vscale x 4 x i32> @smulh_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
656 ; SVE1-LABEL: smulh_i32:
658 ; SVE1-NEXT: smulh z0.s, p0/m, z0.s, z1.s
661 ; SVE2-LABEL: smulh_i32:
663 ; SVE2-NEXT: smulh z0.s, z0.s, z1.s
665 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.smulh.u.nxv4i32(<vscale x 4 x i1> %pg,
666 <vscale x 4 x i32> %a,
667 <vscale x 4 x i32> %b)
668 ret <vscale x 4 x i32> %out
671 define <vscale x 2 x i64> @smulh_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
672 ; SVE1-LABEL: smulh_i64:
674 ; SVE1-NEXT: smulh z0.d, p0/m, z0.d, z1.d
677 ; SVE2-LABEL: smulh_i64:
679 ; SVE2-NEXT: smulh z0.d, z0.d, z1.d
681 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.smulh.u.nxv2i64(<vscale x 2 x i1> %pg,
682 <vscale x 2 x i64> %a,
683 <vscale x 2 x i64> %b)
684 ret <vscale x 2 x i64> %out
691 define <vscale x 16 x i8> @sub_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
692 ; CHECK-LABEL: sub_i8:
694 ; CHECK-NEXT: sub z0.b, z0.b, z1.b
696 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sub.u.nxv16i8(<vscale x 16 x i1> %pg,
697 <vscale x 16 x i8> %a,
698 <vscale x 16 x i8> %b)
699 ret <vscale x 16 x i8> %out
702 define <vscale x 8 x i16> @sub_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
703 ; CHECK-LABEL: sub_i16:
705 ; CHECK-NEXT: sub z0.h, z0.h, z1.h
707 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sub.u.nxv8i16(<vscale x 8 x i1> %pg,
708 <vscale x 8 x i16> %a,
709 <vscale x 8 x i16> %b)
710 ret <vscale x 8 x i16> %out
713 define <vscale x 4 x i32> @sub_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
714 ; CHECK-LABEL: sub_i32:
716 ; CHECK-NEXT: sub z0.s, z0.s, z1.s
718 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sub.u.nxv4i32(<vscale x 4 x i1> %pg,
719 <vscale x 4 x i32> %a,
720 <vscale x 4 x i32> %b)
721 ret <vscale x 4 x i32> %out
724 define <vscale x 2 x i64> @sub_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
725 ; CHECK-LABEL: sub_i64:
727 ; CHECK-NEXT: sub z0.d, z0.d, z1.d
729 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sub.u.nxv2i64(<vscale x 2 x i1> %pg,
730 <vscale x 2 x i64> %a,
731 <vscale x 2 x i64> %b)
732 ret <vscale x 2 x i64> %out
739 define <vscale x 16 x i8> @sub_imm_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
740 ; CHECK-LABEL: sub_imm_i8:
742 ; CHECK-NEXT: sub z0.b, z0.b, #3 // =0x3
744 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sub.u.nxv16i8(<vscale x 16 x i1> %pg,
745 <vscale x 16 x i8> %a,
746 <vscale x 16 x i8> splat(i8 3))
747 ret <vscale x 16 x i8> %out
750 define <vscale x 8 x i16> @sub_imm_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
751 ; CHECK-LABEL: sub_imm_i16:
753 ; CHECK-NEXT: sub z0.h, z0.h, #4 // =0x4
755 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sub.u.nxv8i16(<vscale x 8 x i1> %pg,
756 <vscale x 8 x i16> %a,
757 <vscale x 8 x i16> splat(i16 4))
758 ret <vscale x 8 x i16> %out
761 define <vscale x 4 x i32> @sub_imm_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
762 ; CHECK-LABEL: sub_imm_i32:
764 ; CHECK-NEXT: sub z0.s, z0.s, #5 // =0x5
766 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sub.u.nxv4i32(<vscale x 4 x i1> %pg,
767 <vscale x 4 x i32> %a,
768 <vscale x 4 x i32> splat(i32 5))
769 ret <vscale x 4 x i32> %out
772 define <vscale x 2 x i64> @sub_imm_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
773 ; CHECK-LABEL: sub_imm_i64:
775 ; CHECK-NEXT: sub z0.d, z0.d, #6 // =0x6
777 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sub.u.nxv2i64(<vscale x 2 x i1> %pg,
778 <vscale x 2 x i64> %a,
779 <vscale x 2 x i64> splat(i64 6))
780 ret <vscale x 2 x i64> %out
787 define <vscale x 16 x i8> @subr_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
788 ; CHECK-LABEL: subr_i8:
790 ; CHECK-NEXT: sub z0.b, z1.b, z0.b
792 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sub.u.nxv16i8(<vscale x 16 x i1> %pg,
793 <vscale x 16 x i8> %b,
794 <vscale x 16 x i8> %a)
795 ret <vscale x 16 x i8> %out
798 define <vscale x 8 x i16> @subr_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
799 ; CHECK-LABEL: subr_i16:
801 ; CHECK-NEXT: sub z0.h, z1.h, z0.h
803 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sub.u.nxv8i16(<vscale x 8 x i1> %pg,
804 <vscale x 8 x i16> %b,
805 <vscale x 8 x i16> %a)
806 ret <vscale x 8 x i16> %out
809 define <vscale x 4 x i32> @subr_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
810 ; CHECK-LABEL: subr_i32:
812 ; CHECK-NEXT: sub z0.s, z1.s, z0.s
814 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sub.u.nxv4i32(<vscale x 4 x i1> %pg,
815 <vscale x 4 x i32> %b,
816 <vscale x 4 x i32> %a)
817 ret <vscale x 4 x i32> %out
820 define <vscale x 2 x i64> @subr_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
821 ; CHECK-LABEL: subr_i64:
823 ; CHECK-NEXT: sub z0.d, z1.d, z0.d
825 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sub.u.nxv2i64(<vscale x 2 x i1> %pg,
826 <vscale x 2 x i64> %b,
827 <vscale x 2 x i64> %a)
828 ret <vscale x 2 x i64> %out
835 define <vscale x 16 x i8> @subr_imm_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
836 ; CHECK-LABEL: subr_imm_i8:
838 ; CHECK-NEXT: subr z0.b, z0.b, #3 // =0x3
840 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.sub.u.nxv16i8(<vscale x 16 x i1> %pg,
841 <vscale x 16 x i8> splat(i8 3),
842 <vscale x 16 x i8> %a)
843 ret <vscale x 16 x i8> %out
846 define <vscale x 8 x i16> @subr_imm_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
847 ; CHECK-LABEL: subr_imm_i16:
849 ; CHECK-NEXT: subr z0.h, z0.h, #4 // =0x4
851 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.sub.u.nxv8i16(<vscale x 8 x i1> %pg,
852 <vscale x 8 x i16> splat(i16 4),
853 <vscale x 8 x i16> %a)
854 ret <vscale x 8 x i16> %out
857 define <vscale x 4 x i32> @subr_imm_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
858 ; CHECK-LABEL: subr_imm_i32:
860 ; CHECK-NEXT: subr z0.s, z0.s, #5 // =0x5
862 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.sub.u.nxv4i32(<vscale x 4 x i1> %pg,
863 <vscale x 4 x i32> splat(i32 5),
864 <vscale x 4 x i32> %a)
865 ret <vscale x 4 x i32> %out
868 define <vscale x 2 x i64> @subr_imm_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
869 ; CHECK-LABEL: subr_imm_i64:
871 ; CHECK-NEXT: subr z0.d, z0.d, #6 // =0x6
873 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.sub.u.nxv2i64(<vscale x 2 x i1> %pg,
874 <vscale x 2 x i64> splat(i64 6),
875 <vscale x 2 x i64> %a)
876 ret <vscale x 2 x i64> %out
883 define <vscale x 16 x i8> @uabd_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
884 ; CHECK-LABEL: uabd_i8:
886 ; CHECK-NEXT: ptrue p0.b
887 ; CHECK-NEXT: uabd z0.b, p0/m, z0.b, z1.b
889 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.uabd.u.nxv16i8(<vscale x 16 x i1> %pg,
890 <vscale x 16 x i8> %a,
891 <vscale x 16 x i8> %b)
892 ret <vscale x 16 x i8> %out
895 define <vscale x 8 x i16> @uabd_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
896 ; CHECK-LABEL: uabd_i16:
898 ; CHECK-NEXT: ptrue p0.h
899 ; CHECK-NEXT: uabd z0.h, p0/m, z0.h, z1.h
901 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.uabd.u.nxv8i16(<vscale x 8 x i1> %pg,
902 <vscale x 8 x i16> %a,
903 <vscale x 8 x i16> %b)
904 ret <vscale x 8 x i16> %out
907 define <vscale x 4 x i32> @uabd_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
908 ; CHECK-LABEL: uabd_i32:
910 ; CHECK-NEXT: ptrue p0.s
911 ; CHECK-NEXT: uabd z0.s, p0/m, z0.s, z1.s
913 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.uabd.u.nxv4i32(<vscale x 4 x i1> %pg,
914 <vscale x 4 x i32> %a,
915 <vscale x 4 x i32> %b)
916 ret <vscale x 4 x i32> %out
919 define <vscale x 2 x i64> @uabd_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
920 ; CHECK-LABEL: uabd_i64:
922 ; CHECK-NEXT: ptrue p0.d
923 ; CHECK-NEXT: uabd z0.d, p0/m, z0.d, z1.d
925 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.uabd.u.nxv2i64(<vscale x 2 x i1> %pg,
926 <vscale x 2 x i64> %a,
927 <vscale x 2 x i64> %b)
928 ret <vscale x 2 x i64> %out
935 define <vscale x 4 x i32> @udiv_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
936 ; CHECK-LABEL: udiv_i32:
938 ; CHECK-NEXT: udiv z0.s, p0/m, z0.s, z1.s
940 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.udiv.u.nxv4i32(<vscale x 4 x i1> %pg,
941 <vscale x 4 x i32> %a,
942 <vscale x 4 x i32> %b)
943 ret <vscale x 4 x i32> %out
946 define <vscale x 2 x i64> @udiv_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
947 ; CHECK-LABEL: udiv_i64:
949 ; CHECK-NEXT: udiv z0.d, p0/m, z0.d, z1.d
951 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.udiv.u.nxv2i64(<vscale x 2 x i1> %pg,
952 <vscale x 2 x i64> %a,
953 <vscale x 2 x i64> %b)
954 ret <vscale x 2 x i64> %out
961 define <vscale x 4 x i32> @udivr_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
962 ; CHECK-LABEL: udivr_i32:
964 ; CHECK-NEXT: udivr z0.s, p0/m, z0.s, z1.s
966 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.udiv.u.nxv4i32(<vscale x 4 x i1> %pg,
967 <vscale x 4 x i32> %b,
968 <vscale x 4 x i32> %a)
969 ret <vscale x 4 x i32> %out
972 define <vscale x 2 x i64> @udivr_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
973 ; CHECK-LABEL: udivr_i64:
975 ; CHECK-NEXT: udivr z0.d, p0/m, z0.d, z1.d
977 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.udiv.u.nxv2i64(<vscale x 2 x i1> %pg,
978 <vscale x 2 x i64> %b,
979 <vscale x 2 x i64> %a)
980 ret <vscale x 2 x i64> %out
987 define <vscale x 16 x i8> @umax_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
988 ; CHECK-LABEL: umax_i8:
990 ; CHECK-NEXT: umax z0.b, p0/m, z0.b, z1.b
992 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.umax.u.nxv16i8(<vscale x 16 x i1> %pg,
993 <vscale x 16 x i8> %a,
994 <vscale x 16 x i8> %b)
995 ret <vscale x 16 x i8> %out
998 define <vscale x 8 x i16> @umax_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
999 ; CHECK-LABEL: umax_i16:
1001 ; CHECK-NEXT: umax z0.h, p0/m, z0.h, z1.h
1003 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.umax.u.nxv8i16(<vscale x 8 x i1> %pg,
1004 <vscale x 8 x i16> %a,
1005 <vscale x 8 x i16> %b)
1006 ret <vscale x 8 x i16> %out
1009 define <vscale x 4 x i32> @umax_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
1010 ; CHECK-LABEL: umax_i32:
1012 ; CHECK-NEXT: umax z0.s, p0/m, z0.s, z1.s
1014 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.umax.u.nxv4i32(<vscale x 4 x i1> %pg,
1015 <vscale x 4 x i32> %a,
1016 <vscale x 4 x i32> %b)
1017 ret <vscale x 4 x i32> %out
1020 define <vscale x 2 x i64> @umax_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
1021 ; CHECK-LABEL: umax_i64:
1023 ; CHECK-NEXT: umax z0.d, p0/m, z0.d, z1.d
1025 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.umax.u.nxv2i64(<vscale x 2 x i1> %pg,
1026 <vscale x 2 x i64> %a,
1027 <vscale x 2 x i64> %b)
1028 ret <vscale x 2 x i64> %out
1035 define <vscale x 16 x i8> @umax_imm_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
1036 ; CHECK-LABEL: umax_imm_i8:
1038 ; CHECK-NEXT: umax z0.b, z0.b, #3
1040 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.umax.u.nxv16i8(<vscale x 16 x i1> %pg,
1041 <vscale x 16 x i8> %a,
1042 <vscale x 16 x i8> splat(i8 3))
1043 ret <vscale x 16 x i8> %out
1046 define <vscale x 8 x i16> @umax_imm_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
1047 ; CHECK-LABEL: umax_imm_i16:
1049 ; CHECK-NEXT: umax z0.h, z0.h, #4
1051 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.umax.u.nxv8i16(<vscale x 8 x i1> %pg,
1052 <vscale x 8 x i16> %a,
1053 <vscale x 8 x i16> splat(i16 4))
1054 ret <vscale x 8 x i16> %out
1057 define <vscale x 4 x i32> @umax_imm_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
1058 ; CHECK-LABEL: umax_imm_i32:
1060 ; CHECK-NEXT: umax z0.s, z0.s, #5
1062 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.umax.u.nxv4i32(<vscale x 4 x i1> %pg,
1063 <vscale x 4 x i32> %a,
1064 <vscale x 4 x i32> splat(i32 5))
1065 ret <vscale x 4 x i32> %out
1068 define <vscale x 2 x i64> @umax_imm_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
1069 ; CHECK-LABEL: umax_imm_i64:
1071 ; CHECK-NEXT: umax z0.d, z0.d, #6
1073 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.umax.u.nxv2i64(<vscale x 2 x i1> %pg,
1074 <vscale x 2 x i64> %a,
1075 <vscale x 2 x i64> splat(i64 6))
1076 ret <vscale x 2 x i64> %out
1083 define <vscale x 16 x i8> @umin_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
1084 ; CHECK-LABEL: umin_i8:
1086 ; CHECK-NEXT: umin z0.b, p0/m, z0.b, z1.b
1088 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.umin.u.nxv16i8(<vscale x 16 x i1> %pg,
1089 <vscale x 16 x i8> %a,
1090 <vscale x 16 x i8> %b)
1091 ret <vscale x 16 x i8> %out
1094 define <vscale x 8 x i16> @umin_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
1095 ; CHECK-LABEL: umin_i16:
1097 ; CHECK-NEXT: umin z0.h, p0/m, z0.h, z1.h
1099 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.umin.u.nxv8i16(<vscale x 8 x i1> %pg,
1100 <vscale x 8 x i16> %a,
1101 <vscale x 8 x i16> %b)
1102 ret <vscale x 8 x i16> %out
1105 define <vscale x 4 x i32> @umin_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
1106 ; CHECK-LABEL: umin_i32:
1108 ; CHECK-NEXT: umin z0.s, p0/m, z0.s, z1.s
1110 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.umin.u.nxv4i32(<vscale x 4 x i1> %pg,
1111 <vscale x 4 x i32> %a,
1112 <vscale x 4 x i32> %b)
1113 ret <vscale x 4 x i32> %out
1116 define <vscale x 2 x i64> @umin_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
1117 ; CHECK-LABEL: umin_i64:
1119 ; CHECK-NEXT: umin z0.d, p0/m, z0.d, z1.d
1121 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.umin.u.nxv2i64(<vscale x 2 x i1> %pg,
1122 <vscale x 2 x i64> %a,
1123 <vscale x 2 x i64> %b)
1124 ret <vscale x 2 x i64> %out
1131 define <vscale x 16 x i8> @umin_imm_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
1132 ; CHECK-LABEL: umin_imm_i8:
1134 ; CHECK-NEXT: umin z0.b, z0.b, #3
1136 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.umin.u.nxv16i8(<vscale x 16 x i1> %pg,
1137 <vscale x 16 x i8> %a,
1138 <vscale x 16 x i8> splat(i8 3))
1139 ret <vscale x 16 x i8> %out
1142 define <vscale x 8 x i16> @umin_imm_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
1143 ; CHECK-LABEL: umin_imm_i16:
1145 ; CHECK-NEXT: umin z0.h, z0.h, #4
1147 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.umin.u.nxv8i16(<vscale x 8 x i1> %pg,
1148 <vscale x 8 x i16> %a,
1149 <vscale x 8 x i16> splat(i16 4))
1150 ret <vscale x 8 x i16> %out
1153 define <vscale x 4 x i32> @umin_imm_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
1154 ; CHECK-LABEL: umin_imm_i32:
1156 ; CHECK-NEXT: umin z0.s, z0.s, #5
1158 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.umin.u.nxv4i32(<vscale x 4 x i1> %pg,
1159 <vscale x 4 x i32> %a,
1160 <vscale x 4 x i32> splat(i32 5))
1161 ret <vscale x 4 x i32> %out
1164 define <vscale x 2 x i64> @umin_imm_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
1165 ; CHECK-LABEL: umin_imm_i64:
1167 ; CHECK-NEXT: umin z0.d, z0.d, #6
1169 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.umin.u.nxv2i64(<vscale x 2 x i1> %pg,
1170 <vscale x 2 x i64> %a,
1171 <vscale x 2 x i64> splat(i64 6))
1172 ret <vscale x 2 x i64> %out
1179 define <vscale x 16 x i8> @umulh_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
1180 ; SVE1-LABEL: umulh_i8:
1182 ; SVE1-NEXT: umulh z0.b, p0/m, z0.b, z1.b
1185 ; SVE2-LABEL: umulh_i8:
1187 ; SVE2-NEXT: umulh z0.b, z0.b, z1.b
1189 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.umulh.u.nxv16i8(<vscale x 16 x i1> %pg,
1190 <vscale x 16 x i8> %a,
1191 <vscale x 16 x i8> %b)
1192 ret <vscale x 16 x i8> %out
1195 define <vscale x 8 x i16> @umulh_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
1196 ; SVE1-LABEL: umulh_i16:
1198 ; SVE1-NEXT: umulh z0.h, p0/m, z0.h, z1.h
1201 ; SVE2-LABEL: umulh_i16:
1203 ; SVE2-NEXT: umulh z0.h, z0.h, z1.h
1205 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.umulh.u.nxv8i16(<vscale x 8 x i1> %pg,
1206 <vscale x 8 x i16> %a,
1207 <vscale x 8 x i16> %b)
1208 ret <vscale x 8 x i16> %out
1211 define <vscale x 4 x i32> @umulh_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
1212 ; SVE1-LABEL: umulh_i32:
1214 ; SVE1-NEXT: umulh z0.s, p0/m, z0.s, z1.s
1217 ; SVE2-LABEL: umulh_i32:
1219 ; SVE2-NEXT: umulh z0.s, z0.s, z1.s
1221 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.umulh.u.nxv4i32(<vscale x 4 x i1> %pg,
1222 <vscale x 4 x i32> %a,
1223 <vscale x 4 x i32> %b)
1224 ret <vscale x 4 x i32> %out
1227 define <vscale x 2 x i64> @umulh_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
1228 ; SVE1-LABEL: umulh_i64:
1230 ; SVE1-NEXT: umulh z0.d, p0/m, z0.d, z1.d
1233 ; SVE2-LABEL: umulh_i64:
1235 ; SVE2-NEXT: umulh z0.d, z0.d, z1.d
1237 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.umulh.u.nxv2i64(<vscale x 2 x i1> %pg,
1238 <vscale x 2 x i64> %a,
1239 <vscale x 2 x i64> %b)
1240 ret <vscale x 2 x i64> %out
1244 declare <vscale x 16 x i8> @llvm.aarch64.sve.add.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1245 declare <vscale x 8 x i16> @llvm.aarch64.sve.add.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1246 declare <vscale x 4 x i32> @llvm.aarch64.sve.add.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1247 declare <vscale x 2 x i64> @llvm.aarch64.sve.add.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1249 declare <vscale x 16 x i8> @llvm.aarch64.sve.mla.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1250 declare <vscale x 8 x i16> @llvm.aarch64.sve.mla.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1251 declare <vscale x 4 x i32> @llvm.aarch64.sve.mla.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1252 declare <vscale x 2 x i64> @llvm.aarch64.sve.mla.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1254 declare <vscale x 16 x i8> @llvm.aarch64.sve.mls.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1255 declare <vscale x 8 x i16> @llvm.aarch64.sve.mls.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1256 declare <vscale x 4 x i32> @llvm.aarch64.sve.mls.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1257 declare <vscale x 2 x i64> @llvm.aarch64.sve.mls.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1259 declare <vscale x 16 x i8> @llvm.aarch64.sve.mul.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1260 declare <vscale x 8 x i16> @llvm.aarch64.sve.mul.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1261 declare <vscale x 4 x i32> @llvm.aarch64.sve.mul.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1262 declare <vscale x 2 x i64> @llvm.aarch64.sve.mul.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1264 declare <vscale x 16 x i8> @llvm.aarch64.sve.sabd.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1265 declare <vscale x 8 x i16> @llvm.aarch64.sve.sabd.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1266 declare <vscale x 4 x i32> @llvm.aarch64.sve.sabd.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1267 declare <vscale x 2 x i64> @llvm.aarch64.sve.sabd.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1269 declare <vscale x 4 x i32> @llvm.aarch64.sve.sdiv.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1270 declare <vscale x 2 x i64> @llvm.aarch64.sve.sdiv.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1272 declare <vscale x 16 x i8> @llvm.aarch64.sve.smax.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1273 declare <vscale x 8 x i16> @llvm.aarch64.sve.smax.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1274 declare <vscale x 4 x i32> @llvm.aarch64.sve.smax.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1275 declare <vscale x 2 x i64> @llvm.aarch64.sve.smax.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1277 declare <vscale x 16 x i8> @llvm.aarch64.sve.smin.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1278 declare <vscale x 8 x i16> @llvm.aarch64.sve.smin.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1279 declare <vscale x 4 x i32> @llvm.aarch64.sve.smin.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1280 declare <vscale x 2 x i64> @llvm.aarch64.sve.smin.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1282 declare <vscale x 16 x i8> @llvm.aarch64.sve.smulh.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1283 declare <vscale x 8 x i16> @llvm.aarch64.sve.smulh.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1284 declare <vscale x 4 x i32> @llvm.aarch64.sve.smulh.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1285 declare <vscale x 2 x i64> @llvm.aarch64.sve.smulh.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1287 declare <vscale x 16 x i8> @llvm.aarch64.sve.sub.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1288 declare <vscale x 8 x i16> @llvm.aarch64.sve.sub.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1289 declare <vscale x 4 x i32> @llvm.aarch64.sve.sub.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1290 declare <vscale x 2 x i64> @llvm.aarch64.sve.sub.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1292 declare <vscale x 16 x i8> @llvm.aarch64.sve.uabd.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1293 declare <vscale x 8 x i16> @llvm.aarch64.sve.uabd.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1294 declare <vscale x 4 x i32> @llvm.aarch64.sve.uabd.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1295 declare <vscale x 2 x i64> @llvm.aarch64.sve.uabd.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1297 declare <vscale x 4 x i32> @llvm.aarch64.sve.udiv.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1298 declare <vscale x 2 x i64> @llvm.aarch64.sve.udiv.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1300 declare <vscale x 16 x i8> @llvm.aarch64.sve.umax.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1301 declare <vscale x 8 x i16> @llvm.aarch64.sve.umax.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1302 declare <vscale x 4 x i32> @llvm.aarch64.sve.umax.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1303 declare <vscale x 2 x i64> @llvm.aarch64.sve.umax.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1305 declare <vscale x 16 x i8> @llvm.aarch64.sve.umin.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1306 declare <vscale x 8 x i16> @llvm.aarch64.sve.umin.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1307 declare <vscale x 4 x i32> @llvm.aarch64.sve.umin.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1308 declare <vscale x 2 x i64> @llvm.aarch64.sve.umin.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
1310 declare <vscale x 16 x i8> @llvm.aarch64.sve.umulh.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
1311 declare <vscale x 8 x i16> @llvm.aarch64.sve.umulh.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
1312 declare <vscale x 4 x i32> @llvm.aarch64.sve.umulh.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
1313 declare <vscale x 2 x i64> @llvm.aarch64.sve.umulh.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)