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 -verify-machineinstrs %s -o - | FileCheck %s
4 define arm_aapcs_vfpcc <4 x i32> @vcmp_eqz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
5 ; CHECK-LABEL: vcmp_eqz_v4i32:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: vcmp.i32 eq, q0, zr
8 ; CHECK-NEXT: vpsel q0, q1, q2
11 %c = icmp eq <4 x i32> %src, zeroinitializer
12 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
16 define arm_aapcs_vfpcc <4 x i32> @vcmp_nez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
17 ; CHECK-LABEL: vcmp_nez_v4i32:
18 ; CHECK: @ %bb.0: @ %entry
19 ; CHECK-NEXT: vcmp.i32 ne, q0, zr
20 ; CHECK-NEXT: vpsel q0, q1, q2
23 %c = icmp ne <4 x i32> %src, zeroinitializer
24 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
28 define arm_aapcs_vfpcc <4 x i32> @vcmp_sgtz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
29 ; CHECK-LABEL: vcmp_sgtz_v4i32:
30 ; CHECK: @ %bb.0: @ %entry
31 ; CHECK-NEXT: vcmp.s32 gt, q0, zr
32 ; CHECK-NEXT: vpsel q0, q1, q2
35 %c = icmp sgt <4 x i32> %src, zeroinitializer
36 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
40 define arm_aapcs_vfpcc <4 x i32> @vcmp_sgez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
41 ; CHECK-LABEL: vcmp_sgez_v4i32:
42 ; CHECK: @ %bb.0: @ %entry
43 ; CHECK-NEXT: vcmp.s32 ge, q0, zr
44 ; CHECK-NEXT: vpsel q0, q1, q2
47 %c = icmp sge <4 x i32> %src, zeroinitializer
48 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
52 define arm_aapcs_vfpcc <4 x i32> @vcmp_sltz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
53 ; CHECK-LABEL: vcmp_sltz_v4i32:
54 ; CHECK: @ %bb.0: @ %entry
55 ; CHECK-NEXT: vcmp.s32 lt, q0, zr
56 ; CHECK-NEXT: vpsel q0, q1, q2
59 %c = icmp slt <4 x i32> %src, zeroinitializer
60 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
64 define arm_aapcs_vfpcc <4 x i32> @vcmp_slez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
65 ; CHECK-LABEL: vcmp_slez_v4i32:
66 ; CHECK: @ %bb.0: @ %entry
67 ; CHECK-NEXT: vcmp.s32 le, q0, zr
68 ; CHECK-NEXT: vpsel q0, q1, q2
71 %c = icmp sle <4 x i32> %src, zeroinitializer
72 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
76 define arm_aapcs_vfpcc <4 x i32> @vcmp_ugtz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
77 ; CHECK-LABEL: vcmp_ugtz_v4i32:
78 ; CHECK: @ %bb.0: @ %entry
79 ; CHECK-NEXT: vcmp.i32 ne, q0, zr
80 ; CHECK-NEXT: vpsel q0, q1, q2
83 %c = icmp ugt <4 x i32> %src, zeroinitializer
84 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
88 define arm_aapcs_vfpcc <4 x i32> @vcmp_ugez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
89 ; CHECK-LABEL: vcmp_ugez_v4i32:
90 ; CHECK: @ %bb.0: @ %entry
91 ; CHECK-NEXT: vmov q0, q1
94 %c = icmp uge <4 x i32> %src, zeroinitializer
95 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
99 define arm_aapcs_vfpcc <4 x i32> @vcmp_ultz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
100 ; CHECK-LABEL: vcmp_ultz_v4i32:
101 ; CHECK: @ %bb.0: @ %entry
102 ; CHECK-NEXT: vmov q0, q2
105 %c = icmp ult <4 x i32> %src, zeroinitializer
106 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
110 define arm_aapcs_vfpcc <4 x i32> @vcmp_ulez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
111 ; CHECK-LABEL: vcmp_ulez_v4i32:
112 ; CHECK: @ %bb.0: @ %entry
113 ; CHECK-NEXT: vmov.i32 q3, #0x0
114 ; CHECK-NEXT: vcmp.u32 cs, q3, q0
115 ; CHECK-NEXT: vpsel q0, q1, q2
118 %c = icmp ule <4 x i32> %src, zeroinitializer
119 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
124 define arm_aapcs_vfpcc <8 x i16> @vcmp_eqz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
125 ; CHECK-LABEL: vcmp_eqz_v8i16:
126 ; CHECK: @ %bb.0: @ %entry
127 ; CHECK-NEXT: vcmp.i16 eq, q0, zr
128 ; CHECK-NEXT: vpsel q0, q1, q2
131 %c = icmp eq <8 x i16> %src, zeroinitializer
132 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
136 define arm_aapcs_vfpcc <8 x i16> @vcmp_nez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
137 ; CHECK-LABEL: vcmp_nez_v8i16:
138 ; CHECK: @ %bb.0: @ %entry
139 ; CHECK-NEXT: vcmp.i16 ne, q0, zr
140 ; CHECK-NEXT: vpsel q0, q1, q2
143 %c = icmp ne <8 x i16> %src, zeroinitializer
144 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
148 define arm_aapcs_vfpcc <8 x i16> @vcmp_sgtz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
149 ; CHECK-LABEL: vcmp_sgtz_v8i16:
150 ; CHECK: @ %bb.0: @ %entry
151 ; CHECK-NEXT: vcmp.s16 gt, q0, zr
152 ; CHECK-NEXT: vpsel q0, q1, q2
155 %c = icmp sgt <8 x i16> %src, zeroinitializer
156 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
160 define arm_aapcs_vfpcc <8 x i16> @vcmp_sgez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
161 ; CHECK-LABEL: vcmp_sgez_v8i16:
162 ; CHECK: @ %bb.0: @ %entry
163 ; CHECK-NEXT: vcmp.s16 ge, q0, zr
164 ; CHECK-NEXT: vpsel q0, q1, q2
167 %c = icmp sge <8 x i16> %src, zeroinitializer
168 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
172 define arm_aapcs_vfpcc <8 x i16> @vcmp_sltz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
173 ; CHECK-LABEL: vcmp_sltz_v8i16:
174 ; CHECK: @ %bb.0: @ %entry
175 ; CHECK-NEXT: vcmp.s16 lt, q0, zr
176 ; CHECK-NEXT: vpsel q0, q1, q2
179 %c = icmp slt <8 x i16> %src, zeroinitializer
180 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
184 define arm_aapcs_vfpcc <8 x i16> @vcmp_slez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
185 ; CHECK-LABEL: vcmp_slez_v8i16:
186 ; CHECK: @ %bb.0: @ %entry
187 ; CHECK-NEXT: vcmp.s16 le, q0, zr
188 ; CHECK-NEXT: vpsel q0, q1, q2
191 %c = icmp sle <8 x i16> %src, zeroinitializer
192 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
196 define arm_aapcs_vfpcc <8 x i16> @vcmp_ugtz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
197 ; CHECK-LABEL: vcmp_ugtz_v8i16:
198 ; CHECK: @ %bb.0: @ %entry
199 ; CHECK-NEXT: vcmp.i16 ne, q0, zr
200 ; CHECK-NEXT: vpsel q0, q1, q2
203 %c = icmp ugt <8 x i16> %src, zeroinitializer
204 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
208 define arm_aapcs_vfpcc <8 x i16> @vcmp_ugez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
209 ; CHECK-LABEL: vcmp_ugez_v8i16:
210 ; CHECK: @ %bb.0: @ %entry
211 ; CHECK-NEXT: vmov q0, q1
214 %c = icmp uge <8 x i16> %src, zeroinitializer
215 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
219 define arm_aapcs_vfpcc <8 x i16> @vcmp_ultz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
220 ; CHECK-LABEL: vcmp_ultz_v8i16:
221 ; CHECK: @ %bb.0: @ %entry
222 ; CHECK-NEXT: vmov q0, q2
225 %c = icmp ult <8 x i16> %src, zeroinitializer
226 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
230 define arm_aapcs_vfpcc <8 x i16> @vcmp_ulez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
231 ; CHECK-LABEL: vcmp_ulez_v8i16:
232 ; CHECK: @ %bb.0: @ %entry
233 ; CHECK-NEXT: vmov.i32 q3, #0x0
234 ; CHECK-NEXT: vcmp.u16 cs, q3, q0
235 ; CHECK-NEXT: vpsel q0, q1, q2
238 %c = icmp ule <8 x i16> %src, zeroinitializer
239 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
244 define arm_aapcs_vfpcc <16 x i8> @vcmp_eqz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
245 ; CHECK-LABEL: vcmp_eqz_v16i8:
246 ; CHECK: @ %bb.0: @ %entry
247 ; CHECK-NEXT: vcmp.i8 eq, q0, zr
248 ; CHECK-NEXT: vpsel q0, q1, q2
251 %c = icmp eq <16 x i8> %src, zeroinitializer
252 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
256 define arm_aapcs_vfpcc <16 x i8> @vcmp_nez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
257 ; CHECK-LABEL: vcmp_nez_v16i8:
258 ; CHECK: @ %bb.0: @ %entry
259 ; CHECK-NEXT: vcmp.i8 ne, q0, zr
260 ; CHECK-NEXT: vpsel q0, q1, q2
263 %c = icmp ne <16 x i8> %src, zeroinitializer
264 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
268 define arm_aapcs_vfpcc <16 x i8> @vcmp_sgtz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
269 ; CHECK-LABEL: vcmp_sgtz_v16i8:
270 ; CHECK: @ %bb.0: @ %entry
271 ; CHECK-NEXT: vcmp.s8 gt, q0, zr
272 ; CHECK-NEXT: vpsel q0, q1, q2
275 %c = icmp sgt <16 x i8> %src, zeroinitializer
276 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
280 define arm_aapcs_vfpcc <16 x i8> @vcmp_sgez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
281 ; CHECK-LABEL: vcmp_sgez_v16i8:
282 ; CHECK: @ %bb.0: @ %entry
283 ; CHECK-NEXT: vcmp.s8 ge, q0, zr
284 ; CHECK-NEXT: vpsel q0, q1, q2
287 %c = icmp sge <16 x i8> %src, zeroinitializer
288 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
292 define arm_aapcs_vfpcc <16 x i8> @vcmp_sltz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
293 ; CHECK-LABEL: vcmp_sltz_v16i8:
294 ; CHECK: @ %bb.0: @ %entry
295 ; CHECK-NEXT: vcmp.s8 lt, q0, zr
296 ; CHECK-NEXT: vpsel q0, q1, q2
299 %c = icmp slt <16 x i8> %src, zeroinitializer
300 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
304 define arm_aapcs_vfpcc <16 x i8> @vcmp_slez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
305 ; CHECK-LABEL: vcmp_slez_v16i8:
306 ; CHECK: @ %bb.0: @ %entry
307 ; CHECK-NEXT: vcmp.s8 le, q0, zr
308 ; CHECK-NEXT: vpsel q0, q1, q2
311 %c = icmp sle <16 x i8> %src, zeroinitializer
312 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
316 define arm_aapcs_vfpcc <16 x i8> @vcmp_ugtz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
317 ; CHECK-LABEL: vcmp_ugtz_v16i8:
318 ; CHECK: @ %bb.0: @ %entry
319 ; CHECK-NEXT: vcmp.i8 ne, q0, zr
320 ; CHECK-NEXT: vpsel q0, q1, q2
323 %c = icmp ugt <16 x i8> %src, zeroinitializer
324 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
328 define arm_aapcs_vfpcc <16 x i8> @vcmp_ugez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
329 ; CHECK-LABEL: vcmp_ugez_v16i8:
330 ; CHECK: @ %bb.0: @ %entry
331 ; CHECK-NEXT: vmov q0, q1
334 %c = icmp uge <16 x i8> %src, zeroinitializer
335 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
339 define arm_aapcs_vfpcc <16 x i8> @vcmp_ultz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
340 ; CHECK-LABEL: vcmp_ultz_v16i8:
341 ; CHECK: @ %bb.0: @ %entry
342 ; CHECK-NEXT: vmov q0, q2
345 %c = icmp ult <16 x i8> %src, zeroinitializer
346 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
350 define arm_aapcs_vfpcc <16 x i8> @vcmp_ulez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
351 ; CHECK-LABEL: vcmp_ulez_v16i8:
352 ; CHECK: @ %bb.0: @ %entry
353 ; CHECK-NEXT: vmov.i32 q3, #0x0
354 ; CHECK-NEXT: vcmp.u8 cs, q3, q0
355 ; CHECK-NEXT: vpsel q0, q1, q2
358 %c = icmp ule <16 x i8> %src, zeroinitializer
359 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
364 define arm_aapcs_vfpcc <2 x i64> @vcmp_eqz_v2i64(<2 x i64> %src, <2 x i64> %a, <2 x i64> %b) {
365 ; CHECK-LABEL: vcmp_eqz_v2i64:
366 ; CHECK: @ %bb.0: @ %entry
367 ; CHECK-NEXT: vmov r0, r1, d0
368 ; CHECK-NEXT: orrs r0, r1
369 ; CHECK-NEXT: mov.w r1, #0
370 ; CHECK-NEXT: csetm r0, eq
371 ; CHECK-NEXT: bfi r1, r0, #0, #8
372 ; CHECK-NEXT: vmov r0, r2, d1
373 ; CHECK-NEXT: orrs r0, r2
374 ; CHECK-NEXT: csetm r0, eq
375 ; CHECK-NEXT: bfi r1, r0, #8, #8
376 ; CHECK-NEXT: vmsr p0, r1
377 ; CHECK-NEXT: vpsel q0, q1, q2
380 %c = icmp eq <2 x i64> %src, zeroinitializer
381 %s = select <2 x i1> %c, <2 x i64> %a, <2 x i64> %b
385 define arm_aapcs_vfpcc <2 x i32> @vcmp_eqz_v2i32(<2 x i64> %src, <2 x i32> %a, <2 x i32> %b) {
386 ; CHECK-LABEL: vcmp_eqz_v2i32:
387 ; CHECK: @ %bb.0: @ %entry
388 ; CHECK-NEXT: vmov r0, r1, d0
389 ; CHECK-NEXT: orrs r0, r1
390 ; CHECK-NEXT: mov.w r1, #0
391 ; CHECK-NEXT: csetm r0, eq
392 ; CHECK-NEXT: bfi r1, r0, #0, #8
393 ; CHECK-NEXT: vmov r0, r2, d1
394 ; CHECK-NEXT: orrs r0, r2
395 ; CHECK-NEXT: csetm r0, eq
396 ; CHECK-NEXT: bfi r1, r0, #8, #8
397 ; CHECK-NEXT: vmsr p0, r1
398 ; CHECK-NEXT: vpsel q0, q1, q2
401 %c = icmp eq <2 x i64> %src, zeroinitializer
402 %s = select <2 x i1> %c, <2 x i32> %a, <2 x i32> %b
409 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_eqz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
410 ; CHECK-LABEL: vcmp_r_eqz_v4i32:
411 ; CHECK: @ %bb.0: @ %entry
412 ; CHECK-NEXT: vcmp.i32 eq, q0, zr
413 ; CHECK-NEXT: vpsel q0, q1, q2
416 %c = icmp eq <4 x i32> zeroinitializer, %src
417 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
421 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_nez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
422 ; CHECK-LABEL: vcmp_r_nez_v4i32:
423 ; CHECK: @ %bb.0: @ %entry
424 ; CHECK-NEXT: vcmp.i32 ne, q0, zr
425 ; CHECK-NEXT: vpsel q0, q1, q2
428 %c = icmp ne <4 x i32> zeroinitializer, %src
429 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
433 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_sgtz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
434 ; CHECK-LABEL: vcmp_r_sgtz_v4i32:
435 ; CHECK: @ %bb.0: @ %entry
436 ; CHECK-NEXT: vcmp.s32 lt, q0, zr
437 ; CHECK-NEXT: vpsel q0, q1, q2
440 %c = icmp sgt <4 x i32> zeroinitializer, %src
441 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
445 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_sgez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
446 ; CHECK-LABEL: vcmp_r_sgez_v4i32:
447 ; CHECK: @ %bb.0: @ %entry
448 ; CHECK-NEXT: vcmp.s32 le, q0, zr
449 ; CHECK-NEXT: vpsel q0, q1, q2
452 %c = icmp sge <4 x i32> zeroinitializer, %src
453 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
457 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_sltz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
458 ; CHECK-LABEL: vcmp_r_sltz_v4i32:
459 ; CHECK: @ %bb.0: @ %entry
460 ; CHECK-NEXT: vcmp.s32 gt, q0, zr
461 ; CHECK-NEXT: vpsel q0, q1, q2
464 %c = icmp slt <4 x i32> zeroinitializer, %src
465 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
469 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_slez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
470 ; CHECK-LABEL: vcmp_r_slez_v4i32:
471 ; CHECK: @ %bb.0: @ %entry
472 ; CHECK-NEXT: vcmp.s32 ge, q0, zr
473 ; CHECK-NEXT: vpsel q0, q1, q2
476 %c = icmp sle <4 x i32> zeroinitializer, %src
477 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
481 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_ugtz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
482 ; CHECK-LABEL: vcmp_r_ugtz_v4i32:
483 ; CHECK: @ %bb.0: @ %entry
484 ; CHECK-NEXT: vmov q0, q2
487 %c = icmp ugt <4 x i32> zeroinitializer, %src
488 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
492 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_ugez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
493 ; CHECK-LABEL: vcmp_r_ugez_v4i32:
494 ; CHECK: @ %bb.0: @ %entry
495 ; CHECK-NEXT: vmov.i32 q3, #0x0
496 ; CHECK-NEXT: vcmp.u32 cs, q3, q0
497 ; CHECK-NEXT: vpsel q0, q1, q2
500 %c = icmp uge <4 x i32> zeroinitializer, %src
501 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
505 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_ultz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
506 ; CHECK-LABEL: vcmp_r_ultz_v4i32:
507 ; CHECK: @ %bb.0: @ %entry
508 ; CHECK-NEXT: vcmp.i32 ne, q0, zr
509 ; CHECK-NEXT: vpsel q0, q1, q2
512 %c = icmp ult <4 x i32> zeroinitializer, %src
513 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
517 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_ulez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
518 ; CHECK-LABEL: vcmp_r_ulez_v4i32:
519 ; CHECK: @ %bb.0: @ %entry
520 ; CHECK-NEXT: vmov q0, q1
523 %c = icmp ule <4 x i32> zeroinitializer, %src
524 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
529 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_eqz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
530 ; CHECK-LABEL: vcmp_r_eqz_v8i16:
531 ; CHECK: @ %bb.0: @ %entry
532 ; CHECK-NEXT: vcmp.i16 eq, q0, zr
533 ; CHECK-NEXT: vpsel q0, q1, q2
536 %c = icmp eq <8 x i16> zeroinitializer, %src
537 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
541 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_nez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
542 ; CHECK-LABEL: vcmp_r_nez_v8i16:
543 ; CHECK: @ %bb.0: @ %entry
544 ; CHECK-NEXT: vcmp.i16 ne, q0, zr
545 ; CHECK-NEXT: vpsel q0, q1, q2
548 %c = icmp ne <8 x i16> zeroinitializer, %src
549 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
553 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_sgtz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
554 ; CHECK-LABEL: vcmp_r_sgtz_v8i16:
555 ; CHECK: @ %bb.0: @ %entry
556 ; CHECK-NEXT: vcmp.s16 lt, q0, zr
557 ; CHECK-NEXT: vpsel q0, q1, q2
560 %c = icmp sgt <8 x i16> zeroinitializer, %src
561 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
565 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_sgez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
566 ; CHECK-LABEL: vcmp_r_sgez_v8i16:
567 ; CHECK: @ %bb.0: @ %entry
568 ; CHECK-NEXT: vcmp.s16 le, q0, zr
569 ; CHECK-NEXT: vpsel q0, q1, q2
572 %c = icmp sge <8 x i16> zeroinitializer, %src
573 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
577 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_sltz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
578 ; CHECK-LABEL: vcmp_r_sltz_v8i16:
579 ; CHECK: @ %bb.0: @ %entry
580 ; CHECK-NEXT: vcmp.s16 gt, q0, zr
581 ; CHECK-NEXT: vpsel q0, q1, q2
584 %c = icmp slt <8 x i16> zeroinitializer, %src
585 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
589 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_slez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
590 ; CHECK-LABEL: vcmp_r_slez_v8i16:
591 ; CHECK: @ %bb.0: @ %entry
592 ; CHECK-NEXT: vcmp.s16 ge, q0, zr
593 ; CHECK-NEXT: vpsel q0, q1, q2
596 %c = icmp sle <8 x i16> zeroinitializer, %src
597 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
601 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_ugtz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
602 ; CHECK-LABEL: vcmp_r_ugtz_v8i16:
603 ; CHECK: @ %bb.0: @ %entry
604 ; CHECK-NEXT: vmov q0, q2
607 %c = icmp ugt <8 x i16> zeroinitializer, %src
608 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
612 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_ugez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
613 ; CHECK-LABEL: vcmp_r_ugez_v8i16:
614 ; CHECK: @ %bb.0: @ %entry
615 ; CHECK-NEXT: vmov.i32 q3, #0x0
616 ; CHECK-NEXT: vcmp.u16 cs, q3, q0
617 ; CHECK-NEXT: vpsel q0, q1, q2
620 %c = icmp uge <8 x i16> zeroinitializer, %src
621 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
625 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_ultz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
626 ; CHECK-LABEL: vcmp_r_ultz_v8i16:
627 ; CHECK: @ %bb.0: @ %entry
628 ; CHECK-NEXT: vcmp.i16 ne, q0, zr
629 ; CHECK-NEXT: vpsel q0, q1, q2
632 %c = icmp ult <8 x i16> zeroinitializer, %src
633 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
637 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_ulez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
638 ; CHECK-LABEL: vcmp_r_ulez_v8i16:
639 ; CHECK: @ %bb.0: @ %entry
640 ; CHECK-NEXT: vmov q0, q1
643 %c = icmp ule <8 x i16> zeroinitializer, %src
644 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
649 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_eqz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
650 ; CHECK-LABEL: vcmp_r_eqz_v16i8:
651 ; CHECK: @ %bb.0: @ %entry
652 ; CHECK-NEXT: vcmp.i8 eq, q0, zr
653 ; CHECK-NEXT: vpsel q0, q1, q2
656 %c = icmp eq <16 x i8> zeroinitializer, %src
657 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
661 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_nez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
662 ; CHECK-LABEL: vcmp_r_nez_v16i8:
663 ; CHECK: @ %bb.0: @ %entry
664 ; CHECK-NEXT: vcmp.i8 ne, q0, zr
665 ; CHECK-NEXT: vpsel q0, q1, q2
668 %c = icmp ne <16 x i8> zeroinitializer, %src
669 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
673 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_sgtz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
674 ; CHECK-LABEL: vcmp_r_sgtz_v16i8:
675 ; CHECK: @ %bb.0: @ %entry
676 ; CHECK-NEXT: vcmp.s8 lt, q0, zr
677 ; CHECK-NEXT: vpsel q0, q1, q2
680 %c = icmp sgt <16 x i8> zeroinitializer, %src
681 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
685 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_sgez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
686 ; CHECK-LABEL: vcmp_r_sgez_v16i8:
687 ; CHECK: @ %bb.0: @ %entry
688 ; CHECK-NEXT: vcmp.s8 le, q0, zr
689 ; CHECK-NEXT: vpsel q0, q1, q2
692 %c = icmp sge <16 x i8> zeroinitializer, %src
693 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
697 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_sltz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
698 ; CHECK-LABEL: vcmp_r_sltz_v16i8:
699 ; CHECK: @ %bb.0: @ %entry
700 ; CHECK-NEXT: vcmp.s8 gt, q0, zr
701 ; CHECK-NEXT: vpsel q0, q1, q2
704 %c = icmp slt <16 x i8> zeroinitializer, %src
705 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
709 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_slez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
710 ; CHECK-LABEL: vcmp_r_slez_v16i8:
711 ; CHECK: @ %bb.0: @ %entry
712 ; CHECK-NEXT: vcmp.s8 ge, q0, zr
713 ; CHECK-NEXT: vpsel q0, q1, q2
716 %c = icmp sle <16 x i8> zeroinitializer, %src
717 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
721 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_ugtz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
722 ; CHECK-LABEL: vcmp_r_ugtz_v16i8:
723 ; CHECK: @ %bb.0: @ %entry
724 ; CHECK-NEXT: vmov q0, q2
727 %c = icmp ugt <16 x i8> zeroinitializer, %src
728 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
732 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_ugez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
733 ; CHECK-LABEL: vcmp_r_ugez_v16i8:
734 ; CHECK: @ %bb.0: @ %entry
735 ; CHECK-NEXT: vmov.i32 q3, #0x0
736 ; CHECK-NEXT: vcmp.u8 cs, q3, q0
737 ; CHECK-NEXT: vpsel q0, q1, q2
740 %c = icmp uge <16 x i8> zeroinitializer, %src
741 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
745 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_ultz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
746 ; CHECK-LABEL: vcmp_r_ultz_v16i8:
747 ; CHECK: @ %bb.0: @ %entry
748 ; CHECK-NEXT: vcmp.i8 ne, q0, zr
749 ; CHECK-NEXT: vpsel q0, q1, q2
752 %c = icmp ult <16 x i8> zeroinitializer, %src
753 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
757 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_ulez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
758 ; CHECK-LABEL: vcmp_r_ulez_v16i8:
759 ; CHECK: @ %bb.0: @ %entry
760 ; CHECK-NEXT: vmov q0, q1
763 %c = icmp ule <16 x i8> zeroinitializer, %src
764 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
769 define arm_aapcs_vfpcc <2 x i64> @vcmp_r_eqz_v2i64(<2 x i64> %src, <2 x i64> %a, <2 x i64> %b) {
770 ; CHECK-LABEL: vcmp_r_eqz_v2i64:
771 ; CHECK: @ %bb.0: @ %entry
772 ; CHECK-NEXT: vmov r0, r1, d0
773 ; CHECK-NEXT: orrs r0, r1
774 ; CHECK-NEXT: mov.w r1, #0
775 ; CHECK-NEXT: csetm r0, eq
776 ; CHECK-NEXT: bfi r1, r0, #0, #8
777 ; CHECK-NEXT: vmov r0, r2, d1
778 ; CHECK-NEXT: orrs r0, r2
779 ; CHECK-NEXT: csetm r0, eq
780 ; CHECK-NEXT: bfi r1, r0, #8, #8
781 ; CHECK-NEXT: vmsr p0, r1
782 ; CHECK-NEXT: vpsel q0, q1, q2
785 %c = icmp eq <2 x i64> zeroinitializer, %src
786 %s = select <2 x i1> %c, <2 x i64> %a, <2 x i64> %b
790 define arm_aapcs_vfpcc <2 x i32> @vcmp_r_eqz_v2i32(<2 x i64> %src, <2 x i32> %a, <2 x i32> %b) {
791 ; CHECK-LABEL: vcmp_r_eqz_v2i32:
792 ; CHECK: @ %bb.0: @ %entry
793 ; CHECK-NEXT: vmov r0, r1, d0
794 ; CHECK-NEXT: orrs r0, r1
795 ; CHECK-NEXT: mov.w r1, #0
796 ; CHECK-NEXT: csetm r0, eq
797 ; CHECK-NEXT: bfi r1, r0, #0, #8
798 ; CHECK-NEXT: vmov r0, r2, d1
799 ; CHECK-NEXT: orrs r0, r2
800 ; CHECK-NEXT: csetm r0, eq
801 ; CHECK-NEXT: bfi r1, r0, #8, #8
802 ; CHECK-NEXT: vmsr p0, r1
803 ; CHECK-NEXT: vpsel q0, q1, q2
806 %c = icmp eq <2 x i64> %src, zeroinitializer
807 %s = select <2 x i1> %c, <2 x i32> %a, <2 x i32> %b