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 --check-prefix=CHECK
4 define arm_aapcs_vfpcc <4 x i32> @add_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
5 ; CHECK-LABEL: add_v4i32_x:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: vctp.32 r0
9 ; CHECK-NEXT: vaddt.i32 q0, q0, q1
12 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
13 %a = add <4 x i32> %x, %y
14 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
18 define arm_aapcs_vfpcc <8 x i16> @add_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
19 ; CHECK-LABEL: add_v8i16_x:
20 ; CHECK: @ %bb.0: @ %entry
21 ; CHECK-NEXT: vctp.16 r0
23 ; CHECK-NEXT: vaddt.i16 q0, q0, q1
26 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
27 %a = add <8 x i16> %x, %y
28 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
32 define arm_aapcs_vfpcc <16 x i8> @add_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
33 ; CHECK-LABEL: add_v16i8_x:
34 ; CHECK: @ %bb.0: @ %entry
35 ; CHECK-NEXT: vctp.8 r0
37 ; CHECK-NEXT: vaddt.i8 q0, q0, q1
40 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
41 %a = add <16 x i8> %x, %y
42 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
46 define arm_aapcs_vfpcc <4 x i32> @sub_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
47 ; CHECK-LABEL: sub_v4i32_x:
48 ; CHECK: @ %bb.0: @ %entry
49 ; CHECK-NEXT: vctp.32 r0
51 ; CHECK-NEXT: vsubt.i32 q0, q0, q1
54 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
55 %a = sub <4 x i32> %x, %y
56 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
60 define arm_aapcs_vfpcc <8 x i16> @sub_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
61 ; CHECK-LABEL: sub_v8i16_x:
62 ; CHECK: @ %bb.0: @ %entry
63 ; CHECK-NEXT: vctp.16 r0
65 ; CHECK-NEXT: vsubt.i16 q0, q0, q1
68 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
69 %a = sub <8 x i16> %x, %y
70 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
74 define arm_aapcs_vfpcc <16 x i8> @sub_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
75 ; CHECK-LABEL: sub_v16i8_x:
76 ; CHECK: @ %bb.0: @ %entry
77 ; CHECK-NEXT: vctp.8 r0
79 ; CHECK-NEXT: vsubt.i8 q0, q0, q1
82 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
83 %a = sub <16 x i8> %x, %y
84 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
88 define arm_aapcs_vfpcc <4 x i32> @mul_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
89 ; CHECK-LABEL: mul_v4i32_x:
90 ; CHECK: @ %bb.0: @ %entry
91 ; CHECK-NEXT: vctp.32 r0
93 ; CHECK-NEXT: vmult.i32 q0, q0, q1
96 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
97 %a = mul <4 x i32> %x, %y
98 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
102 define arm_aapcs_vfpcc <8 x i16> @mul_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
103 ; CHECK-LABEL: mul_v8i16_x:
104 ; CHECK: @ %bb.0: @ %entry
105 ; CHECK-NEXT: vctp.16 r0
107 ; CHECK-NEXT: vmult.i16 q0, q0, q1
110 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
111 %a = mul <8 x i16> %x, %y
112 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
116 define arm_aapcs_vfpcc <16 x i8> @mul_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
117 ; CHECK-LABEL: mul_v16i8_x:
118 ; CHECK: @ %bb.0: @ %entry
119 ; CHECK-NEXT: vctp.8 r0
121 ; CHECK-NEXT: vmult.i8 q0, q0, q1
124 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
125 %a = mul <16 x i8> %x, %y
126 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
130 define arm_aapcs_vfpcc <4 x i32> @and_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
131 ; CHECK-LABEL: and_v4i32_x:
132 ; CHECK: @ %bb.0: @ %entry
133 ; CHECK-NEXT: vctp.32 r0
135 ; CHECK-NEXT: vandt q0, q0, q1
138 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
139 %a = and <4 x i32> %x, %y
140 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
144 define arm_aapcs_vfpcc <8 x i16> @and_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
145 ; CHECK-LABEL: and_v8i16_x:
146 ; CHECK: @ %bb.0: @ %entry
147 ; CHECK-NEXT: vctp.16 r0
149 ; CHECK-NEXT: vandt q0, q0, q1
152 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
153 %a = and <8 x i16> %x, %y
154 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
158 define arm_aapcs_vfpcc <16 x i8> @and_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
159 ; CHECK-LABEL: and_v16i8_x:
160 ; CHECK: @ %bb.0: @ %entry
161 ; CHECK-NEXT: vctp.8 r0
163 ; CHECK-NEXT: vandt q0, q0, q1
166 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
167 %a = and <16 x i8> %x, %y
168 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
172 define arm_aapcs_vfpcc <4 x i32> @or_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
173 ; CHECK-LABEL: or_v4i32_x:
174 ; CHECK: @ %bb.0: @ %entry
175 ; CHECK-NEXT: vctp.32 r0
177 ; CHECK-NEXT: vorrt q0, q0, q1
180 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
181 %a = or <4 x i32> %x, %y
182 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
186 define arm_aapcs_vfpcc <8 x i16> @or_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
187 ; CHECK-LABEL: or_v8i16_x:
188 ; CHECK: @ %bb.0: @ %entry
189 ; CHECK-NEXT: vctp.16 r0
191 ; CHECK-NEXT: vorrt q0, q0, q1
194 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
195 %a = or <8 x i16> %x, %y
196 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
200 define arm_aapcs_vfpcc <16 x i8> @or_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
201 ; CHECK-LABEL: or_v16i8_x:
202 ; CHECK: @ %bb.0: @ %entry
203 ; CHECK-NEXT: vctp.8 r0
205 ; CHECK-NEXT: vorrt q0, q0, q1
208 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
209 %a = or <16 x i8> %x, %y
210 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
214 define arm_aapcs_vfpcc <4 x i32> @xor_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
215 ; CHECK-LABEL: xor_v4i32_x:
216 ; CHECK: @ %bb.0: @ %entry
217 ; CHECK-NEXT: vctp.32 r0
219 ; CHECK-NEXT: veort q0, q0, q1
222 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
223 %a = xor <4 x i32> %x, %y
224 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
228 define arm_aapcs_vfpcc <8 x i16> @xor_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
229 ; CHECK-LABEL: xor_v8i16_x:
230 ; CHECK: @ %bb.0: @ %entry
231 ; CHECK-NEXT: vctp.16 r0
233 ; CHECK-NEXT: veort q0, q0, q1
236 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
237 %a = xor <8 x i16> %x, %y
238 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
242 define arm_aapcs_vfpcc <16 x i8> @xor_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
243 ; CHECK-LABEL: xor_v16i8_x:
244 ; CHECK: @ %bb.0: @ %entry
245 ; CHECK-NEXT: vctp.8 r0
247 ; CHECK-NEXT: veort q0, q0, q1
250 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
251 %a = xor <16 x i8> %x, %y
252 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
256 define arm_aapcs_vfpcc <4 x i32> @shl_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
257 ; CHECK-LABEL: shl_v4i32_x:
258 ; CHECK: @ %bb.0: @ %entry
259 ; CHECK-NEXT: vctp.32 r0
261 ; CHECK-NEXT: vshlt.u32 q0, q0, q1
264 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
265 %a = shl <4 x i32> %x, %y
266 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
270 define arm_aapcs_vfpcc <8 x i16> @shl_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
271 ; CHECK-LABEL: shl_v8i16_x:
272 ; CHECK: @ %bb.0: @ %entry
273 ; CHECK-NEXT: vctp.16 r0
275 ; CHECK-NEXT: vshlt.u16 q0, q0, q1
278 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
279 %a = shl <8 x i16> %x, %y
280 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
284 define arm_aapcs_vfpcc <16 x i8> @shl_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
285 ; CHECK-LABEL: shl_v16i8_x:
286 ; CHECK: @ %bb.0: @ %entry
287 ; CHECK-NEXT: vctp.8 r0
289 ; CHECK-NEXT: vshlt.u8 q0, q0, q1
292 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
293 %a = shl <16 x i8> %x, %y
294 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
298 define arm_aapcs_vfpcc <4 x i32> @ashr_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
299 ; CHECK-LABEL: ashr_v4i32_x:
300 ; CHECK: @ %bb.0: @ %entry
301 ; CHECK-NEXT: vneg.s32 q1, q1
302 ; CHECK-NEXT: vctp.32 r0
304 ; CHECK-NEXT: vshlt.s32 q0, q0, q1
307 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
308 %a = ashr <4 x i32> %x, %y
309 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
313 define arm_aapcs_vfpcc <8 x i16> @ashr_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
314 ; CHECK-LABEL: ashr_v8i16_x:
315 ; CHECK: @ %bb.0: @ %entry
316 ; CHECK-NEXT: vneg.s16 q1, q1
317 ; CHECK-NEXT: vctp.16 r0
319 ; CHECK-NEXT: vshlt.s16 q0, q0, q1
322 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
323 %a = ashr <8 x i16> %x, %y
324 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
328 define arm_aapcs_vfpcc <16 x i8> @ashr_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
329 ; CHECK-LABEL: ashr_v16i8_x:
330 ; CHECK: @ %bb.0: @ %entry
331 ; CHECK-NEXT: vneg.s8 q1, q1
332 ; CHECK-NEXT: vctp.8 r0
334 ; CHECK-NEXT: vshlt.s8 q0, q0, q1
337 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
338 %a = ashr <16 x i8> %x, %y
339 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
343 define arm_aapcs_vfpcc <4 x i32> @lshr_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
344 ; CHECK-LABEL: lshr_v4i32_x:
345 ; CHECK: @ %bb.0: @ %entry
346 ; CHECK-NEXT: vneg.s32 q1, q1
347 ; CHECK-NEXT: vctp.32 r0
349 ; CHECK-NEXT: vshlt.u32 q0, q0, q1
352 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
353 %a = lshr <4 x i32> %x, %y
354 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
358 define arm_aapcs_vfpcc <8 x i16> @lshr_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
359 ; CHECK-LABEL: lshr_v8i16_x:
360 ; CHECK: @ %bb.0: @ %entry
361 ; CHECK-NEXT: vneg.s16 q1, q1
362 ; CHECK-NEXT: vctp.16 r0
364 ; CHECK-NEXT: vshlt.u16 q0, q0, q1
367 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
368 %a = lshr <8 x i16> %x, %y
369 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
373 define arm_aapcs_vfpcc <16 x i8> @lshr_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
374 ; CHECK-LABEL: lshr_v16i8_x:
375 ; CHECK: @ %bb.0: @ %entry
376 ; CHECK-NEXT: vneg.s8 q1, q1
377 ; CHECK-NEXT: vctp.8 r0
379 ; CHECK-NEXT: vshlt.u8 q0, q0, q1
382 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
383 %a = lshr <16 x i8> %x, %y
384 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
388 define arm_aapcs_vfpcc <4 x i32> @andnot_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
389 ; CHECK-LABEL: andnot_v4i32_x:
390 ; CHECK: @ %bb.0: @ %entry
391 ; CHECK-NEXT: vctp.32 r0
393 ; CHECK-NEXT: vbict q0, q0, q1
396 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
397 %y1 = xor <4 x i32> %y, <i32 -1, i32 -1, i32 -1, i32 -1>
398 %a = and <4 x i32> %x, %y1
399 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
403 define arm_aapcs_vfpcc <8 x i16> @andnot_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
404 ; CHECK-LABEL: andnot_v8i16_x:
405 ; CHECK: @ %bb.0: @ %entry
406 ; CHECK-NEXT: vctp.16 r0
408 ; CHECK-NEXT: vbict q0, q0, q1
411 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
412 %y1 = xor <8 x i16> %y, <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>
413 %a = and <8 x i16> %x, %y1
414 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
418 define arm_aapcs_vfpcc <16 x i8> @andnot_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
419 ; CHECK-LABEL: andnot_v16i8_x:
420 ; CHECK: @ %bb.0: @ %entry
421 ; CHECK-NEXT: vctp.8 r0
423 ; CHECK-NEXT: vbict q0, q0, q1
426 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
427 %y1 = xor <16 x i8> %y, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
428 %a = and <16 x i8> %x, %y1
429 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
433 define arm_aapcs_vfpcc <4 x i32> @ornot_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
434 ; CHECK-LABEL: ornot_v4i32_x:
435 ; CHECK: @ %bb.0: @ %entry
436 ; CHECK-NEXT: vctp.32 r0
438 ; CHECK-NEXT: vornt q0, q0, q1
441 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
442 %y1 = xor <4 x i32> %y, <i32 -1, i32 -1, i32 -1, i32 -1>
443 %a = or <4 x i32> %x, %y1
444 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
448 define arm_aapcs_vfpcc <8 x i16> @ornot_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
449 ; CHECK-LABEL: ornot_v8i16_x:
450 ; CHECK: @ %bb.0: @ %entry
451 ; CHECK-NEXT: vctp.16 r0
453 ; CHECK-NEXT: vornt q0, q0, q1
456 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
457 %y1 = xor <8 x i16> %y, <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>
458 %a = or <8 x i16> %x, %y1
459 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
463 define arm_aapcs_vfpcc <16 x i8> @ornot_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
464 ; CHECK-LABEL: ornot_v16i8_x:
465 ; CHECK: @ %bb.0: @ %entry
466 ; CHECK-NEXT: vctp.8 r0
468 ; CHECK-NEXT: vornt q0, q0, q1
471 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
472 %y1 = xor <16 x i8> %y, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
473 %a = or <16 x i8> %x, %y1
474 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
478 define arm_aapcs_vfpcc <4 x float> @fadd_v4f32_x(<4 x float> %x, <4 x float> %y, i32 %n) {
479 ; CHECK-LABEL: fadd_v4f32_x:
480 ; CHECK: @ %bb.0: @ %entry
481 ; CHECK-NEXT: vctp.32 r0
483 ; CHECK-NEXT: vaddt.f32 q0, q0, q1
486 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
487 %a = fadd <4 x float> %x, %y
488 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %x
492 define arm_aapcs_vfpcc <8 x half> @fadd_v8f16_x(<8 x half> %x, <8 x half> %y, i32 %n) {
493 ; CHECK-LABEL: fadd_v8f16_x:
494 ; CHECK: @ %bb.0: @ %entry
495 ; CHECK-NEXT: vctp.16 r0
497 ; CHECK-NEXT: vaddt.f16 q0, q0, q1
500 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
501 %a = fadd <8 x half> %x, %y
502 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %x
506 define arm_aapcs_vfpcc <4 x float> @fsub_v4f32_x(<4 x float> %x, <4 x float> %y, i32 %n) {
507 ; CHECK-LABEL: fsub_v4f32_x:
508 ; CHECK: @ %bb.0: @ %entry
509 ; CHECK-NEXT: vctp.32 r0
511 ; CHECK-NEXT: vsubt.f32 q0, q0, q1
514 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
515 %a = fsub <4 x float> %x, %y
516 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %x
520 define arm_aapcs_vfpcc <8 x half> @fsub_v8f16_x(<8 x half> %x, <8 x half> %y, i32 %n) {
521 ; CHECK-LABEL: fsub_v8f16_x:
522 ; CHECK: @ %bb.0: @ %entry
523 ; CHECK-NEXT: vctp.16 r0
525 ; CHECK-NEXT: vsubt.f16 q0, q0, q1
528 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
529 %a = fsub <8 x half> %x, %y
530 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %x
534 define arm_aapcs_vfpcc <4 x float> @fmul_v4f32_x(<4 x float> %x, <4 x float> %y, i32 %n) {
535 ; CHECK-LABEL: fmul_v4f32_x:
536 ; CHECK: @ %bb.0: @ %entry
537 ; CHECK-NEXT: vctp.32 r0
539 ; CHECK-NEXT: vmult.f32 q0, q0, q1
542 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
543 %a = fmul <4 x float> %x, %y
544 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %x
548 define arm_aapcs_vfpcc <8 x half> @fmul_v8f16_x(<8 x half> %x, <8 x half> %y, i32 %n) {
549 ; CHECK-LABEL: fmul_v8f16_x:
550 ; CHECK: @ %bb.0: @ %entry
551 ; CHECK-NEXT: vctp.16 r0
553 ; CHECK-NEXT: vmult.f16 q0, q0, q1
556 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
557 %a = fmul <8 x half> %x, %y
558 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %x
562 define arm_aapcs_vfpcc <4 x float> @fdiv_v4f32_x(<4 x float> %x, <4 x float> %y, i32 %n) {
563 ; CHECK-LABEL: fdiv_v4f32_x:
564 ; CHECK: @ %bb.0: @ %entry
565 ; CHECK-NEXT: vdiv.f32 s7, s3, s7
566 ; CHECK-NEXT: vctp.32 r0
567 ; CHECK-NEXT: vdiv.f32 s6, s2, s6
568 ; CHECK-NEXT: vdiv.f32 s5, s1, s5
569 ; CHECK-NEXT: vdiv.f32 s4, s0, s4
571 ; CHECK-NEXT: vmovt q0, q1
574 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
575 %a = fdiv <4 x float> %x, %y
576 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %x
580 define arm_aapcs_vfpcc <8 x half> @fdiv_v8f16_x(<8 x half> %x, <8 x half> %y, i32 %n) {
581 ; CHECK-LABEL: fdiv_v8f16_x:
582 ; CHECK: @ %bb.0: @ %entry
583 ; CHECK-NEXT: vmovx.f16 s8, s4
584 ; CHECK-NEXT: vmovx.f16 s10, s0
585 ; CHECK-NEXT: vdiv.f16 s8, s10, s8
586 ; CHECK-NEXT: vdiv.f16 s4, s0, s4
587 ; CHECK-NEXT: vins.f16 s4, s8
588 ; CHECK-NEXT: vmovx.f16 s8, s5
589 ; CHECK-NEXT: vmovx.f16 s10, s1
590 ; CHECK-NEXT: vdiv.f16 s5, s1, s5
591 ; CHECK-NEXT: vdiv.f16 s8, s10, s8
592 ; CHECK-NEXT: vmovx.f16 s10, s2
593 ; CHECK-NEXT: vins.f16 s5, s8
594 ; CHECK-NEXT: vmovx.f16 s8, s6
595 ; CHECK-NEXT: vdiv.f16 s8, s10, s8
596 ; CHECK-NEXT: vdiv.f16 s6, s2, s6
597 ; CHECK-NEXT: vins.f16 s6, s8
598 ; CHECK-NEXT: vmovx.f16 s8, s7
599 ; CHECK-NEXT: vmovx.f16 s10, s3
600 ; CHECK-NEXT: vdiv.f16 s7, s3, s7
601 ; CHECK-NEXT: vdiv.f16 s8, s10, s8
602 ; CHECK-NEXT: vctp.16 r0
603 ; CHECK-NEXT: vins.f16 s7, s8
605 ; CHECK-NEXT: vmovt q0, q1
608 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
609 %a = fdiv <8 x half> %x, %y
610 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %x
614 define arm_aapcs_vfpcc <4 x float> @fmai_v4f32_x(<4 x float> %x, <4 x float> %y, <4 x float> %z, i32 %n) {
615 ; CHECK-LABEL: fmai_v4f32_x:
616 ; CHECK: @ %bb.0: @ %entry
617 ; CHECK-NEXT: vctp.32 r0
619 ; CHECK-NEXT: vfmat.f32 q0, q1, q2
622 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
623 %a = call <4 x float> @llvm.fma.v4f32(<4 x float> %y, <4 x float> %z, <4 x float> %x)
624 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %x
628 define arm_aapcs_vfpcc <8 x half> @fmai_v8f16_x(<8 x half> %x, <8 x half> %y, <8 x half> %z, i32 %n) {
629 ; CHECK-LABEL: fmai_v8f16_x:
630 ; CHECK: @ %bb.0: @ %entry
631 ; CHECK-NEXT: vctp.16 r0
633 ; CHECK-NEXT: vfmat.f16 q0, q1, q2
636 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
637 %a = call <8 x half> @llvm.fma.v8f16(<8 x half> %y, <8 x half> %z, <8 x half> %x)
638 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %x
642 define arm_aapcs_vfpcc <4 x float> @fma_v4f32_x(<4 x float> %x, <4 x float> %y, <4 x float> %z, i32 %n) {
643 ; CHECK-LABEL: fma_v4f32_x:
644 ; CHECK: @ %bb.0: @ %entry
645 ; CHECK-NEXT: vctp.32 r0
647 ; CHECK-NEXT: vfmat.f32 q0, q1, q2
650 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
651 %m = fmul fast <4 x float> %y, %z
652 %a = fadd fast <4 x float> %m, %x
653 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %x
657 define arm_aapcs_vfpcc <8 x half> @fma_v8f16_x(<8 x half> %x, <8 x half> %y, <8 x half> %z, i32 %n) {
658 ; CHECK-LABEL: fma_v8f16_x:
659 ; CHECK: @ %bb.0: @ %entry
660 ; CHECK-NEXT: vctp.16 r0
662 ; CHECK-NEXT: vfmat.f16 q0, q1, q2
665 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
666 %m = fmul fast <8 x half> %y, %z
667 %a = fadd fast <8 x half> %m, %x
668 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %x
672 define arm_aapcs_vfpcc <4 x i32> @icmp_slt_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
673 ; CHECK-LABEL: icmp_slt_v4i32_x:
674 ; CHECK: @ %bb.0: @ %entry
675 ; CHECK-NEXT: vctp.32 r0
677 ; CHECK-NEXT: vmint.s32 q0, q0, q1
680 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
681 %a1 = icmp slt <4 x i32> %x, %y
682 %a = select <4 x i1> %a1, <4 x i32> %x, <4 x i32> %y
683 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
687 define arm_aapcs_vfpcc <8 x i16> @icmp_slt_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
688 ; CHECK-LABEL: icmp_slt_v8i16_x:
689 ; CHECK: @ %bb.0: @ %entry
690 ; CHECK-NEXT: vctp.16 r0
692 ; CHECK-NEXT: vmint.s16 q0, q0, q1
695 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
696 %a1 = icmp slt <8 x i16> %x, %y
697 %a = select <8 x i1> %a1, <8 x i16> %x, <8 x i16> %y
698 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
702 define arm_aapcs_vfpcc <16 x i8> @icmp_slt_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
703 ; CHECK-LABEL: icmp_slt_v16i8_x:
704 ; CHECK: @ %bb.0: @ %entry
705 ; CHECK-NEXT: vctp.8 r0
707 ; CHECK-NEXT: vmint.s8 q0, q0, q1
710 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
711 %a1 = icmp slt <16 x i8> %x, %y
712 %a = select <16 x i1> %a1, <16 x i8> %x, <16 x i8> %y
713 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
717 define arm_aapcs_vfpcc <4 x i32> @icmp_sgt_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
718 ; CHECK-LABEL: icmp_sgt_v4i32_x:
719 ; CHECK: @ %bb.0: @ %entry
720 ; CHECK-NEXT: vctp.32 r0
722 ; CHECK-NEXT: vmaxt.s32 q0, q0, q1
725 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
726 %a1 = icmp sgt <4 x i32> %x, %y
727 %a = select <4 x i1> %a1, <4 x i32> %x, <4 x i32> %y
728 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
732 define arm_aapcs_vfpcc <8 x i16> @icmp_sgt_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
733 ; CHECK-LABEL: icmp_sgt_v8i16_x:
734 ; CHECK: @ %bb.0: @ %entry
735 ; CHECK-NEXT: vctp.16 r0
737 ; CHECK-NEXT: vmaxt.s16 q0, q0, q1
740 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
741 %a1 = icmp sgt <8 x i16> %x, %y
742 %a = select <8 x i1> %a1, <8 x i16> %x, <8 x i16> %y
743 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
747 define arm_aapcs_vfpcc <16 x i8> @icmp_sgt_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
748 ; CHECK-LABEL: icmp_sgt_v16i8_x:
749 ; CHECK: @ %bb.0: @ %entry
750 ; CHECK-NEXT: vctp.8 r0
752 ; CHECK-NEXT: vmaxt.s8 q0, q0, q1
755 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
756 %a1 = icmp sgt <16 x i8> %x, %y
757 %a = select <16 x i1> %a1, <16 x i8> %x, <16 x i8> %y
758 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
762 define arm_aapcs_vfpcc <4 x i32> @icmp_ult_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
763 ; CHECK-LABEL: icmp_ult_v4i32_x:
764 ; CHECK: @ %bb.0: @ %entry
765 ; CHECK-NEXT: vctp.32 r0
767 ; CHECK-NEXT: vmint.u32 q0, q0, q1
770 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
771 %a1 = icmp ult <4 x i32> %x, %y
772 %a = select <4 x i1> %a1, <4 x i32> %x, <4 x i32> %y
773 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
777 define arm_aapcs_vfpcc <8 x i16> @icmp_ult_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
778 ; CHECK-LABEL: icmp_ult_v8i16_x:
779 ; CHECK: @ %bb.0: @ %entry
780 ; CHECK-NEXT: vctp.16 r0
782 ; CHECK-NEXT: vmint.u16 q0, q0, q1
785 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
786 %a1 = icmp ult <8 x i16> %x, %y
787 %a = select <8 x i1> %a1, <8 x i16> %x, <8 x i16> %y
788 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
792 define arm_aapcs_vfpcc <16 x i8> @icmp_ult_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
793 ; CHECK-LABEL: icmp_ult_v16i8_x:
794 ; CHECK: @ %bb.0: @ %entry
795 ; CHECK-NEXT: vctp.8 r0
797 ; CHECK-NEXT: vmint.u8 q0, q0, q1
800 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
801 %a1 = icmp ult <16 x i8> %x, %y
802 %a = select <16 x i1> %a1, <16 x i8> %x, <16 x i8> %y
803 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
807 define arm_aapcs_vfpcc <4 x i32> @icmp_ugt_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
808 ; CHECK-LABEL: icmp_ugt_v4i32_x:
809 ; CHECK: @ %bb.0: @ %entry
810 ; CHECK-NEXT: vctp.32 r0
812 ; CHECK-NEXT: vmaxt.u32 q0, q0, q1
815 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
816 %a1 = icmp ugt <4 x i32> %x, %y
817 %a = select <4 x i1> %a1, <4 x i32> %x, <4 x i32> %y
818 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
822 define arm_aapcs_vfpcc <8 x i16> @icmp_ugt_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
823 ; CHECK-LABEL: icmp_ugt_v8i16_x:
824 ; CHECK: @ %bb.0: @ %entry
825 ; CHECK-NEXT: vctp.16 r0
827 ; CHECK-NEXT: vmaxt.u16 q0, q0, q1
830 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
831 %a1 = icmp ugt <8 x i16> %x, %y
832 %a = select <8 x i1> %a1, <8 x i16> %x, <8 x i16> %y
833 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
837 define arm_aapcs_vfpcc <16 x i8> @icmp_ugt_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
838 ; CHECK-LABEL: icmp_ugt_v16i8_x:
839 ; CHECK: @ %bb.0: @ %entry
840 ; CHECK-NEXT: vctp.8 r0
842 ; CHECK-NEXT: vmaxt.u8 q0, q0, q1
845 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
846 %a1 = icmp ugt <16 x i8> %x, %y
847 %a = select <16 x i1> %a1, <16 x i8> %x, <16 x i8> %y
848 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
852 define arm_aapcs_vfpcc <4 x float> @fcmp_fast_olt_v4f32_x(<4 x float> %x, <4 x float> %y, i32 %n) {
853 ; CHECK-LABEL: fcmp_fast_olt_v4f32_x:
854 ; CHECK: @ %bb.0: @ %entry
855 ; CHECK-NEXT: vctp.32 r0
857 ; CHECK-NEXT: vminnmt.f32 q0, q0, q1
860 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
861 %a1 = fcmp fast olt <4 x float> %x, %y
862 %a = select <4 x i1> %a1, <4 x float> %x, <4 x float> %y
863 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %x
867 define arm_aapcs_vfpcc <8 x half> @fcmp_fast_olt_v8f16_x(<8 x half> %x, <8 x half> %y, i32 %n) {
868 ; CHECK-LABEL: fcmp_fast_olt_v8f16_x:
869 ; CHECK: @ %bb.0: @ %entry
870 ; CHECK-NEXT: vctp.16 r0
872 ; CHECK-NEXT: vminnmt.f16 q0, q0, q1
875 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
876 %a1 = fcmp fast olt <8 x half> %x, %y
877 %a = select <8 x i1> %a1, <8 x half> %x, <8 x half> %y
878 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %x
882 define arm_aapcs_vfpcc <4 x float> @fcmp_fast_ogt_v4f32_x(<4 x float> %x, <4 x float> %y, i32 %n) {
883 ; CHECK-LABEL: fcmp_fast_ogt_v4f32_x:
884 ; CHECK: @ %bb.0: @ %entry
885 ; CHECK-NEXT: vctp.32 r0
887 ; CHECK-NEXT: vmaxnmt.f32 q0, q0, q1
890 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
891 %a1 = fcmp fast ogt <4 x float> %x, %y
892 %a = select <4 x i1> %a1, <4 x float> %x, <4 x float> %y
893 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %x
897 define arm_aapcs_vfpcc <8 x half> @fcmp_fast_ogt_v8f16_x(<8 x half> %x, <8 x half> %y, i32 %n) {
898 ; CHECK-LABEL: fcmp_fast_ogt_v8f16_x:
899 ; CHECK: @ %bb.0: @ %entry
900 ; CHECK-NEXT: vctp.16 r0
902 ; CHECK-NEXT: vmaxnmt.f16 q0, q0, q1
905 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
906 %a1 = fcmp fast ogt <8 x half> %x, %y
907 %a = select <8 x i1> %a1, <8 x half> %x, <8 x half> %y
908 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %x
912 define arm_aapcs_vfpcc <4 x i32> @sadd_sat_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
913 ; CHECK-LABEL: sadd_sat_v4i32_x:
914 ; CHECK: @ %bb.0: @ %entry
915 ; CHECK-NEXT: vctp.32 r0
917 ; CHECK-NEXT: vqaddt.s32 q0, q0, q1
920 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
921 %a = call <4 x i32> @llvm.sadd.sat.v4i32(<4 x i32> %x, <4 x i32> %y)
922 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
926 define arm_aapcs_vfpcc <8 x i16> @sadd_sat_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
927 ; CHECK-LABEL: sadd_sat_v8i16_x:
928 ; CHECK: @ %bb.0: @ %entry
929 ; CHECK-NEXT: vctp.16 r0
931 ; CHECK-NEXT: vqaddt.s16 q0, q0, q1
934 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
935 %a = call <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16> %x, <8 x i16> %y)
936 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
940 define arm_aapcs_vfpcc <16 x i8> @sadd_sat_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
941 ; CHECK-LABEL: sadd_sat_v16i8_x:
942 ; CHECK: @ %bb.0: @ %entry
943 ; CHECK-NEXT: vctp.8 r0
945 ; CHECK-NEXT: vqaddt.s8 q0, q0, q1
948 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
949 %a = call <16 x i8> @llvm.sadd.sat.v16i8(<16 x i8> %x, <16 x i8> %y)
950 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
954 define arm_aapcs_vfpcc <4 x i32> @uadd_sat_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
955 ; CHECK-LABEL: uadd_sat_v4i32_x:
956 ; CHECK: @ %bb.0: @ %entry
957 ; CHECK-NEXT: vctp.32 r0
959 ; CHECK-NEXT: vqaddt.u32 q0, q0, q1
962 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
963 %a = call <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> %x, <4 x i32> %y)
964 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
968 define arm_aapcs_vfpcc <8 x i16> @uadd_sat_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
969 ; CHECK-LABEL: uadd_sat_v8i16_x:
970 ; CHECK: @ %bb.0: @ %entry
971 ; CHECK-NEXT: vctp.16 r0
973 ; CHECK-NEXT: vqaddt.u16 q0, q0, q1
976 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
977 %a = call <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16> %x, <8 x i16> %y)
978 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
982 define arm_aapcs_vfpcc <16 x i8> @uadd_sat_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
983 ; CHECK-LABEL: uadd_sat_v16i8_x:
984 ; CHECK: @ %bb.0: @ %entry
985 ; CHECK-NEXT: vctp.8 r0
987 ; CHECK-NEXT: vqaddt.u8 q0, q0, q1
990 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
991 %a = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> %x, <16 x i8> %y)
992 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
996 define arm_aapcs_vfpcc <4 x i32> @ssub_sat_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
997 ; CHECK-LABEL: ssub_sat_v4i32_x:
998 ; CHECK: @ %bb.0: @ %entry
999 ; CHECK-NEXT: vctp.32 r0
1001 ; CHECK-NEXT: vqsubt.s32 q0, q0, q1
1004 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1005 %a = call <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32> %x, <4 x i32> %y)
1006 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
1010 define arm_aapcs_vfpcc <8 x i16> @ssub_sat_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1011 ; CHECK-LABEL: ssub_sat_v8i16_x:
1012 ; CHECK: @ %bb.0: @ %entry
1013 ; CHECK-NEXT: vctp.16 r0
1015 ; CHECK-NEXT: vqsubt.s16 q0, q0, q1
1018 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1019 %a = call <8 x i16> @llvm.ssub.sat.v8i16(<8 x i16> %x, <8 x i16> %y)
1020 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
1024 define arm_aapcs_vfpcc <16 x i8> @ssub_sat_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
1025 ; CHECK-LABEL: ssub_sat_v16i8_x:
1026 ; CHECK: @ %bb.0: @ %entry
1027 ; CHECK-NEXT: vctp.8 r0
1029 ; CHECK-NEXT: vqsubt.s8 q0, q0, q1
1032 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1033 %a = call <16 x i8> @llvm.ssub.sat.v16i8(<16 x i8> %x, <16 x i8> %y)
1034 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
1038 define arm_aapcs_vfpcc <4 x i32> @usub_sat_v4i32_x(<4 x i32> %x, <4 x i32> %y, i32 %n) {
1039 ; CHECK-LABEL: usub_sat_v4i32_x:
1040 ; CHECK: @ %bb.0: @ %entry
1041 ; CHECK-NEXT: vctp.32 r0
1043 ; CHECK-NEXT: vqsubt.u32 q0, q0, q1
1046 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1047 %a = call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> %x, <4 x i32> %y)
1048 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
1052 define arm_aapcs_vfpcc <8 x i16> @usub_sat_v8i16_x(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1053 ; CHECK-LABEL: usub_sat_v8i16_x:
1054 ; CHECK: @ %bb.0: @ %entry
1055 ; CHECK-NEXT: vctp.16 r0
1057 ; CHECK-NEXT: vqsubt.u16 q0, q0, q1
1060 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1061 %a = call <8 x i16> @llvm.usub.sat.v8i16(<8 x i16> %x, <8 x i16> %y)
1062 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
1066 define arm_aapcs_vfpcc <16 x i8> @usub_sat_v16i8_x(<16 x i8> %x, <16 x i8> %y, i32 %n) {
1067 ; CHECK-LABEL: usub_sat_v16i8_x:
1068 ; CHECK: @ %bb.0: @ %entry
1069 ; CHECK-NEXT: vctp.8 r0
1071 ; CHECK-NEXT: vqsubt.u8 q0, q0, q1
1074 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1075 %a = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> %x, <16 x i8> %y)
1076 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
1080 define arm_aapcs_vfpcc <4 x i32> @addqr_v4i32_x(<4 x i32> %x, i32 %y, i32 %n) {
1081 ; CHECK-LABEL: addqr_v4i32_x:
1082 ; CHECK: @ %bb.0: @ %entry
1083 ; CHECK-NEXT: vctp.32 r1
1085 ; CHECK-NEXT: vaddt.i32 q0, q0, r0
1088 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1089 %i = insertelement <4 x i32> undef, i32 %y, i32 0
1090 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
1091 %a = add <4 x i32> %x, %ys
1092 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
1096 define arm_aapcs_vfpcc <8 x i16> @addqr_v8i16_x(<8 x i16> %x, i16 %y, i32 %n) {
1097 ; CHECK-LABEL: addqr_v8i16_x:
1098 ; CHECK: @ %bb.0: @ %entry
1099 ; CHECK-NEXT: vctp.16 r1
1101 ; CHECK-NEXT: vaddt.i16 q0, q0, r0
1104 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1105 %i = insertelement <8 x i16> undef, i16 %y, i32 0
1106 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
1107 %a = add <8 x i16> %x, %ys
1108 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
1112 define arm_aapcs_vfpcc <16 x i8> @addqr_v16i8_x(<16 x i8> %x, i8 %y, i32 %n) {
1113 ; CHECK-LABEL: addqr_v16i8_x:
1114 ; CHECK: @ %bb.0: @ %entry
1115 ; CHECK-NEXT: vctp.8 r1
1117 ; CHECK-NEXT: vaddt.i8 q0, q0, r0
1120 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1121 %i = insertelement <16 x i8> undef, i8 %y, i32 0
1122 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
1123 %a = add <16 x i8> %x, %ys
1124 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
1128 define arm_aapcs_vfpcc <4 x i32> @subqr_v4i32_x(<4 x i32> %x, i32 %y, i32 %n) {
1129 ; CHECK-LABEL: subqr_v4i32_x:
1130 ; CHECK: @ %bb.0: @ %entry
1131 ; CHECK-NEXT: vctp.32 r1
1133 ; CHECK-NEXT: vsubt.i32 q0, q0, r0
1136 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1137 %i = insertelement <4 x i32> undef, i32 %y, i32 0
1138 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
1139 %a = sub <4 x i32> %x, %ys
1140 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
1144 define arm_aapcs_vfpcc <8 x i16> @subqr_v8i16_x(<8 x i16> %x, i16 %y, i32 %n) {
1145 ; CHECK-LABEL: subqr_v8i16_x:
1146 ; CHECK: @ %bb.0: @ %entry
1147 ; CHECK-NEXT: vctp.16 r1
1149 ; CHECK-NEXT: vsubt.i16 q0, q0, r0
1152 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1153 %i = insertelement <8 x i16> undef, i16 %y, i32 0
1154 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
1155 %a = sub <8 x i16> %x, %ys
1156 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
1160 define arm_aapcs_vfpcc <16 x i8> @subqr_v16i8_x(<16 x i8> %x, i8 %y, i32 %n) {
1161 ; CHECK-LABEL: subqr_v16i8_x:
1162 ; CHECK: @ %bb.0: @ %entry
1163 ; CHECK-NEXT: vctp.8 r1
1165 ; CHECK-NEXT: vsubt.i8 q0, q0, r0
1168 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1169 %i = insertelement <16 x i8> undef, i8 %y, i32 0
1170 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
1171 %a = sub <16 x i8> %x, %ys
1172 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
1176 define arm_aapcs_vfpcc <4 x i32> @mulqr_v4i32_x(<4 x i32> %x, i32 %y, i32 %n) {
1177 ; CHECK-LABEL: mulqr_v4i32_x:
1178 ; CHECK: @ %bb.0: @ %entry
1179 ; CHECK-NEXT: vctp.32 r1
1181 ; CHECK-NEXT: vmult.i32 q0, q0, r0
1184 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1185 %i = insertelement <4 x i32> undef, i32 %y, i32 0
1186 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
1187 %a = mul <4 x i32> %x, %ys
1188 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
1192 define arm_aapcs_vfpcc <8 x i16> @mulqr_v8i16_x(<8 x i16> %x, i16 %y, i32 %n) {
1193 ; CHECK-LABEL: mulqr_v8i16_x:
1194 ; CHECK: @ %bb.0: @ %entry
1195 ; CHECK-NEXT: vctp.16 r1
1197 ; CHECK-NEXT: vmult.i16 q0, q0, r0
1200 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1201 %i = insertelement <8 x i16> undef, i16 %y, i32 0
1202 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
1203 %a = mul <8 x i16> %x, %ys
1204 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
1208 define arm_aapcs_vfpcc <16 x i8> @mulqr_v16i8_x(<16 x i8> %x, i8 %y, i32 %n) {
1209 ; CHECK-LABEL: mulqr_v16i8_x:
1210 ; CHECK: @ %bb.0: @ %entry
1211 ; CHECK-NEXT: vctp.8 r1
1213 ; CHECK-NEXT: vmult.i8 q0, q0, r0
1216 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1217 %i = insertelement <16 x i8> undef, i8 %y, i32 0
1218 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
1219 %a = mul <16 x i8> %x, %ys
1220 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
1224 define arm_aapcs_vfpcc <4 x float> @faddqr_v4f32_x(<4 x float> %x, float %y, i32 %n) {
1225 ; CHECK-LABEL: faddqr_v4f32_x:
1226 ; CHECK: @ %bb.0: @ %entry
1227 ; CHECK-NEXT: vmov r1, s4
1228 ; CHECK-NEXT: vctp.32 r0
1230 ; CHECK-NEXT: vaddt.f32 q0, q0, r1
1233 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1234 %i = insertelement <4 x float> undef, float %y, i32 0
1235 %ys = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
1236 %a = fadd <4 x float> %x, %ys
1237 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %x
1241 define arm_aapcs_vfpcc <8 x half> @faddqr_v8f16_x(<8 x half> %x, half %y, i32 %n) {
1242 ; CHECK-LABEL: faddqr_v8f16_x:
1243 ; CHECK: @ %bb.0: @ %entry
1244 ; CHECK-NEXT: vmov.f16 r1, s4
1245 ; CHECK-NEXT: vctp.16 r0
1247 ; CHECK-NEXT: vaddt.f16 q0, q0, r1
1250 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1251 %i = insertelement <8 x half> undef, half %y, i32 0
1252 %ys = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
1253 %a = fadd <8 x half> %x, %ys
1254 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %x
1258 define arm_aapcs_vfpcc <4 x float> @fsubqr_v4f32_x(<4 x float> %x, float %y, i32 %n) {
1259 ; CHECK-LABEL: fsubqr_v4f32_x:
1260 ; CHECK: @ %bb.0: @ %entry
1261 ; CHECK-NEXT: vmov r1, s4
1262 ; CHECK-NEXT: vctp.32 r0
1264 ; CHECK-NEXT: vsubt.f32 q0, q0, r1
1267 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1268 %i = insertelement <4 x float> undef, float %y, i32 0
1269 %ys = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
1270 %a = fsub <4 x float> %x, %ys
1271 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %x
1275 define arm_aapcs_vfpcc <8 x half> @fsubqr_v8f16_x(<8 x half> %x, half %y, i32 %n) {
1276 ; CHECK-LABEL: fsubqr_v8f16_x:
1277 ; CHECK: @ %bb.0: @ %entry
1278 ; CHECK-NEXT: vmov.f16 r1, s4
1279 ; CHECK-NEXT: vctp.16 r0
1281 ; CHECK-NEXT: vsubt.f16 q0, q0, r1
1284 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1285 %i = insertelement <8 x half> undef, half %y, i32 0
1286 %ys = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
1287 %a = fsub <8 x half> %x, %ys
1288 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %x
1292 define arm_aapcs_vfpcc <4 x float> @fmulqr_v4f32_x(<4 x float> %x, float %y, i32 %n) {
1293 ; CHECK-LABEL: fmulqr_v4f32_x:
1294 ; CHECK: @ %bb.0: @ %entry
1295 ; CHECK-NEXT: vmov r1, s4
1296 ; CHECK-NEXT: vctp.32 r0
1298 ; CHECK-NEXT: vmult.f32 q0, q0, r1
1301 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1302 %i = insertelement <4 x float> undef, float %y, i32 0
1303 %ys = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
1304 %a = fmul <4 x float> %x, %ys
1305 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %x
1309 define arm_aapcs_vfpcc <8 x half> @fmulqr_v8f16_x(<8 x half> %x, half %y, i32 %n) {
1310 ; CHECK-LABEL: fmulqr_v8f16_x:
1311 ; CHECK: @ %bb.0: @ %entry
1312 ; CHECK-NEXT: vmov.f16 r1, s4
1313 ; CHECK-NEXT: vctp.16 r0
1315 ; CHECK-NEXT: vmult.f16 q0, q0, r1
1318 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1319 %i = insertelement <8 x half> undef, half %y, i32 0
1320 %ys = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
1321 %a = fmul <8 x half> %x, %ys
1322 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %x
1326 define arm_aapcs_vfpcc <4 x i32> @sadd_satqr_v4i32_x(<4 x i32> %x, i32 %y, i32 %n) {
1327 ; CHECK-LABEL: sadd_satqr_v4i32_x:
1328 ; CHECK: @ %bb.0: @ %entry
1329 ; CHECK-NEXT: vctp.32 r1
1331 ; CHECK-NEXT: vqaddt.s32 q0, q0, r0
1334 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1335 %i = insertelement <4 x i32> undef, i32 %y, i32 0
1336 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
1337 %a = call <4 x i32> @llvm.sadd.sat.v4i32(<4 x i32> %x, <4 x i32> %ys)
1338 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
1342 define arm_aapcs_vfpcc <8 x i16> @sadd_satqr_v8i16_x(<8 x i16> %x, i16 %y, i32 %n) {
1343 ; CHECK-LABEL: sadd_satqr_v8i16_x:
1344 ; CHECK: @ %bb.0: @ %entry
1345 ; CHECK-NEXT: vctp.16 r1
1347 ; CHECK-NEXT: vqaddt.s16 q0, q0, r0
1350 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1351 %i = insertelement <8 x i16> undef, i16 %y, i32 0
1352 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
1353 %a = call <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16> %x, <8 x i16> %ys)
1354 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
1358 define arm_aapcs_vfpcc <16 x i8> @sadd_satqr_v16i8_x(<16 x i8> %x, i8 %y, i32 %n) {
1359 ; CHECK-LABEL: sadd_satqr_v16i8_x:
1360 ; CHECK: @ %bb.0: @ %entry
1361 ; CHECK-NEXT: vctp.8 r1
1363 ; CHECK-NEXT: vqaddt.s8 q0, q0, r0
1366 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1367 %i = insertelement <16 x i8> undef, i8 %y, i32 0
1368 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
1369 %a = call <16 x i8> @llvm.sadd.sat.v16i8(<16 x i8> %x, <16 x i8> %ys)
1370 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
1374 define arm_aapcs_vfpcc <4 x i32> @uadd_satqr_v4i32_x(<4 x i32> %x, i32 %y, i32 %n) {
1375 ; CHECK-LABEL: uadd_satqr_v4i32_x:
1376 ; CHECK: @ %bb.0: @ %entry
1377 ; CHECK-NEXT: vctp.32 r1
1379 ; CHECK-NEXT: vqaddt.u32 q0, q0, r0
1382 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1383 %i = insertelement <4 x i32> undef, i32 %y, i32 0
1384 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
1385 %a = call <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> %x, <4 x i32> %ys)
1386 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
1390 define arm_aapcs_vfpcc <8 x i16> @uadd_satqr_v8i16_x(<8 x i16> %x, i16 %y, i32 %n) {
1391 ; CHECK-LABEL: uadd_satqr_v8i16_x:
1392 ; CHECK: @ %bb.0: @ %entry
1393 ; CHECK-NEXT: vctp.16 r1
1395 ; CHECK-NEXT: vqaddt.u16 q0, q0, r0
1398 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1399 %i = insertelement <8 x i16> undef, i16 %y, i32 0
1400 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
1401 %a = call <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16> %x, <8 x i16> %ys)
1402 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
1406 define arm_aapcs_vfpcc <16 x i8> @uadd_satqr_v16i8_x(<16 x i8> %x, i8 %y, i32 %n) {
1407 ; CHECK-LABEL: uadd_satqr_v16i8_x:
1408 ; CHECK: @ %bb.0: @ %entry
1409 ; CHECK-NEXT: vctp.8 r1
1411 ; CHECK-NEXT: vqaddt.u8 q0, q0, r0
1414 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1415 %i = insertelement <16 x i8> undef, i8 %y, i32 0
1416 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
1417 %a = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> %x, <16 x i8> %ys)
1418 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
1422 define arm_aapcs_vfpcc <4 x i32> @ssub_satqr_v4i32_x(<4 x i32> %x, i32 %y, i32 %n) {
1423 ; CHECK-LABEL: ssub_satqr_v4i32_x:
1424 ; CHECK: @ %bb.0: @ %entry
1425 ; CHECK-NEXT: vctp.32 r1
1427 ; CHECK-NEXT: vqsubt.s32 q0, q0, r0
1430 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1431 %i = insertelement <4 x i32> undef, i32 %y, i32 0
1432 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
1433 %a = call <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32> %x, <4 x i32> %ys)
1434 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
1438 define arm_aapcs_vfpcc <8 x i16> @ssub_satqr_v8i16_x(<8 x i16> %x, i16 %y, i32 %n) {
1439 ; CHECK-LABEL: ssub_satqr_v8i16_x:
1440 ; CHECK: @ %bb.0: @ %entry
1441 ; CHECK-NEXT: vctp.16 r1
1443 ; CHECK-NEXT: vqsubt.s16 q0, q0, r0
1446 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1447 %i = insertelement <8 x i16> undef, i16 %y, i32 0
1448 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
1449 %a = call <8 x i16> @llvm.ssub.sat.v8i16(<8 x i16> %x, <8 x i16> %ys)
1450 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
1454 define arm_aapcs_vfpcc <16 x i8> @ssub_satqr_v16i8_x(<16 x i8> %x, i8 %y, i32 %n) {
1455 ; CHECK-LABEL: ssub_satqr_v16i8_x:
1456 ; CHECK: @ %bb.0: @ %entry
1457 ; CHECK-NEXT: vctp.8 r1
1459 ; CHECK-NEXT: vqsubt.s8 q0, q0, r0
1462 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1463 %i = insertelement <16 x i8> undef, i8 %y, i32 0
1464 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
1465 %a = call <16 x i8> @llvm.ssub.sat.v16i8(<16 x i8> %x, <16 x i8> %ys)
1466 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
1470 define arm_aapcs_vfpcc <4 x i32> @usub_satqr_v4i32_x(<4 x i32> %x, i32 %y, i32 %n) {
1471 ; CHECK-LABEL: usub_satqr_v4i32_x:
1472 ; CHECK: @ %bb.0: @ %entry
1473 ; CHECK-NEXT: vctp.32 r1
1475 ; CHECK-NEXT: vqsubt.u32 q0, q0, r0
1478 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1479 %i = insertelement <4 x i32> undef, i32 %y, i32 0
1480 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
1481 %a = call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> %x, <4 x i32> %ys)
1482 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %x
1486 define arm_aapcs_vfpcc <8 x i16> @usub_satqr_v8i16_x(<8 x i16> %x, i16 %y, i32 %n) {
1487 ; CHECK-LABEL: usub_satqr_v8i16_x:
1488 ; CHECK: @ %bb.0: @ %entry
1489 ; CHECK-NEXT: vctp.16 r1
1491 ; CHECK-NEXT: vqsubt.u16 q0, q0, r0
1494 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1495 %i = insertelement <8 x i16> undef, i16 %y, i32 0
1496 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
1497 %a = call <8 x i16> @llvm.usub.sat.v8i16(<8 x i16> %x, <8 x i16> %ys)
1498 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %x
1502 define arm_aapcs_vfpcc <16 x i8> @usub_satqr_v16i8_x(<16 x i8> %x, i8 %y, i32 %n) {
1503 ; CHECK-LABEL: usub_satqr_v16i8_x:
1504 ; CHECK: @ %bb.0: @ %entry
1505 ; CHECK-NEXT: vctp.8 r1
1507 ; CHECK-NEXT: vqsubt.u8 q0, q0, r0
1510 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1511 %i = insertelement <16 x i8> undef, i8 %y, i32 0
1512 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
1513 %a = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> %x, <16 x i8> %ys)
1514 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %x
1518 define arm_aapcs_vfpcc <4 x i32> @add_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
1519 ; CHECK-LABEL: add_v4i32_y:
1520 ; CHECK: @ %bb.0: @ %entry
1521 ; CHECK-NEXT: vctp.32 r0
1523 ; CHECK-NEXT: vaddt.i32 q1, q0, q1
1524 ; CHECK-NEXT: vmov q0, q1
1527 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1528 %a = add <4 x i32> %x, %y
1529 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
1533 define arm_aapcs_vfpcc <8 x i16> @add_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1534 ; CHECK-LABEL: add_v8i16_y:
1535 ; CHECK: @ %bb.0: @ %entry
1536 ; CHECK-NEXT: vctp.16 r0
1538 ; CHECK-NEXT: vaddt.i16 q1, q0, q1
1539 ; CHECK-NEXT: vmov q0, q1
1542 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1543 %a = add <8 x i16> %x, %y
1544 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
1548 define arm_aapcs_vfpcc <16 x i8> @add_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
1549 ; CHECK-LABEL: add_v16i8_y:
1550 ; CHECK: @ %bb.0: @ %entry
1551 ; CHECK-NEXT: vctp.8 r0
1553 ; CHECK-NEXT: vaddt.i8 q1, q0, q1
1554 ; CHECK-NEXT: vmov q0, q1
1557 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1558 %a = add <16 x i8> %x, %y
1559 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
1563 define arm_aapcs_vfpcc <4 x i32> @sub_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
1564 ; CHECK-LABEL: sub_v4i32_y:
1565 ; CHECK: @ %bb.0: @ %entry
1566 ; CHECK-NEXT: vctp.32 r0
1568 ; CHECK-NEXT: vsubt.i32 q1, q0, q1
1569 ; CHECK-NEXT: vmov q0, q1
1572 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1573 %a = sub <4 x i32> %x, %y
1574 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
1578 define arm_aapcs_vfpcc <8 x i16> @sub_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1579 ; CHECK-LABEL: sub_v8i16_y:
1580 ; CHECK: @ %bb.0: @ %entry
1581 ; CHECK-NEXT: vctp.16 r0
1583 ; CHECK-NEXT: vsubt.i16 q1, q0, q1
1584 ; CHECK-NEXT: vmov q0, q1
1587 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1588 %a = sub <8 x i16> %x, %y
1589 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
1593 define arm_aapcs_vfpcc <16 x i8> @sub_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
1594 ; CHECK-LABEL: sub_v16i8_y:
1595 ; CHECK: @ %bb.0: @ %entry
1596 ; CHECK-NEXT: vctp.8 r0
1598 ; CHECK-NEXT: vsubt.i8 q1, q0, q1
1599 ; CHECK-NEXT: vmov q0, q1
1602 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1603 %a = sub <16 x i8> %x, %y
1604 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
1608 define arm_aapcs_vfpcc <4 x i32> @mul_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
1609 ; CHECK-LABEL: mul_v4i32_y:
1610 ; CHECK: @ %bb.0: @ %entry
1611 ; CHECK-NEXT: vctp.32 r0
1613 ; CHECK-NEXT: vmult.i32 q1, q0, q1
1614 ; CHECK-NEXT: vmov q0, q1
1617 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1618 %a = mul <4 x i32> %x, %y
1619 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
1623 define arm_aapcs_vfpcc <8 x i16> @mul_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1624 ; CHECK-LABEL: mul_v8i16_y:
1625 ; CHECK: @ %bb.0: @ %entry
1626 ; CHECK-NEXT: vctp.16 r0
1628 ; CHECK-NEXT: vmult.i16 q1, q0, q1
1629 ; CHECK-NEXT: vmov q0, q1
1632 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1633 %a = mul <8 x i16> %x, %y
1634 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
1638 define arm_aapcs_vfpcc <16 x i8> @mul_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
1639 ; CHECK-LABEL: mul_v16i8_y:
1640 ; CHECK: @ %bb.0: @ %entry
1641 ; CHECK-NEXT: vctp.8 r0
1643 ; CHECK-NEXT: vmult.i8 q1, q0, q1
1644 ; CHECK-NEXT: vmov q0, q1
1647 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1648 %a = mul <16 x i8> %x, %y
1649 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
1653 define arm_aapcs_vfpcc <4 x i32> @and_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
1654 ; CHECK-LABEL: and_v4i32_y:
1655 ; CHECK: @ %bb.0: @ %entry
1656 ; CHECK-NEXT: vctp.32 r0
1658 ; CHECK-NEXT: vandt q1, q0, q1
1659 ; CHECK-NEXT: vmov q0, q1
1662 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1663 %a = and <4 x i32> %x, %y
1664 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
1668 define arm_aapcs_vfpcc <8 x i16> @and_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1669 ; CHECK-LABEL: and_v8i16_y:
1670 ; CHECK: @ %bb.0: @ %entry
1671 ; CHECK-NEXT: vctp.16 r0
1673 ; CHECK-NEXT: vandt q1, q0, q1
1674 ; CHECK-NEXT: vmov q0, q1
1677 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1678 %a = and <8 x i16> %x, %y
1679 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
1683 define arm_aapcs_vfpcc <16 x i8> @and_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
1684 ; CHECK-LABEL: and_v16i8_y:
1685 ; CHECK: @ %bb.0: @ %entry
1686 ; CHECK-NEXT: vctp.8 r0
1688 ; CHECK-NEXT: vandt q1, q0, q1
1689 ; CHECK-NEXT: vmov q0, q1
1692 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1693 %a = and <16 x i8> %x, %y
1694 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
1698 define arm_aapcs_vfpcc <4 x i32> @or_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
1699 ; CHECK-LABEL: or_v4i32_y:
1700 ; CHECK: @ %bb.0: @ %entry
1701 ; CHECK-NEXT: vctp.32 r0
1703 ; CHECK-NEXT: vorrt q1, q0, q1
1704 ; CHECK-NEXT: vmov q0, q1
1707 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1708 %a = or <4 x i32> %x, %y
1709 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
1713 define arm_aapcs_vfpcc <8 x i16> @or_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1714 ; CHECK-LABEL: or_v8i16_y:
1715 ; CHECK: @ %bb.0: @ %entry
1716 ; CHECK-NEXT: vctp.16 r0
1718 ; CHECK-NEXT: vorrt q1, q0, q1
1719 ; CHECK-NEXT: vmov q0, q1
1722 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1723 %a = or <8 x i16> %x, %y
1724 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
1728 define arm_aapcs_vfpcc <16 x i8> @or_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
1729 ; CHECK-LABEL: or_v16i8_y:
1730 ; CHECK: @ %bb.0: @ %entry
1731 ; CHECK-NEXT: vctp.8 r0
1733 ; CHECK-NEXT: vorrt q1, q0, q1
1734 ; CHECK-NEXT: vmov q0, q1
1737 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1738 %a = or <16 x i8> %x, %y
1739 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
1743 define arm_aapcs_vfpcc <4 x i32> @xor_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
1744 ; CHECK-LABEL: xor_v4i32_y:
1745 ; CHECK: @ %bb.0: @ %entry
1746 ; CHECK-NEXT: vctp.32 r0
1748 ; CHECK-NEXT: veort q1, q0, q1
1749 ; CHECK-NEXT: vmov q0, q1
1752 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1753 %a = xor <4 x i32> %x, %y
1754 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
1758 define arm_aapcs_vfpcc <8 x i16> @xor_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1759 ; CHECK-LABEL: xor_v8i16_y:
1760 ; CHECK: @ %bb.0: @ %entry
1761 ; CHECK-NEXT: vctp.16 r0
1763 ; CHECK-NEXT: veort q1, q0, q1
1764 ; CHECK-NEXT: vmov q0, q1
1767 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1768 %a = xor <8 x i16> %x, %y
1769 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
1773 define arm_aapcs_vfpcc <16 x i8> @xor_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
1774 ; CHECK-LABEL: xor_v16i8_y:
1775 ; CHECK: @ %bb.0: @ %entry
1776 ; CHECK-NEXT: vctp.8 r0
1778 ; CHECK-NEXT: veort q1, q0, q1
1779 ; CHECK-NEXT: vmov q0, q1
1782 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1783 %a = xor <16 x i8> %x, %y
1784 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
1788 define arm_aapcs_vfpcc <4 x i32> @shl_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
1789 ; CHECK-LABEL: shl_v4i32_y:
1790 ; CHECK: @ %bb.0: @ %entry
1791 ; CHECK-NEXT: vctp.32 r0
1793 ; CHECK-NEXT: vshlt.u32 q1, q0, q1
1794 ; CHECK-NEXT: vmov q0, q1
1797 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1798 %a = shl <4 x i32> %x, %y
1799 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
1803 define arm_aapcs_vfpcc <8 x i16> @shl_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1804 ; CHECK-LABEL: shl_v8i16_y:
1805 ; CHECK: @ %bb.0: @ %entry
1806 ; CHECK-NEXT: vctp.16 r0
1808 ; CHECK-NEXT: vshlt.u16 q1, q0, q1
1809 ; CHECK-NEXT: vmov q0, q1
1812 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1813 %a = shl <8 x i16> %x, %y
1814 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
1818 define arm_aapcs_vfpcc <16 x i8> @shl_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
1819 ; CHECK-LABEL: shl_v16i8_y:
1820 ; CHECK: @ %bb.0: @ %entry
1821 ; CHECK-NEXT: vctp.8 r0
1823 ; CHECK-NEXT: vshlt.u8 q1, q0, q1
1824 ; CHECK-NEXT: vmov q0, q1
1827 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1828 %a = shl <16 x i8> %x, %y
1829 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
1833 define arm_aapcs_vfpcc <4 x i32> @ashr_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
1834 ; CHECK-LABEL: ashr_v4i32_y:
1835 ; CHECK: @ %bb.0: @ %entry
1836 ; CHECK-NEXT: vneg.s32 q2, q1
1837 ; CHECK-NEXT: vctp.32 r0
1839 ; CHECK-NEXT: vshlt.s32 q1, q0, q2
1840 ; CHECK-NEXT: vmov q0, q1
1843 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1844 %a = ashr <4 x i32> %x, %y
1845 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
1849 define arm_aapcs_vfpcc <8 x i16> @ashr_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1850 ; CHECK-LABEL: ashr_v8i16_y:
1851 ; CHECK: @ %bb.0: @ %entry
1852 ; CHECK-NEXT: vneg.s16 q2, q1
1853 ; CHECK-NEXT: vctp.16 r0
1855 ; CHECK-NEXT: vshlt.s16 q1, q0, q2
1856 ; CHECK-NEXT: vmov q0, q1
1859 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1860 %a = ashr <8 x i16> %x, %y
1861 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
1865 define arm_aapcs_vfpcc <16 x i8> @ashr_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
1866 ; CHECK-LABEL: ashr_v16i8_y:
1867 ; CHECK: @ %bb.0: @ %entry
1868 ; CHECK-NEXT: vneg.s8 q2, q1
1869 ; CHECK-NEXT: vctp.8 r0
1871 ; CHECK-NEXT: vshlt.s8 q1, q0, q2
1872 ; CHECK-NEXT: vmov q0, q1
1875 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1876 %a = ashr <16 x i8> %x, %y
1877 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
1881 define arm_aapcs_vfpcc <4 x i32> @lshr_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
1882 ; CHECK-LABEL: lshr_v4i32_y:
1883 ; CHECK: @ %bb.0: @ %entry
1884 ; CHECK-NEXT: vneg.s32 q2, q1
1885 ; CHECK-NEXT: vctp.32 r0
1887 ; CHECK-NEXT: vshlt.u32 q1, q0, q2
1888 ; CHECK-NEXT: vmov q0, q1
1891 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1892 %a = lshr <4 x i32> %x, %y
1893 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
1897 define arm_aapcs_vfpcc <8 x i16> @lshr_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1898 ; CHECK-LABEL: lshr_v8i16_y:
1899 ; CHECK: @ %bb.0: @ %entry
1900 ; CHECK-NEXT: vneg.s16 q2, q1
1901 ; CHECK-NEXT: vctp.16 r0
1903 ; CHECK-NEXT: vshlt.u16 q1, q0, q2
1904 ; CHECK-NEXT: vmov q0, q1
1907 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1908 %a = lshr <8 x i16> %x, %y
1909 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
1913 define arm_aapcs_vfpcc <16 x i8> @lshr_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
1914 ; CHECK-LABEL: lshr_v16i8_y:
1915 ; CHECK: @ %bb.0: @ %entry
1916 ; CHECK-NEXT: vneg.s8 q2, q1
1917 ; CHECK-NEXT: vctp.8 r0
1919 ; CHECK-NEXT: vshlt.u8 q1, q0, q2
1920 ; CHECK-NEXT: vmov q0, q1
1923 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1924 %a = lshr <16 x i8> %x, %y
1925 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
1929 define arm_aapcs_vfpcc <4 x i32> @andnot_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
1930 ; CHECK-LABEL: andnot_v4i32_y:
1931 ; CHECK: @ %bb.0: @ %entry
1932 ; CHECK-NEXT: vctp.32 r0
1934 ; CHECK-NEXT: vbict q1, q0, q1
1935 ; CHECK-NEXT: vmov q0, q1
1938 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1939 %y1 = xor <4 x i32> %y, <i32 -1, i32 -1, i32 -1, i32 -1>
1940 %a = and <4 x i32> %x, %y1
1941 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
1945 define arm_aapcs_vfpcc <8 x i16> @andnot_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1946 ; CHECK-LABEL: andnot_v8i16_y:
1947 ; CHECK: @ %bb.0: @ %entry
1948 ; CHECK-NEXT: vctp.16 r0
1950 ; CHECK-NEXT: vbict q1, q0, q1
1951 ; CHECK-NEXT: vmov q0, q1
1954 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
1955 %y1 = xor <8 x i16> %y, <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>
1956 %a = and <8 x i16> %x, %y1
1957 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
1961 define arm_aapcs_vfpcc <16 x i8> @andnot_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
1962 ; CHECK-LABEL: andnot_v16i8_y:
1963 ; CHECK: @ %bb.0: @ %entry
1964 ; CHECK-NEXT: vctp.8 r0
1966 ; CHECK-NEXT: vbict q1, q0, q1
1967 ; CHECK-NEXT: vmov q0, q1
1970 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
1971 %y1 = xor <16 x i8> %y, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
1972 %a = and <16 x i8> %x, %y1
1973 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
1977 define arm_aapcs_vfpcc <4 x i32> @ornot_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
1978 ; CHECK-LABEL: ornot_v4i32_y:
1979 ; CHECK: @ %bb.0: @ %entry
1980 ; CHECK-NEXT: vctp.32 r0
1982 ; CHECK-NEXT: vornt q1, q0, q1
1983 ; CHECK-NEXT: vmov q0, q1
1986 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
1987 %y1 = xor <4 x i32> %y, <i32 -1, i32 -1, i32 -1, i32 -1>
1988 %a = or <4 x i32> %x, %y1
1989 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
1993 define arm_aapcs_vfpcc <8 x i16> @ornot_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
1994 ; CHECK-LABEL: ornot_v8i16_y:
1995 ; CHECK: @ %bb.0: @ %entry
1996 ; CHECK-NEXT: vctp.16 r0
1998 ; CHECK-NEXT: vornt q1, q0, q1
1999 ; CHECK-NEXT: vmov q0, q1
2002 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2003 %y1 = xor <8 x i16> %y, <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>
2004 %a = or <8 x i16> %x, %y1
2005 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
2009 define arm_aapcs_vfpcc <16 x i8> @ornot_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
2010 ; CHECK-LABEL: ornot_v16i8_y:
2011 ; CHECK: @ %bb.0: @ %entry
2012 ; CHECK-NEXT: vctp.8 r0
2014 ; CHECK-NEXT: vornt q1, q0, q1
2015 ; CHECK-NEXT: vmov q0, q1
2018 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2019 %y1 = xor <16 x i8> %y, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
2020 %a = or <16 x i8> %x, %y1
2021 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
2025 define arm_aapcs_vfpcc <4 x float> @fadd_v4f32_y(<4 x float> %x, <4 x float> %y, i32 %n) {
2026 ; CHECK-LABEL: fadd_v4f32_y:
2027 ; CHECK: @ %bb.0: @ %entry
2028 ; CHECK-NEXT: vctp.32 r0
2030 ; CHECK-NEXT: vaddt.f32 q1, q0, q1
2031 ; CHECK-NEXT: vmov q0, q1
2034 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2035 %a = fadd <4 x float> %x, %y
2036 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %y
2040 define arm_aapcs_vfpcc <8 x half> @fadd_v8f16_y(<8 x half> %x, <8 x half> %y, i32 %n) {
2041 ; CHECK-LABEL: fadd_v8f16_y:
2042 ; CHECK: @ %bb.0: @ %entry
2043 ; CHECK-NEXT: vctp.16 r0
2045 ; CHECK-NEXT: vaddt.f16 q1, q0, q1
2046 ; CHECK-NEXT: vmov q0, q1
2049 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2050 %a = fadd <8 x half> %x, %y
2051 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %y
2055 define arm_aapcs_vfpcc <4 x float> @fsub_v4f32_y(<4 x float> %x, <4 x float> %y, i32 %n) {
2056 ; CHECK-LABEL: fsub_v4f32_y:
2057 ; CHECK: @ %bb.0: @ %entry
2058 ; CHECK-NEXT: vctp.32 r0
2060 ; CHECK-NEXT: vsubt.f32 q1, q0, q1
2061 ; CHECK-NEXT: vmov q0, q1
2064 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2065 %a = fsub <4 x float> %x, %y
2066 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %y
2070 define arm_aapcs_vfpcc <8 x half> @fsub_v8f16_y(<8 x half> %x, <8 x half> %y, i32 %n) {
2071 ; CHECK-LABEL: fsub_v8f16_y:
2072 ; CHECK: @ %bb.0: @ %entry
2073 ; CHECK-NEXT: vctp.16 r0
2075 ; CHECK-NEXT: vsubt.f16 q1, q0, q1
2076 ; CHECK-NEXT: vmov q0, q1
2079 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2080 %a = fsub <8 x half> %x, %y
2081 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %y
2085 define arm_aapcs_vfpcc <4 x float> @fmul_v4f32_y(<4 x float> %x, <4 x float> %y, i32 %n) {
2086 ; CHECK-LABEL: fmul_v4f32_y:
2087 ; CHECK: @ %bb.0: @ %entry
2088 ; CHECK-NEXT: vctp.32 r0
2090 ; CHECK-NEXT: vmult.f32 q1, q0, q1
2091 ; CHECK-NEXT: vmov q0, q1
2094 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2095 %a = fmul <4 x float> %x, %y
2096 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %y
2100 define arm_aapcs_vfpcc <8 x half> @fmul_v8f16_y(<8 x half> %x, <8 x half> %y, i32 %n) {
2101 ; CHECK-LABEL: fmul_v8f16_y:
2102 ; CHECK: @ %bb.0: @ %entry
2103 ; CHECK-NEXT: vctp.16 r0
2105 ; CHECK-NEXT: vmult.f16 q1, q0, q1
2106 ; CHECK-NEXT: vmov q0, q1
2109 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2110 %a = fmul <8 x half> %x, %y
2111 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %y
2115 define arm_aapcs_vfpcc <4 x float> @fdiv_v4f32_y(<4 x float> %x, <4 x float> %y, i32 %n) {
2116 ; CHECK-LABEL: fdiv_v4f32_y:
2117 ; CHECK: @ %bb.0: @ %entry
2118 ; CHECK-NEXT: vdiv.f32 s3, s3, s7
2119 ; CHECK-NEXT: vctp.32 r0
2120 ; CHECK-NEXT: vdiv.f32 s2, s2, s6
2121 ; CHECK-NEXT: vdiv.f32 s1, s1, s5
2122 ; CHECK-NEXT: vdiv.f32 s0, s0, s4
2124 ; CHECK-NEXT: vmovt q1, q0
2125 ; CHECK-NEXT: vmov q0, q1
2128 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2129 %a = fdiv <4 x float> %x, %y
2130 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %y
2134 define arm_aapcs_vfpcc <8 x half> @fdiv_v8f16_y(<8 x half> %x, <8 x half> %y, i32 %n) {
2135 ; CHECK-LABEL: fdiv_v8f16_y:
2136 ; CHECK: @ %bb.0: @ %entry
2137 ; CHECK-NEXT: vmovx.f16 s10, s0
2138 ; CHECK-NEXT: vmovx.f16 s8, s4
2139 ; CHECK-NEXT: vdiv.f16 s8, s10, s8
2140 ; CHECK-NEXT: vdiv.f16 s0, s0, s4
2141 ; CHECK-NEXT: vins.f16 s0, s8
2142 ; CHECK-NEXT: vmovx.f16 s10, s1
2143 ; CHECK-NEXT: vmovx.f16 s8, s5
2144 ; CHECK-NEXT: vdiv.f16 s1, s1, s5
2145 ; CHECK-NEXT: vdiv.f16 s8, s10, s8
2146 ; CHECK-NEXT: vmovx.f16 s10, s2
2147 ; CHECK-NEXT: vins.f16 s1, s8
2148 ; CHECK-NEXT: vmovx.f16 s8, s6
2149 ; CHECK-NEXT: vdiv.f16 s8, s10, s8
2150 ; CHECK-NEXT: vdiv.f16 s2, s2, s6
2151 ; CHECK-NEXT: vins.f16 s2, s8
2152 ; CHECK-NEXT: vmovx.f16 s10, s3
2153 ; CHECK-NEXT: vmovx.f16 s8, s7
2154 ; CHECK-NEXT: vdiv.f16 s3, s3, s7
2155 ; CHECK-NEXT: vdiv.f16 s8, s10, s8
2156 ; CHECK-NEXT: vctp.16 r0
2157 ; CHECK-NEXT: vins.f16 s3, s8
2159 ; CHECK-NEXT: vmovt q1, q0
2160 ; CHECK-NEXT: vmov q0, q1
2163 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2164 %a = fdiv <8 x half> %x, %y
2165 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %y
2169 define arm_aapcs_vfpcc <4 x float> @fmai_v4f32_y(<4 x float> %x, <4 x float> %y, <4 x float> %z, i32 %n) {
2170 ; CHECK-LABEL: fmai_v4f32_y:
2171 ; CHECK: @ %bb.0: @ %entry
2172 ; CHECK-NEXT: vfma.f32 q0, q1, q2
2173 ; CHECK-NEXT: vctp.32 r0
2175 ; CHECK-NEXT: vmovt q1, q0
2176 ; CHECK-NEXT: vmov q0, q1
2179 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2180 %a = call <4 x float> @llvm.fma.v4f32(<4 x float> %y, <4 x float> %z, <4 x float> %x)
2181 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %y
2185 define arm_aapcs_vfpcc <8 x half> @fmai_v8f16_y(<8 x half> %x, <8 x half> %y, <8 x half> %z, i32 %n) {
2186 ; CHECK-LABEL: fmai_v8f16_y:
2187 ; CHECK: @ %bb.0: @ %entry
2188 ; CHECK-NEXT: vfma.f16 q0, q1, q2
2189 ; CHECK-NEXT: vctp.16 r0
2191 ; CHECK-NEXT: vmovt q1, q0
2192 ; CHECK-NEXT: vmov q0, q1
2195 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2196 %a = call <8 x half> @llvm.fma.v8f16(<8 x half> %y, <8 x half> %z, <8 x half> %x)
2197 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %y
2201 define arm_aapcs_vfpcc <4 x float> @fma_v4f32_y(<4 x float> %x, <4 x float> %y, <4 x float> %z, i32 %n) {
2202 ; CHECK-LABEL: fma_v4f32_y:
2203 ; CHECK: @ %bb.0: @ %entry
2204 ; CHECK-NEXT: vfma.f32 q0, q1, q2
2205 ; CHECK-NEXT: vctp.32 r0
2207 ; CHECK-NEXT: vmovt q1, q0
2208 ; CHECK-NEXT: vmov q0, q1
2211 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2212 %m = fmul fast <4 x float> %y, %z
2213 %a = fadd fast <4 x float> %m, %x
2214 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %y
2218 define arm_aapcs_vfpcc <8 x half> @fma_v8f16_y(<8 x half> %x, <8 x half> %y, <8 x half> %z, i32 %n) {
2219 ; CHECK-LABEL: fma_v8f16_y:
2220 ; CHECK: @ %bb.0: @ %entry
2221 ; CHECK-NEXT: vfma.f16 q0, q1, q2
2222 ; CHECK-NEXT: vctp.16 r0
2224 ; CHECK-NEXT: vmovt q1, q0
2225 ; CHECK-NEXT: vmov q0, q1
2228 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2229 %m = fmul fast <8 x half> %y, %z
2230 %a = fadd fast <8 x half> %m, %x
2231 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %y
2235 define arm_aapcs_vfpcc <4 x i32> @icmp_slt_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
2236 ; CHECK-LABEL: icmp_slt_v4i32_y:
2237 ; CHECK: @ %bb.0: @ %entry
2238 ; CHECK-NEXT: vctp.32 r0
2240 ; CHECK-NEXT: vmint.s32 q1, q0, q1
2241 ; CHECK-NEXT: vmov q0, q1
2244 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2245 %a1 = icmp slt <4 x i32> %x, %y
2246 %a = select <4 x i1> %a1, <4 x i32> %x, <4 x i32> %y
2247 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
2251 define arm_aapcs_vfpcc <8 x i16> @icmp_slt_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
2252 ; CHECK-LABEL: icmp_slt_v8i16_y:
2253 ; CHECK: @ %bb.0: @ %entry
2254 ; CHECK-NEXT: vctp.16 r0
2256 ; CHECK-NEXT: vmint.s16 q1, q0, q1
2257 ; CHECK-NEXT: vmov q0, q1
2260 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2261 %a1 = icmp slt <8 x i16> %x, %y
2262 %a = select <8 x i1> %a1, <8 x i16> %x, <8 x i16> %y
2263 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
2267 define arm_aapcs_vfpcc <16 x i8> @icmp_slt_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
2268 ; CHECK-LABEL: icmp_slt_v16i8_y:
2269 ; CHECK: @ %bb.0: @ %entry
2270 ; CHECK-NEXT: vctp.8 r0
2272 ; CHECK-NEXT: vmint.s8 q1, q0, q1
2273 ; CHECK-NEXT: vmov q0, q1
2276 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2277 %a1 = icmp slt <16 x i8> %x, %y
2278 %a = select <16 x i1> %a1, <16 x i8> %x, <16 x i8> %y
2279 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
2283 define arm_aapcs_vfpcc <4 x i32> @icmp_sgt_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
2284 ; CHECK-LABEL: icmp_sgt_v4i32_y:
2285 ; CHECK: @ %bb.0: @ %entry
2286 ; CHECK-NEXT: vctp.32 r0
2288 ; CHECK-NEXT: vmaxt.s32 q1, q0, q1
2289 ; CHECK-NEXT: vmov q0, q1
2292 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2293 %a1 = icmp sgt <4 x i32> %x, %y
2294 %a = select <4 x i1> %a1, <4 x i32> %x, <4 x i32> %y
2295 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
2299 define arm_aapcs_vfpcc <8 x i16> @icmp_sgt_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
2300 ; CHECK-LABEL: icmp_sgt_v8i16_y:
2301 ; CHECK: @ %bb.0: @ %entry
2302 ; CHECK-NEXT: vctp.16 r0
2304 ; CHECK-NEXT: vmaxt.s16 q1, q0, q1
2305 ; CHECK-NEXT: vmov q0, q1
2308 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2309 %a1 = icmp sgt <8 x i16> %x, %y
2310 %a = select <8 x i1> %a1, <8 x i16> %x, <8 x i16> %y
2311 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
2315 define arm_aapcs_vfpcc <16 x i8> @icmp_sgt_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
2316 ; CHECK-LABEL: icmp_sgt_v16i8_y:
2317 ; CHECK: @ %bb.0: @ %entry
2318 ; CHECK-NEXT: vctp.8 r0
2320 ; CHECK-NEXT: vmaxt.s8 q1, q0, q1
2321 ; CHECK-NEXT: vmov q0, q1
2324 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2325 %a1 = icmp sgt <16 x i8> %x, %y
2326 %a = select <16 x i1> %a1, <16 x i8> %x, <16 x i8> %y
2327 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
2331 define arm_aapcs_vfpcc <4 x i32> @icmp_ult_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
2332 ; CHECK-LABEL: icmp_ult_v4i32_y:
2333 ; CHECK: @ %bb.0: @ %entry
2334 ; CHECK-NEXT: vctp.32 r0
2336 ; CHECK-NEXT: vmint.u32 q1, q0, q1
2337 ; CHECK-NEXT: vmov q0, q1
2340 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2341 %a1 = icmp ult <4 x i32> %x, %y
2342 %a = select <4 x i1> %a1, <4 x i32> %x, <4 x i32> %y
2343 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
2347 define arm_aapcs_vfpcc <8 x i16> @icmp_ult_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
2348 ; CHECK-LABEL: icmp_ult_v8i16_y:
2349 ; CHECK: @ %bb.0: @ %entry
2350 ; CHECK-NEXT: vctp.16 r0
2352 ; CHECK-NEXT: vmint.u16 q1, q0, q1
2353 ; CHECK-NEXT: vmov q0, q1
2356 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2357 %a1 = icmp ult <8 x i16> %x, %y
2358 %a = select <8 x i1> %a1, <8 x i16> %x, <8 x i16> %y
2359 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
2363 define arm_aapcs_vfpcc <16 x i8> @icmp_ult_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
2364 ; CHECK-LABEL: icmp_ult_v16i8_y:
2365 ; CHECK: @ %bb.0: @ %entry
2366 ; CHECK-NEXT: vctp.8 r0
2368 ; CHECK-NEXT: vmint.u8 q1, q0, q1
2369 ; CHECK-NEXT: vmov q0, q1
2372 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2373 %a1 = icmp ult <16 x i8> %x, %y
2374 %a = select <16 x i1> %a1, <16 x i8> %x, <16 x i8> %y
2375 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
2379 define arm_aapcs_vfpcc <4 x i32> @icmp_ugt_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
2380 ; CHECK-LABEL: icmp_ugt_v4i32_y:
2381 ; CHECK: @ %bb.0: @ %entry
2382 ; CHECK-NEXT: vctp.32 r0
2384 ; CHECK-NEXT: vmaxt.u32 q1, q0, q1
2385 ; CHECK-NEXT: vmov q0, q1
2388 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2389 %a1 = icmp ugt <4 x i32> %x, %y
2390 %a = select <4 x i1> %a1, <4 x i32> %x, <4 x i32> %y
2391 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
2395 define arm_aapcs_vfpcc <8 x i16> @icmp_ugt_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
2396 ; CHECK-LABEL: icmp_ugt_v8i16_y:
2397 ; CHECK: @ %bb.0: @ %entry
2398 ; CHECK-NEXT: vctp.16 r0
2400 ; CHECK-NEXT: vmaxt.u16 q1, q0, q1
2401 ; CHECK-NEXT: vmov q0, q1
2404 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2405 %a1 = icmp ugt <8 x i16> %x, %y
2406 %a = select <8 x i1> %a1, <8 x i16> %x, <8 x i16> %y
2407 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
2411 define arm_aapcs_vfpcc <16 x i8> @icmp_ugt_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
2412 ; CHECK-LABEL: icmp_ugt_v16i8_y:
2413 ; CHECK: @ %bb.0: @ %entry
2414 ; CHECK-NEXT: vctp.8 r0
2416 ; CHECK-NEXT: vmaxt.u8 q1, q0, q1
2417 ; CHECK-NEXT: vmov q0, q1
2420 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2421 %a1 = icmp ugt <16 x i8> %x, %y
2422 %a = select <16 x i1> %a1, <16 x i8> %x, <16 x i8> %y
2423 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
2427 define arm_aapcs_vfpcc <4 x float> @fcmp_fast_olt_v4f32_y(<4 x float> %x, <4 x float> %y, i32 %n) {
2428 ; CHECK-LABEL: fcmp_fast_olt_v4f32_y:
2429 ; CHECK: @ %bb.0: @ %entry
2430 ; CHECK-NEXT: vctp.32 r0
2432 ; CHECK-NEXT: vminnmt.f32 q1, q0, q1
2433 ; CHECK-NEXT: vmov q0, q1
2436 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2437 %a1 = fcmp fast olt <4 x float> %x, %y
2438 %a = select <4 x i1> %a1, <4 x float> %x, <4 x float> %y
2439 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %y
2443 define arm_aapcs_vfpcc <8 x half> @fcmp_fast_olt_v8f16_y(<8 x half> %x, <8 x half> %y, i32 %n) {
2444 ; CHECK-LABEL: fcmp_fast_olt_v8f16_y:
2445 ; CHECK: @ %bb.0: @ %entry
2446 ; CHECK-NEXT: vctp.16 r0
2448 ; CHECK-NEXT: vminnmt.f16 q1, q0, q1
2449 ; CHECK-NEXT: vmov q0, q1
2452 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2453 %a1 = fcmp fast olt <8 x half> %x, %y
2454 %a = select <8 x i1> %a1, <8 x half> %x, <8 x half> %y
2455 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %y
2459 define arm_aapcs_vfpcc <4 x float> @fcmp_fast_ogt_v4f32_y(<4 x float> %x, <4 x float> %y, i32 %n) {
2460 ; CHECK-LABEL: fcmp_fast_ogt_v4f32_y:
2461 ; CHECK: @ %bb.0: @ %entry
2462 ; CHECK-NEXT: vctp.32 r0
2464 ; CHECK-NEXT: vmaxnmt.f32 q1, q0, q1
2465 ; CHECK-NEXT: vmov q0, q1
2468 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2469 %a1 = fcmp fast ogt <4 x float> %x, %y
2470 %a = select <4 x i1> %a1, <4 x float> %x, <4 x float> %y
2471 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %y
2475 define arm_aapcs_vfpcc <8 x half> @fcmp_fast_ogt_v8f16_y(<8 x half> %x, <8 x half> %y, i32 %n) {
2476 ; CHECK-LABEL: fcmp_fast_ogt_v8f16_y:
2477 ; CHECK: @ %bb.0: @ %entry
2478 ; CHECK-NEXT: vctp.16 r0
2480 ; CHECK-NEXT: vmaxnmt.f16 q1, q0, q1
2481 ; CHECK-NEXT: vmov q0, q1
2484 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2485 %a1 = fcmp fast ogt <8 x half> %x, %y
2486 %a = select <8 x i1> %a1, <8 x half> %x, <8 x half> %y
2487 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %y
2491 define arm_aapcs_vfpcc <4 x i32> @sadd_sat_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
2492 ; CHECK-LABEL: sadd_sat_v4i32_y:
2493 ; CHECK: @ %bb.0: @ %entry
2494 ; CHECK-NEXT: vctp.32 r0
2496 ; CHECK-NEXT: vqaddt.s32 q1, q0, q1
2497 ; CHECK-NEXT: vmov q0, q1
2500 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2501 %a = call <4 x i32> @llvm.sadd.sat.v4i32(<4 x i32> %x, <4 x i32> %y)
2502 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
2506 define arm_aapcs_vfpcc <8 x i16> @sadd_sat_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
2507 ; CHECK-LABEL: sadd_sat_v8i16_y:
2508 ; CHECK: @ %bb.0: @ %entry
2509 ; CHECK-NEXT: vctp.16 r0
2511 ; CHECK-NEXT: vqaddt.s16 q1, q0, q1
2512 ; CHECK-NEXT: vmov q0, q1
2515 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2516 %a = call <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16> %x, <8 x i16> %y)
2517 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
2521 define arm_aapcs_vfpcc <16 x i8> @sadd_sat_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
2522 ; CHECK-LABEL: sadd_sat_v16i8_y:
2523 ; CHECK: @ %bb.0: @ %entry
2524 ; CHECK-NEXT: vctp.8 r0
2526 ; CHECK-NEXT: vqaddt.s8 q1, q0, q1
2527 ; CHECK-NEXT: vmov q0, q1
2530 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2531 %a = call <16 x i8> @llvm.sadd.sat.v16i8(<16 x i8> %x, <16 x i8> %y)
2532 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
2536 define arm_aapcs_vfpcc <4 x i32> @uadd_sat_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
2537 ; CHECK-LABEL: uadd_sat_v4i32_y:
2538 ; CHECK: @ %bb.0: @ %entry
2539 ; CHECK-NEXT: vctp.32 r0
2541 ; CHECK-NEXT: vqaddt.u32 q1, q0, q1
2542 ; CHECK-NEXT: vmov q0, q1
2545 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2546 %a = call <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> %x, <4 x i32> %y)
2547 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
2551 define arm_aapcs_vfpcc <8 x i16> @uadd_sat_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
2552 ; CHECK-LABEL: uadd_sat_v8i16_y:
2553 ; CHECK: @ %bb.0: @ %entry
2554 ; CHECK-NEXT: vctp.16 r0
2556 ; CHECK-NEXT: vqaddt.u16 q1, q0, q1
2557 ; CHECK-NEXT: vmov q0, q1
2560 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2561 %a = call <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16> %x, <8 x i16> %y)
2562 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
2566 define arm_aapcs_vfpcc <16 x i8> @uadd_sat_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
2567 ; CHECK-LABEL: uadd_sat_v16i8_y:
2568 ; CHECK: @ %bb.0: @ %entry
2569 ; CHECK-NEXT: vctp.8 r0
2571 ; CHECK-NEXT: vqaddt.u8 q1, q0, q1
2572 ; CHECK-NEXT: vmov q0, q1
2575 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2576 %a = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> %x, <16 x i8> %y)
2577 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
2581 define arm_aapcs_vfpcc <4 x i32> @ssub_sat_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
2582 ; CHECK-LABEL: ssub_sat_v4i32_y:
2583 ; CHECK: @ %bb.0: @ %entry
2584 ; CHECK-NEXT: vctp.32 r0
2586 ; CHECK-NEXT: vqsubt.s32 q1, q0, q1
2587 ; CHECK-NEXT: vmov q0, q1
2590 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2591 %a = call <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32> %x, <4 x i32> %y)
2592 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
2596 define arm_aapcs_vfpcc <8 x i16> @ssub_sat_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
2597 ; CHECK-LABEL: ssub_sat_v8i16_y:
2598 ; CHECK: @ %bb.0: @ %entry
2599 ; CHECK-NEXT: vctp.16 r0
2601 ; CHECK-NEXT: vqsubt.s16 q1, q0, q1
2602 ; CHECK-NEXT: vmov q0, q1
2605 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2606 %a = call <8 x i16> @llvm.ssub.sat.v8i16(<8 x i16> %x, <8 x i16> %y)
2607 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
2611 define arm_aapcs_vfpcc <16 x i8> @ssub_sat_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
2612 ; CHECK-LABEL: ssub_sat_v16i8_y:
2613 ; CHECK: @ %bb.0: @ %entry
2614 ; CHECK-NEXT: vctp.8 r0
2616 ; CHECK-NEXT: vqsubt.s8 q1, q0, q1
2617 ; CHECK-NEXT: vmov q0, q1
2620 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2621 %a = call <16 x i8> @llvm.ssub.sat.v16i8(<16 x i8> %x, <16 x i8> %y)
2622 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
2626 define arm_aapcs_vfpcc <4 x i32> @usub_sat_v4i32_y(<4 x i32> %x, <4 x i32> %y, i32 %n) {
2627 ; CHECK-LABEL: usub_sat_v4i32_y:
2628 ; CHECK: @ %bb.0: @ %entry
2629 ; CHECK-NEXT: vctp.32 r0
2631 ; CHECK-NEXT: vqsubt.u32 q1, q0, q1
2632 ; CHECK-NEXT: vmov q0, q1
2635 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2636 %a = call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> %x, <4 x i32> %y)
2637 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %y
2641 define arm_aapcs_vfpcc <8 x i16> @usub_sat_v8i16_y(<8 x i16> %x, <8 x i16> %y, i32 %n) {
2642 ; CHECK-LABEL: usub_sat_v8i16_y:
2643 ; CHECK: @ %bb.0: @ %entry
2644 ; CHECK-NEXT: vctp.16 r0
2646 ; CHECK-NEXT: vqsubt.u16 q1, q0, q1
2647 ; CHECK-NEXT: vmov q0, q1
2650 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2651 %a = call <8 x i16> @llvm.usub.sat.v8i16(<8 x i16> %x, <8 x i16> %y)
2652 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %y
2656 define arm_aapcs_vfpcc <16 x i8> @usub_sat_v16i8_y(<16 x i8> %x, <16 x i8> %y, i32 %n) {
2657 ; CHECK-LABEL: usub_sat_v16i8_y:
2658 ; CHECK: @ %bb.0: @ %entry
2659 ; CHECK-NEXT: vctp.8 r0
2661 ; CHECK-NEXT: vqsubt.u8 q1, q0, q1
2662 ; CHECK-NEXT: vmov q0, q1
2665 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2666 %a = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> %x, <16 x i8> %y)
2667 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %y
2671 define arm_aapcs_vfpcc <4 x i32> @addqr_v4i32_y(<4 x i32> %x, i32 %y, i32 %n) {
2672 ; CHECK-LABEL: addqr_v4i32_y:
2673 ; CHECK: @ %bb.0: @ %entry
2674 ; CHECK-NEXT: vdup.32 q1, r0
2675 ; CHECK-NEXT: vctp.32 r1
2677 ; CHECK-NEXT: vaddt.i32 q1, q0, r0
2678 ; CHECK-NEXT: vmov q0, q1
2681 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2682 %i = insertelement <4 x i32> undef, i32 %y, i32 0
2683 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
2684 %a = add <4 x i32> %x, %ys
2685 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %ys
2689 define arm_aapcs_vfpcc <8 x i16> @addqr_v8i16_y(<8 x i16> %x, i16 %y, i32 %n) {
2690 ; CHECK-LABEL: addqr_v8i16_y:
2691 ; CHECK: @ %bb.0: @ %entry
2692 ; CHECK-NEXT: vdup.16 q1, r0
2693 ; CHECK-NEXT: vctp.16 r1
2695 ; CHECK-NEXT: vaddt.i16 q1, q0, r0
2696 ; CHECK-NEXT: vmov q0, q1
2699 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2700 %i = insertelement <8 x i16> undef, i16 %y, i32 0
2701 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
2702 %a = add <8 x i16> %x, %ys
2703 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %ys
2707 define arm_aapcs_vfpcc <16 x i8> @addqr_v16i8_y(<16 x i8> %x, i8 %y, i32 %n) {
2708 ; CHECK-LABEL: addqr_v16i8_y:
2709 ; CHECK: @ %bb.0: @ %entry
2710 ; CHECK-NEXT: vdup.8 q1, r0
2711 ; CHECK-NEXT: vctp.8 r1
2713 ; CHECK-NEXT: vaddt.i8 q1, q0, r0
2714 ; CHECK-NEXT: vmov q0, q1
2717 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2718 %i = insertelement <16 x i8> undef, i8 %y, i32 0
2719 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
2720 %a = add <16 x i8> %x, %ys
2721 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %ys
2725 define arm_aapcs_vfpcc <4 x i32> @subqr_v4i32_y(<4 x i32> %x, i32 %y, i32 %n) {
2726 ; CHECK-LABEL: subqr_v4i32_y:
2727 ; CHECK: @ %bb.0: @ %entry
2728 ; CHECK-NEXT: vdup.32 q1, r0
2729 ; CHECK-NEXT: vctp.32 r1
2731 ; CHECK-NEXT: vsubt.i32 q1, q0, r0
2732 ; CHECK-NEXT: vmov q0, q1
2735 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2736 %i = insertelement <4 x i32> undef, i32 %y, i32 0
2737 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
2738 %a = sub <4 x i32> %x, %ys
2739 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %ys
2743 define arm_aapcs_vfpcc <8 x i16> @subqr_v8i16_y(<8 x i16> %x, i16 %y, i32 %n) {
2744 ; CHECK-LABEL: subqr_v8i16_y:
2745 ; CHECK: @ %bb.0: @ %entry
2746 ; CHECK-NEXT: vdup.16 q1, r0
2747 ; CHECK-NEXT: vctp.16 r1
2749 ; CHECK-NEXT: vsubt.i16 q1, q0, r0
2750 ; CHECK-NEXT: vmov q0, q1
2753 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2754 %i = insertelement <8 x i16> undef, i16 %y, i32 0
2755 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
2756 %a = sub <8 x i16> %x, %ys
2757 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %ys
2761 define arm_aapcs_vfpcc <16 x i8> @subqr_v16i8_y(<16 x i8> %x, i8 %y, i32 %n) {
2762 ; CHECK-LABEL: subqr_v16i8_y:
2763 ; CHECK: @ %bb.0: @ %entry
2764 ; CHECK-NEXT: vdup.8 q1, r0
2765 ; CHECK-NEXT: vctp.8 r1
2767 ; CHECK-NEXT: vsubt.i8 q1, q0, r0
2768 ; CHECK-NEXT: vmov q0, q1
2771 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2772 %i = insertelement <16 x i8> undef, i8 %y, i32 0
2773 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
2774 %a = sub <16 x i8> %x, %ys
2775 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %ys
2779 define arm_aapcs_vfpcc <4 x i32> @mulqr_v4i32_y(<4 x i32> %x, i32 %y, i32 %n) {
2780 ; CHECK-LABEL: mulqr_v4i32_y:
2781 ; CHECK: @ %bb.0: @ %entry
2782 ; CHECK-NEXT: vdup.32 q1, r0
2783 ; CHECK-NEXT: vctp.32 r1
2785 ; CHECK-NEXT: vmult.i32 q1, q0, r0
2786 ; CHECK-NEXT: vmov q0, q1
2789 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2790 %i = insertelement <4 x i32> undef, i32 %y, i32 0
2791 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
2792 %a = mul <4 x i32> %x, %ys
2793 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %ys
2797 define arm_aapcs_vfpcc <8 x i16> @mulqr_v8i16_y(<8 x i16> %x, i16 %y, i32 %n) {
2798 ; CHECK-LABEL: mulqr_v8i16_y:
2799 ; CHECK: @ %bb.0: @ %entry
2800 ; CHECK-NEXT: vdup.16 q1, r0
2801 ; CHECK-NEXT: vctp.16 r1
2803 ; CHECK-NEXT: vmult.i16 q1, q0, r0
2804 ; CHECK-NEXT: vmov q0, q1
2807 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2808 %i = insertelement <8 x i16> undef, i16 %y, i32 0
2809 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
2810 %a = mul <8 x i16> %x, %ys
2811 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %ys
2815 define arm_aapcs_vfpcc <16 x i8> @mulqr_v16i8_y(<16 x i8> %x, i8 %y, i32 %n) {
2816 ; CHECK-LABEL: mulqr_v16i8_y:
2817 ; CHECK: @ %bb.0: @ %entry
2818 ; CHECK-NEXT: vdup.8 q1, r0
2819 ; CHECK-NEXT: vctp.8 r1
2821 ; CHECK-NEXT: vmult.i8 q1, q0, r0
2822 ; CHECK-NEXT: vmov q0, q1
2825 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2826 %i = insertelement <16 x i8> undef, i8 %y, i32 0
2827 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
2828 %a = mul <16 x i8> %x, %ys
2829 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %ys
2833 define arm_aapcs_vfpcc <4 x float> @faddqr_v4f32_y(<4 x float> %x, float %y, i32 %n) {
2834 ; CHECK-LABEL: faddqr_v4f32_y:
2835 ; CHECK: @ %bb.0: @ %entry
2836 ; CHECK-NEXT: vmov r1, s4
2837 ; CHECK-NEXT: vctp.32 r0
2838 ; CHECK-NEXT: vdup.32 q1, r1
2840 ; CHECK-NEXT: vaddt.f32 q1, q0, r1
2841 ; CHECK-NEXT: vmov q0, q1
2844 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2845 %i = insertelement <4 x float> undef, float %y, i32 0
2846 %ys = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
2847 %a = fadd <4 x float> %x, %ys
2848 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %ys
2852 define arm_aapcs_vfpcc <8 x half> @faddqr_v8f16_y(<8 x half> %x, half %y, i32 %n) {
2853 ; CHECK-LABEL: faddqr_v8f16_y:
2854 ; CHECK: @ %bb.0: @ %entry
2855 ; CHECK-NEXT: vmov.f16 r1, s4
2856 ; CHECK-NEXT: vctp.16 r0
2857 ; CHECK-NEXT: vdup.16 q1, r1
2859 ; CHECK-NEXT: vaddt.f16 q1, q0, r1
2860 ; CHECK-NEXT: vmov q0, q1
2863 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2864 %i = insertelement <8 x half> undef, half %y, i32 0
2865 %ys = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
2866 %a = fadd <8 x half> %x, %ys
2867 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %ys
2871 define arm_aapcs_vfpcc <4 x float> @fsubqr_v4f32_y(<4 x float> %x, float %y, i32 %n) {
2872 ; CHECK-LABEL: fsubqr_v4f32_y:
2873 ; CHECK: @ %bb.0: @ %entry
2874 ; CHECK-NEXT: vmov r1, s4
2875 ; CHECK-NEXT: vctp.32 r0
2876 ; CHECK-NEXT: vdup.32 q1, r1
2878 ; CHECK-NEXT: vsubt.f32 q1, q0, r1
2879 ; CHECK-NEXT: vmov q0, q1
2882 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2883 %i = insertelement <4 x float> undef, float %y, i32 0
2884 %ys = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
2885 %a = fsub <4 x float> %x, %ys
2886 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %ys
2890 define arm_aapcs_vfpcc <8 x half> @fsubqr_v8f16_y(<8 x half> %x, half %y, i32 %n) {
2891 ; CHECK-LABEL: fsubqr_v8f16_y:
2892 ; CHECK: @ %bb.0: @ %entry
2893 ; CHECK-NEXT: vmov.f16 r1, s4
2894 ; CHECK-NEXT: vctp.16 r0
2895 ; CHECK-NEXT: vdup.16 q1, r1
2897 ; CHECK-NEXT: vsubt.f16 q1, q0, r1
2898 ; CHECK-NEXT: vmov q0, q1
2901 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2902 %i = insertelement <8 x half> undef, half %y, i32 0
2903 %ys = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
2904 %a = fsub <8 x half> %x, %ys
2905 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %ys
2909 define arm_aapcs_vfpcc <4 x float> @fmulqr_v4f32_y(<4 x float> %x, float %y, i32 %n) {
2910 ; CHECK-LABEL: fmulqr_v4f32_y:
2911 ; CHECK: @ %bb.0: @ %entry
2912 ; CHECK-NEXT: vmov r1, s4
2913 ; CHECK-NEXT: vctp.32 r0
2914 ; CHECK-NEXT: vdup.32 q1, r1
2916 ; CHECK-NEXT: vmult.f32 q1, q0, r1
2917 ; CHECK-NEXT: vmov q0, q1
2920 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2921 %i = insertelement <4 x float> undef, float %y, i32 0
2922 %ys = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
2923 %a = fmul <4 x float> %x, %ys
2924 %b = select <4 x i1> %c, <4 x float> %a, <4 x float> %ys
2928 define arm_aapcs_vfpcc <8 x half> @fmulqr_v8f16_y(<8 x half> %x, half %y, i32 %n) {
2929 ; CHECK-LABEL: fmulqr_v8f16_y:
2930 ; CHECK: @ %bb.0: @ %entry
2931 ; CHECK-NEXT: vmov.f16 r1, s4
2932 ; CHECK-NEXT: vctp.16 r0
2933 ; CHECK-NEXT: vdup.16 q1, r1
2935 ; CHECK-NEXT: vmult.f16 q1, q0, r1
2936 ; CHECK-NEXT: vmov q0, q1
2939 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2940 %i = insertelement <8 x half> undef, half %y, i32 0
2941 %ys = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
2942 %a = fmul <8 x half> %x, %ys
2943 %b = select <8 x i1> %c, <8 x half> %a, <8 x half> %ys
2947 define arm_aapcs_vfpcc <4 x i32> @sadd_satqr_v4i32_y(<4 x i32> %x, i32 %y, i32 %n) {
2948 ; CHECK-LABEL: sadd_satqr_v4i32_y:
2949 ; CHECK: @ %bb.0: @ %entry
2950 ; CHECK-NEXT: vdup.32 q1, r0
2951 ; CHECK-NEXT: vctp.32 r1
2953 ; CHECK-NEXT: vqaddt.s32 q1, q0, r0
2954 ; CHECK-NEXT: vmov q0, q1
2957 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
2958 %i = insertelement <4 x i32> undef, i32 %y, i32 0
2959 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
2960 %a = call <4 x i32> @llvm.sadd.sat.v4i32(<4 x i32> %x, <4 x i32> %ys)
2961 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %ys
2965 define arm_aapcs_vfpcc <8 x i16> @sadd_satqr_v8i16_y(<8 x i16> %x, i16 %y, i32 %n) {
2966 ; CHECK-LABEL: sadd_satqr_v8i16_y:
2967 ; CHECK: @ %bb.0: @ %entry
2968 ; CHECK-NEXT: vdup.16 q1, r0
2969 ; CHECK-NEXT: vctp.16 r1
2971 ; CHECK-NEXT: vqaddt.s16 q1, q0, r0
2972 ; CHECK-NEXT: vmov q0, q1
2975 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
2976 %i = insertelement <8 x i16> undef, i16 %y, i32 0
2977 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
2978 %a = call <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16> %x, <8 x i16> %ys)
2979 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %ys
2983 define arm_aapcs_vfpcc <16 x i8> @sadd_satqr_v16i8_y(<16 x i8> %x, i8 %y, i32 %n) {
2984 ; CHECK-LABEL: sadd_satqr_v16i8_y:
2985 ; CHECK: @ %bb.0: @ %entry
2986 ; CHECK-NEXT: vdup.8 q1, r0
2987 ; CHECK-NEXT: vctp.8 r1
2989 ; CHECK-NEXT: vqaddt.s8 q1, q0, r0
2990 ; CHECK-NEXT: vmov q0, q1
2993 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
2994 %i = insertelement <16 x i8> undef, i8 %y, i32 0
2995 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
2996 %a = call <16 x i8> @llvm.sadd.sat.v16i8(<16 x i8> %x, <16 x i8> %ys)
2997 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %ys
3001 define arm_aapcs_vfpcc <4 x i32> @uadd_satqr_v4i32_y(<4 x i32> %x, i32 %y, i32 %n) {
3002 ; CHECK-LABEL: uadd_satqr_v4i32_y:
3003 ; CHECK: @ %bb.0: @ %entry
3004 ; CHECK-NEXT: vdup.32 q1, r0
3005 ; CHECK-NEXT: vctp.32 r1
3007 ; CHECK-NEXT: vqaddt.u32 q1, q0, r0
3008 ; CHECK-NEXT: vmov q0, q1
3011 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
3012 %i = insertelement <4 x i32> undef, i32 %y, i32 0
3013 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
3014 %a = call <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> %x, <4 x i32> %ys)
3015 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %ys
3019 define arm_aapcs_vfpcc <8 x i16> @uadd_satqr_v8i16_y(<8 x i16> %x, i16 %y, i32 %n) {
3020 ; CHECK-LABEL: uadd_satqr_v8i16_y:
3021 ; CHECK: @ %bb.0: @ %entry
3022 ; CHECK-NEXT: vdup.16 q1, r0
3023 ; CHECK-NEXT: vctp.16 r1
3025 ; CHECK-NEXT: vqaddt.u16 q1, q0, r0
3026 ; CHECK-NEXT: vmov q0, q1
3029 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
3030 %i = insertelement <8 x i16> undef, i16 %y, i32 0
3031 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
3032 %a = call <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16> %x, <8 x i16> %ys)
3033 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %ys
3037 define arm_aapcs_vfpcc <16 x i8> @uadd_satqr_v16i8_y(<16 x i8> %x, i8 %y, i32 %n) {
3038 ; CHECK-LABEL: uadd_satqr_v16i8_y:
3039 ; CHECK: @ %bb.0: @ %entry
3040 ; CHECK-NEXT: vdup.8 q1, r0
3041 ; CHECK-NEXT: vctp.8 r1
3043 ; CHECK-NEXT: vqaddt.u8 q1, q0, r0
3044 ; CHECK-NEXT: vmov q0, q1
3047 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
3048 %i = insertelement <16 x i8> undef, i8 %y, i32 0
3049 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
3050 %a = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> %x, <16 x i8> %ys)
3051 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %ys
3055 define arm_aapcs_vfpcc <4 x i32> @ssub_satqr_v4i32_y(<4 x i32> %x, i32 %y, i32 %n) {
3056 ; CHECK-LABEL: ssub_satqr_v4i32_y:
3057 ; CHECK: @ %bb.0: @ %entry
3058 ; CHECK-NEXT: vdup.32 q1, r0
3059 ; CHECK-NEXT: vctp.32 r1
3061 ; CHECK-NEXT: vqsubt.s32 q1, q0, r0
3062 ; CHECK-NEXT: vmov q0, q1
3065 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
3066 %i = insertelement <4 x i32> undef, i32 %y, i32 0
3067 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
3068 %a = call <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32> %x, <4 x i32> %ys)
3069 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %ys
3073 define arm_aapcs_vfpcc <8 x i16> @ssub_satqr_v8i16_y(<8 x i16> %x, i16 %y, i32 %n) {
3074 ; CHECK-LABEL: ssub_satqr_v8i16_y:
3075 ; CHECK: @ %bb.0: @ %entry
3076 ; CHECK-NEXT: vdup.16 q1, r0
3077 ; CHECK-NEXT: vctp.16 r1
3079 ; CHECK-NEXT: vqsubt.s16 q1, q0, r0
3080 ; CHECK-NEXT: vmov q0, q1
3083 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
3084 %i = insertelement <8 x i16> undef, i16 %y, i32 0
3085 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
3086 %a = call <8 x i16> @llvm.ssub.sat.v8i16(<8 x i16> %x, <8 x i16> %ys)
3087 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %ys
3091 define arm_aapcs_vfpcc <16 x i8> @ssub_satqr_v16i8_y(<16 x i8> %x, i8 %y, i32 %n) {
3092 ; CHECK-LABEL: ssub_satqr_v16i8_y:
3093 ; CHECK: @ %bb.0: @ %entry
3094 ; CHECK-NEXT: vdup.8 q1, r0
3095 ; CHECK-NEXT: vctp.8 r1
3097 ; CHECK-NEXT: vqsubt.s8 q1, q0, r0
3098 ; CHECK-NEXT: vmov q0, q1
3101 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
3102 %i = insertelement <16 x i8> undef, i8 %y, i32 0
3103 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
3104 %a = call <16 x i8> @llvm.ssub.sat.v16i8(<16 x i8> %x, <16 x i8> %ys)
3105 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %ys
3109 define arm_aapcs_vfpcc <4 x i32> @usub_satqr_v4i32_y(<4 x i32> %x, i32 %y, i32 %n) {
3110 ; CHECK-LABEL: usub_satqr_v4i32_y:
3111 ; CHECK: @ %bb.0: @ %entry
3112 ; CHECK-NEXT: vdup.32 q1, r0
3113 ; CHECK-NEXT: vctp.32 r1
3115 ; CHECK-NEXT: vqsubt.u32 q1, q0, r0
3116 ; CHECK-NEXT: vmov q0, q1
3119 %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
3120 %i = insertelement <4 x i32> undef, i32 %y, i32 0
3121 %ys = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
3122 %a = call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> %x, <4 x i32> %ys)
3123 %b = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %ys
3127 define arm_aapcs_vfpcc <8 x i16> @usub_satqr_v8i16_y(<8 x i16> %x, i16 %y, i32 %n) {
3128 ; CHECK-LABEL: usub_satqr_v8i16_y:
3129 ; CHECK: @ %bb.0: @ %entry
3130 ; CHECK-NEXT: vdup.16 q1, r0
3131 ; CHECK-NEXT: vctp.16 r1
3133 ; CHECK-NEXT: vqsubt.u16 q1, q0, r0
3134 ; CHECK-NEXT: vmov q0, q1
3137 %c = call <8 x i1> @llvm.arm.mve.vctp16(i32 %n)
3138 %i = insertelement <8 x i16> undef, i16 %y, i32 0
3139 %ys = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
3140 %a = call <8 x i16> @llvm.usub.sat.v8i16(<8 x i16> %x, <8 x i16> %ys)
3141 %b = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %ys
3145 define arm_aapcs_vfpcc <16 x i8> @usub_satqr_v16i8_y(<16 x i8> %x, i8 %y, i32 %n) {
3146 ; CHECK-LABEL: usub_satqr_v16i8_y:
3147 ; CHECK: @ %bb.0: @ %entry
3148 ; CHECK-NEXT: vdup.8 q1, r0
3149 ; CHECK-NEXT: vctp.8 r1
3151 ; CHECK-NEXT: vqsubt.u8 q1, q0, r0
3152 ; CHECK-NEXT: vmov q0, q1
3155 %c = call <16 x i1> @llvm.arm.mve.vctp8(i32 %n)
3156 %i = insertelement <16 x i8> undef, i8 %y, i32 0
3157 %ys = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
3158 %a = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> %x, <16 x i8> %ys)
3159 %b = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %ys
3163 declare <16 x i8> @llvm.sadd.sat.v16i8(<16 x i8>, <16 x i8>)
3164 declare <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16>, <8 x i16>)
3165 declare <4 x i32> @llvm.sadd.sat.v4i32(<4 x i32>, <4 x i32>)
3166 declare <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8>, <16 x i8>)
3167 declare <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16>, <8 x i16>)
3168 declare <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32>, <4 x i32>)
3169 declare <16 x i8> @llvm.ssub.sat.v16i8(<16 x i8>, <16 x i8>)
3170 declare <8 x i16> @llvm.ssub.sat.v8i16(<8 x i16>, <8 x i16>)
3171 declare <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32>, <4 x i32>)
3172 declare <16 x i8> @llvm.usub.sat.v16i8(<16 x i8>, <16 x i8>)
3173 declare <8 x i16> @llvm.usub.sat.v8i16(<8 x i16>, <8 x i16>)
3174 declare <4 x i32> @llvm.usub.sat.v4i32(<4 x i32>, <4 x i32>)
3176 declare <4 x float> @llvm.fma.v4f32(<4 x float>, <4 x float>, <4 x float>)
3177 declare <8 x half> @llvm.fma.v8f16(<8 x half>, <8 x half>, <8 x half>)
3179 declare <16 x i1> @llvm.arm.mve.vctp8(i32)
3180 declare <8 x i1> @llvm.arm.mve.vctp16(i32)
3181 declare <4 x i1> @llvm.arm.mve.vctp32(i32)