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: vcmp.u32 cs, q0, zr
114 ; CHECK-NEXT: vpsel q0, q1, q2
117 %c = icmp ule <4 x i32> %src, zeroinitializer
118 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
123 define arm_aapcs_vfpcc <8 x i16> @vcmp_eqz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
124 ; CHECK-LABEL: vcmp_eqz_v8i16:
125 ; CHECK: @ %bb.0: @ %entry
126 ; CHECK-NEXT: vcmp.i16 eq, q0, zr
127 ; CHECK-NEXT: vpsel q0, q1, q2
130 %c = icmp eq <8 x i16> %src, zeroinitializer
131 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
135 define arm_aapcs_vfpcc <8 x i16> @vcmp_nez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
136 ; CHECK-LABEL: vcmp_nez_v8i16:
137 ; CHECK: @ %bb.0: @ %entry
138 ; CHECK-NEXT: vcmp.i16 ne, q0, zr
139 ; CHECK-NEXT: vpsel q0, q1, q2
142 %c = icmp ne <8 x i16> %src, zeroinitializer
143 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
147 define arm_aapcs_vfpcc <8 x i16> @vcmp_sgtz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
148 ; CHECK-LABEL: vcmp_sgtz_v8i16:
149 ; CHECK: @ %bb.0: @ %entry
150 ; CHECK-NEXT: vcmp.s16 gt, q0, zr
151 ; CHECK-NEXT: vpsel q0, q1, q2
154 %c = icmp sgt <8 x i16> %src, zeroinitializer
155 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
159 define arm_aapcs_vfpcc <8 x i16> @vcmp_sgez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
160 ; CHECK-LABEL: vcmp_sgez_v8i16:
161 ; CHECK: @ %bb.0: @ %entry
162 ; CHECK-NEXT: vcmp.s16 ge, q0, zr
163 ; CHECK-NEXT: vpsel q0, q1, q2
166 %c = icmp sge <8 x i16> %src, zeroinitializer
167 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
171 define arm_aapcs_vfpcc <8 x i16> @vcmp_sltz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
172 ; CHECK-LABEL: vcmp_sltz_v8i16:
173 ; CHECK: @ %bb.0: @ %entry
174 ; CHECK-NEXT: vcmp.s16 lt, q0, zr
175 ; CHECK-NEXT: vpsel q0, q1, q2
178 %c = icmp slt <8 x i16> %src, zeroinitializer
179 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
183 define arm_aapcs_vfpcc <8 x i16> @vcmp_slez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
184 ; CHECK-LABEL: vcmp_slez_v8i16:
185 ; CHECK: @ %bb.0: @ %entry
186 ; CHECK-NEXT: vcmp.s16 le, q0, zr
187 ; CHECK-NEXT: vpsel q0, q1, q2
190 %c = icmp sle <8 x i16> %src, zeroinitializer
191 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
195 define arm_aapcs_vfpcc <8 x i16> @vcmp_ugtz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
196 ; CHECK-LABEL: vcmp_ugtz_v8i16:
197 ; CHECK: @ %bb.0: @ %entry
198 ; CHECK-NEXT: vcmp.i16 ne, q0, zr
199 ; CHECK-NEXT: vpsel q0, q1, q2
202 %c = icmp ugt <8 x i16> %src, zeroinitializer
203 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
207 define arm_aapcs_vfpcc <8 x i16> @vcmp_ugez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
208 ; CHECK-LABEL: vcmp_ugez_v8i16:
209 ; CHECK: @ %bb.0: @ %entry
210 ; CHECK-NEXT: vmov q0, q1
213 %c = icmp uge <8 x i16> %src, zeroinitializer
214 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
218 define arm_aapcs_vfpcc <8 x i16> @vcmp_ultz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
219 ; CHECK-LABEL: vcmp_ultz_v8i16:
220 ; CHECK: @ %bb.0: @ %entry
221 ; CHECK-NEXT: vmov q0, q2
224 %c = icmp ult <8 x i16> %src, zeroinitializer
225 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
229 define arm_aapcs_vfpcc <8 x i16> @vcmp_ulez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
230 ; CHECK-LABEL: vcmp_ulez_v8i16:
231 ; CHECK: @ %bb.0: @ %entry
232 ; CHECK-NEXT: vcmp.u16 cs, q0, zr
233 ; CHECK-NEXT: vpsel q0, q1, q2
236 %c = icmp ule <8 x i16> %src, zeroinitializer
237 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
242 define arm_aapcs_vfpcc <16 x i8> @vcmp_eqz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
243 ; CHECK-LABEL: vcmp_eqz_v16i8:
244 ; CHECK: @ %bb.0: @ %entry
245 ; CHECK-NEXT: vcmp.i8 eq, q0, zr
246 ; CHECK-NEXT: vpsel q0, q1, q2
249 %c = icmp eq <16 x i8> %src, zeroinitializer
250 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
254 define arm_aapcs_vfpcc <16 x i8> @vcmp_nez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
255 ; CHECK-LABEL: vcmp_nez_v16i8:
256 ; CHECK: @ %bb.0: @ %entry
257 ; CHECK-NEXT: vcmp.i8 ne, q0, zr
258 ; CHECK-NEXT: vpsel q0, q1, q2
261 %c = icmp ne <16 x i8> %src, zeroinitializer
262 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
266 define arm_aapcs_vfpcc <16 x i8> @vcmp_sgtz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
267 ; CHECK-LABEL: vcmp_sgtz_v16i8:
268 ; CHECK: @ %bb.0: @ %entry
269 ; CHECK-NEXT: vcmp.s8 gt, q0, zr
270 ; CHECK-NEXT: vpsel q0, q1, q2
273 %c = icmp sgt <16 x i8> %src, zeroinitializer
274 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
278 define arm_aapcs_vfpcc <16 x i8> @vcmp_sgez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
279 ; CHECK-LABEL: vcmp_sgez_v16i8:
280 ; CHECK: @ %bb.0: @ %entry
281 ; CHECK-NEXT: vcmp.s8 ge, q0, zr
282 ; CHECK-NEXT: vpsel q0, q1, q2
285 %c = icmp sge <16 x i8> %src, zeroinitializer
286 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
290 define arm_aapcs_vfpcc <16 x i8> @vcmp_sltz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
291 ; CHECK-LABEL: vcmp_sltz_v16i8:
292 ; CHECK: @ %bb.0: @ %entry
293 ; CHECK-NEXT: vcmp.s8 lt, q0, zr
294 ; CHECK-NEXT: vpsel q0, q1, q2
297 %c = icmp slt <16 x i8> %src, zeroinitializer
298 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
302 define arm_aapcs_vfpcc <16 x i8> @vcmp_slez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
303 ; CHECK-LABEL: vcmp_slez_v16i8:
304 ; CHECK: @ %bb.0: @ %entry
305 ; CHECK-NEXT: vcmp.s8 le, q0, zr
306 ; CHECK-NEXT: vpsel q0, q1, q2
309 %c = icmp sle <16 x i8> %src, zeroinitializer
310 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
314 define arm_aapcs_vfpcc <16 x i8> @vcmp_ugtz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
315 ; CHECK-LABEL: vcmp_ugtz_v16i8:
316 ; CHECK: @ %bb.0: @ %entry
317 ; CHECK-NEXT: vcmp.i8 ne, q0, zr
318 ; CHECK-NEXT: vpsel q0, q1, q2
321 %c = icmp ugt <16 x i8> %src, zeroinitializer
322 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
326 define arm_aapcs_vfpcc <16 x i8> @vcmp_ugez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
327 ; CHECK-LABEL: vcmp_ugez_v16i8:
328 ; CHECK: @ %bb.0: @ %entry
329 ; CHECK-NEXT: vmov q0, q1
332 %c = icmp uge <16 x i8> %src, zeroinitializer
333 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
337 define arm_aapcs_vfpcc <16 x i8> @vcmp_ultz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
338 ; CHECK-LABEL: vcmp_ultz_v16i8:
339 ; CHECK: @ %bb.0: @ %entry
340 ; CHECK-NEXT: vmov q0, q2
343 %c = icmp ult <16 x i8> %src, zeroinitializer
344 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
348 define arm_aapcs_vfpcc <16 x i8> @vcmp_ulez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
349 ; CHECK-LABEL: vcmp_ulez_v16i8:
350 ; CHECK: @ %bb.0: @ %entry
351 ; CHECK-NEXT: vcmp.u8 cs, q0, zr
352 ; CHECK-NEXT: vpsel q0, q1, q2
355 %c = icmp ule <16 x i8> %src, zeroinitializer
356 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
361 define arm_aapcs_vfpcc <2 x i64> @vcmp_eqz_v2i64(<2 x i64> %src, <2 x i64> %a, <2 x i64> %b) {
362 ; CHECK-LABEL: vcmp_eqz_v2i64:
363 ; CHECK: @ %bb.0: @ %entry
364 ; CHECK-NEXT: vmov r0, r1, d1
365 ; CHECK-NEXT: orrs r0, r1
366 ; CHECK-NEXT: vmov r1, r2, d0
367 ; CHECK-NEXT: cset r0, eq
368 ; CHECK-NEXT: cmp r0, #0
369 ; CHECK-NEXT: csetm r0, ne
370 ; CHECK-NEXT: orrs r1, r2
371 ; CHECK-NEXT: cset r1, eq
372 ; CHECK-NEXT: cmp r1, #0
373 ; CHECK-NEXT: csetm r1, ne
374 ; CHECK-NEXT: vmov q0[2], q0[0], r1, r0
375 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r0
376 ; CHECK-NEXT: vbic q2, q2, q0
377 ; CHECK-NEXT: vand q0, q1, q0
378 ; CHECK-NEXT: vorr q0, q0, q2
381 %c = icmp eq <2 x i64> %src, zeroinitializer
382 %s = select <2 x i1> %c, <2 x i64> %a, <2 x i64> %b
386 define arm_aapcs_vfpcc <2 x i32> @vcmp_eqz_v2i32(<2 x i64> %src, <2 x i32> %a, <2 x i32> %b) {
387 ; CHECK-LABEL: vcmp_eqz_v2i32:
388 ; CHECK: @ %bb.0: @ %entry
389 ; CHECK-NEXT: vmov r0, r1, d1
390 ; CHECK-NEXT: orrs r0, r1
391 ; CHECK-NEXT: vmov r1, r2, d0
392 ; CHECK-NEXT: cset r0, eq
393 ; CHECK-NEXT: cmp r0, #0
394 ; CHECK-NEXT: csetm r0, ne
395 ; CHECK-NEXT: orrs r1, r2
396 ; CHECK-NEXT: cset r1, eq
397 ; CHECK-NEXT: cmp r1, #0
398 ; CHECK-NEXT: csetm r1, ne
399 ; CHECK-NEXT: vmov q0[2], q0[0], r1, r0
400 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r0
401 ; CHECK-NEXT: vbic q2, q2, q0
402 ; CHECK-NEXT: vand q0, q1, q0
403 ; CHECK-NEXT: vorr q0, q0, q2
406 %c = icmp eq <2 x i64> %src, zeroinitializer
407 %s = select <2 x i1> %c, <2 x i32> %a, <2 x i32> %b
414 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_eqz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
415 ; CHECK-LABEL: vcmp_r_eqz_v4i32:
416 ; CHECK: @ %bb.0: @ %entry
417 ; CHECK-NEXT: vcmp.i32 eq, q0, zr
418 ; CHECK-NEXT: vpsel q0, q1, q2
421 %c = icmp eq <4 x i32> zeroinitializer, %src
422 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
426 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_nez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
427 ; CHECK-LABEL: vcmp_r_nez_v4i32:
428 ; CHECK: @ %bb.0: @ %entry
429 ; CHECK-NEXT: vcmp.i32 ne, q0, zr
430 ; CHECK-NEXT: vpsel q0, q1, q2
433 %c = icmp ne <4 x i32> zeroinitializer, %src
434 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
438 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_sgtz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
439 ; CHECK-LABEL: vcmp_r_sgtz_v4i32:
440 ; CHECK: @ %bb.0: @ %entry
441 ; CHECK-NEXT: vcmp.s32 lt, q0, zr
442 ; CHECK-NEXT: vpsel q0, q1, q2
445 %c = icmp sgt <4 x i32> zeroinitializer, %src
446 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
450 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_sgez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
451 ; CHECK-LABEL: vcmp_r_sgez_v4i32:
452 ; CHECK: @ %bb.0: @ %entry
453 ; CHECK-NEXT: vcmp.s32 le, q0, zr
454 ; CHECK-NEXT: vpsel q0, q1, q2
457 %c = icmp sge <4 x i32> zeroinitializer, %src
458 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
462 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_sltz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
463 ; CHECK-LABEL: vcmp_r_sltz_v4i32:
464 ; CHECK: @ %bb.0: @ %entry
465 ; CHECK-NEXT: vcmp.s32 gt, q0, zr
466 ; CHECK-NEXT: vpsel q0, q1, q2
469 %c = icmp slt <4 x i32> zeroinitializer, %src
470 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
474 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_slez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
475 ; CHECK-LABEL: vcmp_r_slez_v4i32:
476 ; CHECK: @ %bb.0: @ %entry
477 ; CHECK-NEXT: vcmp.s32 ge, q0, zr
478 ; CHECK-NEXT: vpsel q0, q1, q2
481 %c = icmp sle <4 x i32> zeroinitializer, %src
482 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
486 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_ugtz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
487 ; CHECK-LABEL: vcmp_r_ugtz_v4i32:
488 ; CHECK: @ %bb.0: @ %entry
489 ; CHECK-NEXT: vmov q0, q2
492 %c = icmp ugt <4 x i32> zeroinitializer, %src
493 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
497 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_ugez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
498 ; CHECK-LABEL: vcmp_r_ugez_v4i32:
499 ; CHECK: @ %bb.0: @ %entry
500 ; CHECK-NEXT: vcmp.u32 cs, q0, zr
501 ; CHECK-NEXT: vpsel q0, q1, q2
504 %c = icmp uge <4 x i32> zeroinitializer, %src
505 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
509 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_ultz_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
510 ; CHECK-LABEL: vcmp_r_ultz_v4i32:
511 ; CHECK: @ %bb.0: @ %entry
512 ; CHECK-NEXT: vcmp.i32 ne, q0, zr
513 ; CHECK-NEXT: vpsel q0, q1, q2
516 %c = icmp ult <4 x i32> zeroinitializer, %src
517 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
521 define arm_aapcs_vfpcc <4 x i32> @vcmp_r_ulez_v4i32(<4 x i32> %src, <4 x i32> %a, <4 x i32> %b) {
522 ; CHECK-LABEL: vcmp_r_ulez_v4i32:
523 ; CHECK: @ %bb.0: @ %entry
524 ; CHECK-NEXT: vmov q0, q1
527 %c = icmp ule <4 x i32> zeroinitializer, %src
528 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
533 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_eqz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
534 ; CHECK-LABEL: vcmp_r_eqz_v8i16:
535 ; CHECK: @ %bb.0: @ %entry
536 ; CHECK-NEXT: vcmp.i16 eq, q0, zr
537 ; CHECK-NEXT: vpsel q0, q1, q2
540 %c = icmp eq <8 x i16> zeroinitializer, %src
541 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
545 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_nez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
546 ; CHECK-LABEL: vcmp_r_nez_v8i16:
547 ; CHECK: @ %bb.0: @ %entry
548 ; CHECK-NEXT: vcmp.i16 ne, q0, zr
549 ; CHECK-NEXT: vpsel q0, q1, q2
552 %c = icmp ne <8 x i16> zeroinitializer, %src
553 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
557 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_sgtz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
558 ; CHECK-LABEL: vcmp_r_sgtz_v8i16:
559 ; CHECK: @ %bb.0: @ %entry
560 ; CHECK-NEXT: vcmp.s16 lt, q0, zr
561 ; CHECK-NEXT: vpsel q0, q1, q2
564 %c = icmp sgt <8 x i16> zeroinitializer, %src
565 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
569 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_sgez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
570 ; CHECK-LABEL: vcmp_r_sgez_v8i16:
571 ; CHECK: @ %bb.0: @ %entry
572 ; CHECK-NEXT: vcmp.s16 le, q0, zr
573 ; CHECK-NEXT: vpsel q0, q1, q2
576 %c = icmp sge <8 x i16> zeroinitializer, %src
577 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
581 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_sltz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
582 ; CHECK-LABEL: vcmp_r_sltz_v8i16:
583 ; CHECK: @ %bb.0: @ %entry
584 ; CHECK-NEXT: vcmp.s16 gt, q0, zr
585 ; CHECK-NEXT: vpsel q0, q1, q2
588 %c = icmp slt <8 x i16> zeroinitializer, %src
589 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
593 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_slez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
594 ; CHECK-LABEL: vcmp_r_slez_v8i16:
595 ; CHECK: @ %bb.0: @ %entry
596 ; CHECK-NEXT: vcmp.s16 ge, q0, zr
597 ; CHECK-NEXT: vpsel q0, q1, q2
600 %c = icmp sle <8 x i16> zeroinitializer, %src
601 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
605 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_ugtz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
606 ; CHECK-LABEL: vcmp_r_ugtz_v8i16:
607 ; CHECK: @ %bb.0: @ %entry
608 ; CHECK-NEXT: vmov q0, q2
611 %c = icmp ugt <8 x i16> zeroinitializer, %src
612 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
616 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_ugez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
617 ; CHECK-LABEL: vcmp_r_ugez_v8i16:
618 ; CHECK: @ %bb.0: @ %entry
619 ; CHECK-NEXT: vcmp.u16 cs, q0, zr
620 ; CHECK-NEXT: vpsel q0, q1, q2
623 %c = icmp uge <8 x i16> zeroinitializer, %src
624 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
628 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_ultz_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
629 ; CHECK-LABEL: vcmp_r_ultz_v8i16:
630 ; CHECK: @ %bb.0: @ %entry
631 ; CHECK-NEXT: vcmp.i16 ne, q0, zr
632 ; CHECK-NEXT: vpsel q0, q1, q2
635 %c = icmp ult <8 x i16> zeroinitializer, %src
636 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
640 define arm_aapcs_vfpcc <8 x i16> @vcmp_r_ulez_v8i16(<8 x i16> %src, <8 x i16> %a, <8 x i16> %b) {
641 ; CHECK-LABEL: vcmp_r_ulez_v8i16:
642 ; CHECK: @ %bb.0: @ %entry
643 ; CHECK-NEXT: vmov q0, q1
646 %c = icmp ule <8 x i16> zeroinitializer, %src
647 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
652 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_eqz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
653 ; CHECK-LABEL: vcmp_r_eqz_v16i8:
654 ; CHECK: @ %bb.0: @ %entry
655 ; CHECK-NEXT: vcmp.i8 eq, q0, zr
656 ; CHECK-NEXT: vpsel q0, q1, q2
659 %c = icmp eq <16 x i8> zeroinitializer, %src
660 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
664 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_nez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
665 ; CHECK-LABEL: vcmp_r_nez_v16i8:
666 ; CHECK: @ %bb.0: @ %entry
667 ; CHECK-NEXT: vcmp.i8 ne, q0, zr
668 ; CHECK-NEXT: vpsel q0, q1, q2
671 %c = icmp ne <16 x i8> zeroinitializer, %src
672 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
676 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_sgtz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
677 ; CHECK-LABEL: vcmp_r_sgtz_v16i8:
678 ; CHECK: @ %bb.0: @ %entry
679 ; CHECK-NEXT: vcmp.s8 lt, q0, zr
680 ; CHECK-NEXT: vpsel q0, q1, q2
683 %c = icmp sgt <16 x i8> zeroinitializer, %src
684 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
688 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_sgez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
689 ; CHECK-LABEL: vcmp_r_sgez_v16i8:
690 ; CHECK: @ %bb.0: @ %entry
691 ; CHECK-NEXT: vcmp.s8 le, q0, zr
692 ; CHECK-NEXT: vpsel q0, q1, q2
695 %c = icmp sge <16 x i8> zeroinitializer, %src
696 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
700 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_sltz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
701 ; CHECK-LABEL: vcmp_r_sltz_v16i8:
702 ; CHECK: @ %bb.0: @ %entry
703 ; CHECK-NEXT: vcmp.s8 gt, q0, zr
704 ; CHECK-NEXT: vpsel q0, q1, q2
707 %c = icmp slt <16 x i8> zeroinitializer, %src
708 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
712 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_slez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
713 ; CHECK-LABEL: vcmp_r_slez_v16i8:
714 ; CHECK: @ %bb.0: @ %entry
715 ; CHECK-NEXT: vcmp.s8 ge, q0, zr
716 ; CHECK-NEXT: vpsel q0, q1, q2
719 %c = icmp sle <16 x i8> zeroinitializer, %src
720 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
724 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_ugtz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
725 ; CHECK-LABEL: vcmp_r_ugtz_v16i8:
726 ; CHECK: @ %bb.0: @ %entry
727 ; CHECK-NEXT: vmov q0, q2
730 %c = icmp ugt <16 x i8> zeroinitializer, %src
731 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
735 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_ugez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
736 ; CHECK-LABEL: vcmp_r_ugez_v16i8:
737 ; CHECK: @ %bb.0: @ %entry
738 ; CHECK-NEXT: vcmp.u8 cs, q0, zr
739 ; CHECK-NEXT: vpsel q0, q1, q2
742 %c = icmp uge <16 x i8> zeroinitializer, %src
743 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
747 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_ultz_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
748 ; CHECK-LABEL: vcmp_r_ultz_v16i8:
749 ; CHECK: @ %bb.0: @ %entry
750 ; CHECK-NEXT: vcmp.i8 ne, q0, zr
751 ; CHECK-NEXT: vpsel q0, q1, q2
754 %c = icmp ult <16 x i8> zeroinitializer, %src
755 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
759 define arm_aapcs_vfpcc <16 x i8> @vcmp_r_ulez_v16i8(<16 x i8> %src, <16 x i8> %a, <16 x i8> %b) {
760 ; CHECK-LABEL: vcmp_r_ulez_v16i8:
761 ; CHECK: @ %bb.0: @ %entry
762 ; CHECK-NEXT: vmov q0, q1
765 %c = icmp ule <16 x i8> zeroinitializer, %src
766 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
771 define arm_aapcs_vfpcc <2 x i64> @vcmp_r_eqz_v2i64(<2 x i64> %src, <2 x i64> %a, <2 x i64> %b) {
772 ; CHECK-LABEL: vcmp_r_eqz_v2i64:
773 ; CHECK: @ %bb.0: @ %entry
774 ; CHECK-NEXT: vmov r0, r1, d1
775 ; CHECK-NEXT: orrs r0, r1
776 ; CHECK-NEXT: vmov r1, r2, d0
777 ; CHECK-NEXT: cset r0, eq
778 ; CHECK-NEXT: cmp r0, #0
779 ; CHECK-NEXT: csetm r0, ne
780 ; CHECK-NEXT: orrs r1, r2
781 ; CHECK-NEXT: cset r1, eq
782 ; CHECK-NEXT: cmp r1, #0
783 ; CHECK-NEXT: csetm r1, ne
784 ; CHECK-NEXT: vmov q0[2], q0[0], r1, r0
785 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r0
786 ; CHECK-NEXT: vbic q2, q2, q0
787 ; CHECK-NEXT: vand q0, q1, q0
788 ; CHECK-NEXT: vorr q0, q0, q2
791 %c = icmp eq <2 x i64> zeroinitializer, %src
792 %s = select <2 x i1> %c, <2 x i64> %a, <2 x i64> %b
796 define arm_aapcs_vfpcc <2 x i32> @vcmp_r_eqz_v2i32(<2 x i64> %src, <2 x i32> %a, <2 x i32> %b) {
797 ; CHECK-LABEL: vcmp_r_eqz_v2i32:
798 ; CHECK: @ %bb.0: @ %entry
799 ; CHECK-NEXT: vmov r0, r1, d1
800 ; CHECK-NEXT: orrs r0, r1
801 ; CHECK-NEXT: vmov r1, r2, d0
802 ; CHECK-NEXT: cset r0, eq
803 ; CHECK-NEXT: cmp r0, #0
804 ; CHECK-NEXT: csetm r0, ne
805 ; CHECK-NEXT: orrs r1, r2
806 ; CHECK-NEXT: cset r1, eq
807 ; CHECK-NEXT: cmp r1, #0
808 ; CHECK-NEXT: csetm r1, ne
809 ; CHECK-NEXT: vmov q0[2], q0[0], r1, r0
810 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r0
811 ; CHECK-NEXT: vbic q2, q2, q0
812 ; CHECK-NEXT: vand q0, q1, q0
813 ; CHECK-NEXT: vorr q0, q0, q2
816 %c = icmp eq <2 x i64> %src, zeroinitializer
817 %s = select <2 x i1> %c, <2 x i32> %a, <2 x i32> %b