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> @cmpeqz_v4i1(<4 x i32> %a, <4 x i32> %b) {
5 ; CHECK-LABEL: cmpeqz_v4i1:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: vorr q2, q0, q1
8 ; CHECK-NEXT: vcmp.i32 eq, q2, zr
9 ; CHECK-NEXT: vpsel q0, q0, q1
12 %c1 = icmp eq <4 x i32> %a, zeroinitializer
13 %c2 = icmp eq <4 x i32> %b, zeroinitializer
14 %o = and <4 x i1> %c1, %c2
15 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
19 define arm_aapcs_vfpcc <4 x i32> @cmpnez_v4i1(<4 x i32> %a, <4 x i32> %b) {
20 ; CHECK-LABEL: cmpnez_v4i1:
21 ; CHECK: @ %bb.0: @ %entry
22 ; CHECK-NEXT: vpt.i32 eq, q0, zr
23 ; CHECK-NEXT: vcmpt.i32 ne, q1, zr
24 ; CHECK-NEXT: vpsel q0, q0, q1
27 %c1 = icmp eq <4 x i32> %a, zeroinitializer
28 %c2 = icmp ne <4 x i32> %b, zeroinitializer
29 %o = and <4 x i1> %c1, %c2
30 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
34 define arm_aapcs_vfpcc <4 x i32> @cmpsltz_v4i1(<4 x i32> %a, <4 x i32> %b) {
35 ; CHECK-LABEL: cmpsltz_v4i1:
36 ; CHECK: @ %bb.0: @ %entry
37 ; CHECK-NEXT: vpt.i32 eq, q0, zr
38 ; CHECK-NEXT: vcmpt.s32 lt, q1, zr
39 ; CHECK-NEXT: vpsel q0, q0, q1
42 %c1 = icmp eq <4 x i32> %a, zeroinitializer
43 %c2 = icmp slt <4 x i32> %b, zeroinitializer
44 %o = and <4 x i1> %c1, %c2
45 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
49 define arm_aapcs_vfpcc <4 x i32> @cmpsgtz_v4i1(<4 x i32> %a, <4 x i32> %b) {
50 ; CHECK-LABEL: cmpsgtz_v4i1:
51 ; CHECK: @ %bb.0: @ %entry
52 ; CHECK-NEXT: vpt.i32 eq, q0, zr
53 ; CHECK-NEXT: vcmpt.s32 gt, q1, zr
54 ; CHECK-NEXT: vpsel q0, q0, q1
57 %c1 = icmp eq <4 x i32> %a, zeroinitializer
58 %c2 = icmp sgt <4 x i32> %b, zeroinitializer
59 %o = and <4 x i1> %c1, %c2
60 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
64 define arm_aapcs_vfpcc <4 x i32> @cmpslez_v4i1(<4 x i32> %a, <4 x i32> %b) {
65 ; CHECK-LABEL: cmpslez_v4i1:
66 ; CHECK: @ %bb.0: @ %entry
67 ; CHECK-NEXT: vpt.i32 eq, q0, zr
68 ; CHECK-NEXT: vcmpt.s32 le, q1, zr
69 ; CHECK-NEXT: vpsel q0, q0, q1
72 %c1 = icmp eq <4 x i32> %a, zeroinitializer
73 %c2 = icmp sle <4 x i32> %b, zeroinitializer
74 %o = and <4 x i1> %c1, %c2
75 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
79 define arm_aapcs_vfpcc <4 x i32> @cmpsgez_v4i1(<4 x i32> %a, <4 x i32> %b) {
80 ; CHECK-LABEL: cmpsgez_v4i1:
81 ; CHECK: @ %bb.0: @ %entry
82 ; CHECK-NEXT: vpt.i32 eq, q0, zr
83 ; CHECK-NEXT: vcmpt.s32 ge, q1, zr
84 ; CHECK-NEXT: vpsel q0, q0, q1
87 %c1 = icmp eq <4 x i32> %a, zeroinitializer
88 %c2 = icmp sge <4 x i32> %b, zeroinitializer
89 %o = and <4 x i1> %c1, %c2
90 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
94 define arm_aapcs_vfpcc <4 x i32> @cmpultz_v4i1(<4 x i32> %a, <4 x i32> %b) {
95 ; CHECK-LABEL: cmpultz_v4i1:
96 ; CHECK: @ %bb.0: @ %entry
97 ; CHECK-NEXT: vmov q0, q1
100 %c1 = icmp eq <4 x i32> %a, zeroinitializer
101 %c2 = icmp ult <4 x i32> %b, zeroinitializer
102 %o = and <4 x i1> %c1, %c2
103 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
107 define arm_aapcs_vfpcc <4 x i32> @cmpugtz_v4i1(<4 x i32> %a, <4 x i32> %b) {
108 ; CHECK-LABEL: cmpugtz_v4i1:
109 ; CHECK: @ %bb.0: @ %entry
110 ; CHECK-NEXT: vpt.i32 eq, q0, zr
111 ; CHECK-NEXT: vcmpt.i32 ne, q1, zr
112 ; CHECK-NEXT: vpsel q0, q0, q1
115 %c1 = icmp eq <4 x i32> %a, zeroinitializer
116 %c2 = icmp ugt <4 x i32> %b, zeroinitializer
117 %o = and <4 x i1> %c1, %c2
118 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
122 define arm_aapcs_vfpcc <4 x i32> @cmpulez_v4i1(<4 x i32> %a, <4 x i32> %b) {
123 ; CHECK-LABEL: cmpulez_v4i1:
124 ; CHECK: @ %bb.0: @ %entry
125 ; CHECK-NEXT: vpt.i32 eq, q0, zr
126 ; CHECK-NEXT: vcmpt.u32 cs, q1, zr
127 ; CHECK-NEXT: vpsel q0, q0, q1
130 %c1 = icmp eq <4 x i32> %a, zeroinitializer
131 %c2 = icmp ule <4 x i32> %b, zeroinitializer
132 %o = and <4 x i1> %c1, %c2
133 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
137 define arm_aapcs_vfpcc <4 x i32> @cmpugez_v4i1(<4 x i32> %a, <4 x i32> %b) {
138 ; CHECK-LABEL: cmpugez_v4i1:
139 ; CHECK: @ %bb.0: @ %entry
140 ; CHECK-NEXT: vcmp.i32 eq, q0, zr
141 ; CHECK-NEXT: vpsel q0, q0, q1
144 %c1 = icmp eq <4 x i32> %a, zeroinitializer
145 %c2 = icmp uge <4 x i32> %b, zeroinitializer
146 %o = and <4 x i1> %c1, %c2
147 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
153 define arm_aapcs_vfpcc <4 x i32> @cmpeq_v4i1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
154 ; CHECK-LABEL: cmpeq_v4i1:
155 ; CHECK: @ %bb.0: @ %entry
156 ; CHECK-NEXT: vpt.i32 eq, q0, zr
157 ; CHECK-NEXT: vcmpt.i32 eq, q1, q2
158 ; CHECK-NEXT: vpsel q0, q0, q1
161 %c1 = icmp eq <4 x i32> %a, zeroinitializer
162 %c2 = icmp eq <4 x i32> %b, %c
163 %o = and <4 x i1> %c1, %c2
164 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
168 define arm_aapcs_vfpcc <4 x i32> @cmpne_v4i1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
169 ; CHECK-LABEL: cmpne_v4i1:
170 ; CHECK: @ %bb.0: @ %entry
171 ; CHECK-NEXT: vpt.i32 eq, q0, zr
172 ; CHECK-NEXT: vcmpt.i32 ne, q1, q2
173 ; CHECK-NEXT: vpsel q0, q0, q1
176 %c1 = icmp eq <4 x i32> %a, zeroinitializer
177 %c2 = icmp ne <4 x i32> %b, %c
178 %o = and <4 x i1> %c1, %c2
179 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
183 define arm_aapcs_vfpcc <4 x i32> @cmpslt_v4i1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
184 ; CHECK-LABEL: cmpslt_v4i1:
185 ; CHECK: @ %bb.0: @ %entry
186 ; CHECK-NEXT: vpt.i32 eq, q0, zr
187 ; CHECK-NEXT: vcmpt.s32 gt, q2, q1
188 ; CHECK-NEXT: vpsel q0, q0, q1
191 %c1 = icmp eq <4 x i32> %a, zeroinitializer
192 %c2 = icmp slt <4 x i32> %b, %c
193 %o = and <4 x i1> %c1, %c2
194 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
198 define arm_aapcs_vfpcc <4 x i32> @cmpsgt_v4i1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
199 ; CHECK-LABEL: cmpsgt_v4i1:
200 ; CHECK: @ %bb.0: @ %entry
201 ; CHECK-NEXT: vpt.i32 eq, q0, zr
202 ; CHECK-NEXT: vcmpt.s32 gt, q1, q2
203 ; CHECK-NEXT: vpsel q0, q0, q1
206 %c1 = icmp eq <4 x i32> %a, zeroinitializer
207 %c2 = icmp sgt <4 x i32> %b, %c
208 %o = and <4 x i1> %c1, %c2
209 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
213 define arm_aapcs_vfpcc <4 x i32> @cmpsle_v4i1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
214 ; CHECK-LABEL: cmpsle_v4i1:
215 ; CHECK: @ %bb.0: @ %entry
216 ; CHECK-NEXT: vpt.i32 eq, q0, zr
217 ; CHECK-NEXT: vcmpt.s32 ge, q2, q1
218 ; CHECK-NEXT: vpsel q0, q0, q1
221 %c1 = icmp eq <4 x i32> %a, zeroinitializer
222 %c2 = icmp sle <4 x i32> %b, %c
223 %o = and <4 x i1> %c1, %c2
224 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
228 define arm_aapcs_vfpcc <4 x i32> @cmpsge_v4i1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
229 ; CHECK-LABEL: cmpsge_v4i1:
230 ; CHECK: @ %bb.0: @ %entry
231 ; CHECK-NEXT: vpt.i32 eq, q0, zr
232 ; CHECK-NEXT: vcmpt.s32 ge, q1, q2
233 ; CHECK-NEXT: vpsel q0, q0, q1
236 %c1 = icmp eq <4 x i32> %a, zeroinitializer
237 %c2 = icmp sge <4 x i32> %b, %c
238 %o = and <4 x i1> %c1, %c2
239 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
243 define arm_aapcs_vfpcc <4 x i32> @cmpult_v4i1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
244 ; CHECK-LABEL: cmpult_v4i1:
245 ; CHECK: @ %bb.0: @ %entry
246 ; CHECK-NEXT: vpt.i32 eq, q0, zr
247 ; CHECK-NEXT: vcmpt.u32 hi, q2, q1
248 ; CHECK-NEXT: vpsel q0, q0, q1
251 %c1 = icmp eq <4 x i32> %a, zeroinitializer
252 %c2 = icmp ult <4 x i32> %b, %c
253 %o = and <4 x i1> %c1, %c2
254 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
258 define arm_aapcs_vfpcc <4 x i32> @cmpugt_v4i1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
259 ; CHECK-LABEL: cmpugt_v4i1:
260 ; CHECK: @ %bb.0: @ %entry
261 ; CHECK-NEXT: vpt.i32 eq, q0, zr
262 ; CHECK-NEXT: vcmpt.u32 hi, q1, q2
263 ; CHECK-NEXT: vpsel q0, q0, q1
266 %c1 = icmp eq <4 x i32> %a, zeroinitializer
267 %c2 = icmp ugt <4 x i32> %b, %c
268 %o = and <4 x i1> %c1, %c2
269 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
273 define arm_aapcs_vfpcc <4 x i32> @cmpule_v4i1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
274 ; CHECK-LABEL: cmpule_v4i1:
275 ; CHECK: @ %bb.0: @ %entry
276 ; CHECK-NEXT: vpt.i32 eq, q0, zr
277 ; CHECK-NEXT: vcmpt.u32 cs, q2, q1
278 ; CHECK-NEXT: vpsel q0, q0, q1
281 %c1 = icmp eq <4 x i32> %a, zeroinitializer
282 %c2 = icmp ule <4 x i32> %b, %c
283 %o = and <4 x i1> %c1, %c2
284 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
288 define arm_aapcs_vfpcc <4 x i32> @cmpuge_v4i1(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
289 ; CHECK-LABEL: cmpuge_v4i1:
290 ; CHECK: @ %bb.0: @ %entry
291 ; CHECK-NEXT: vpt.i32 eq, q0, zr
292 ; CHECK-NEXT: vcmpt.u32 cs, q1, q2
293 ; CHECK-NEXT: vpsel q0, q0, q1
296 %c1 = icmp eq <4 x i32> %a, zeroinitializer
297 %c2 = icmp uge <4 x i32> %b, %c
298 %o = and <4 x i1> %c1, %c2
299 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
304 define arm_aapcs_vfpcc <4 x i32> @cmpeqr_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
305 ; CHECK-LABEL: cmpeqr_v4i1:
306 ; CHECK: @ %bb.0: @ %entry
307 ; CHECK-NEXT: vpt.i32 eq, q0, zr
308 ; CHECK-NEXT: vcmpt.i32 eq, q1, r0
309 ; CHECK-NEXT: vpsel q0, q0, q1
312 %c1 = icmp eq <4 x i32> %a, zeroinitializer
313 %i = insertelement <4 x i32> undef, i32 %c, i32 0
314 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
315 %c2 = icmp eq <4 x i32> %b, %sp
316 %o = and <4 x i1> %c1, %c2
317 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
321 define arm_aapcs_vfpcc <4 x i32> @cmpner_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
322 ; CHECK-LABEL: cmpner_v4i1:
323 ; CHECK: @ %bb.0: @ %entry
324 ; CHECK-NEXT: vpt.i32 eq, q0, zr
325 ; CHECK-NEXT: vcmpt.i32 ne, q1, r0
326 ; CHECK-NEXT: vpsel q0, q0, q1
329 %c1 = icmp eq <4 x i32> %a, zeroinitializer
330 %i = insertelement <4 x i32> undef, i32 %c, i32 0
331 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
332 %c2 = icmp ne <4 x i32> %b, %sp
333 %o = and <4 x i1> %c1, %c2
334 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
338 define arm_aapcs_vfpcc <4 x i32> @cmpsltr_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
339 ; CHECK-LABEL: cmpsltr_v4i1:
340 ; CHECK: @ %bb.0: @ %entry
341 ; CHECK-NEXT: vpt.i32 eq, q0, zr
342 ; CHECK-NEXT: vcmpt.s32 lt, q1, r0
343 ; CHECK-NEXT: vpsel q0, q0, q1
346 %c1 = icmp eq <4 x i32> %a, zeroinitializer
347 %i = insertelement <4 x i32> undef, i32 %c, i32 0
348 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
349 %c2 = icmp slt <4 x i32> %b, %sp
350 %o = and <4 x i1> %c1, %c2
351 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
355 define arm_aapcs_vfpcc <4 x i32> @cmpsgtr_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
356 ; CHECK-LABEL: cmpsgtr_v4i1:
357 ; CHECK: @ %bb.0: @ %entry
358 ; CHECK-NEXT: vpt.i32 eq, q0, zr
359 ; CHECK-NEXT: vcmpt.s32 gt, q1, r0
360 ; CHECK-NEXT: vpsel q0, q0, q1
363 %c1 = icmp eq <4 x i32> %a, zeroinitializer
364 %i = insertelement <4 x i32> undef, i32 %c, i32 0
365 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
366 %c2 = icmp sgt <4 x i32> %b, %sp
367 %o = and <4 x i1> %c1, %c2
368 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
372 define arm_aapcs_vfpcc <4 x i32> @cmpsler_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
373 ; CHECK-LABEL: cmpsler_v4i1:
374 ; CHECK: @ %bb.0: @ %entry
375 ; CHECK-NEXT: vpt.i32 eq, q0, zr
376 ; CHECK-NEXT: vcmpt.s32 le, q1, r0
377 ; CHECK-NEXT: vpsel q0, q0, q1
380 %c1 = icmp eq <4 x i32> %a, zeroinitializer
381 %i = insertelement <4 x i32> undef, i32 %c, i32 0
382 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
383 %c2 = icmp sle <4 x i32> %b, %sp
384 %o = and <4 x i1> %c1, %c2
385 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
389 define arm_aapcs_vfpcc <4 x i32> @cmpsger_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
390 ; CHECK-LABEL: cmpsger_v4i1:
391 ; CHECK: @ %bb.0: @ %entry
392 ; CHECK-NEXT: vpt.i32 eq, q0, zr
393 ; CHECK-NEXT: vcmpt.s32 ge, q1, r0
394 ; CHECK-NEXT: vpsel q0, q0, q1
397 %c1 = icmp eq <4 x i32> %a, zeroinitializer
398 %i = insertelement <4 x i32> undef, i32 %c, i32 0
399 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
400 %c2 = icmp sge <4 x i32> %b, %sp
401 %o = and <4 x i1> %c1, %c2
402 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
406 define arm_aapcs_vfpcc <4 x i32> @cmpultr_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
407 ; CHECK-LABEL: cmpultr_v4i1:
408 ; CHECK: @ %bb.0: @ %entry
409 ; CHECK-NEXT: vdup.32 q2, r0
410 ; CHECK-NEXT: vpt.i32 eq, q0, zr
411 ; CHECK-NEXT: vcmpt.u32 hi, q2, q1
412 ; CHECK-NEXT: vpsel q0, q0, q1
415 %c1 = icmp eq <4 x i32> %a, zeroinitializer
416 %i = insertelement <4 x i32> undef, i32 %c, i32 0
417 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
418 %c2 = icmp ult <4 x i32> %b, %sp
419 %o = and <4 x i1> %c1, %c2
420 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
424 define arm_aapcs_vfpcc <4 x i32> @cmpugtr_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
425 ; CHECK-LABEL: cmpugtr_v4i1:
426 ; CHECK: @ %bb.0: @ %entry
427 ; CHECK-NEXT: vpt.i32 eq, q0, zr
428 ; CHECK-NEXT: vcmpt.u32 hi, q1, r0
429 ; CHECK-NEXT: vpsel q0, q0, q1
432 %c1 = icmp eq <4 x i32> %a, zeroinitializer
433 %i = insertelement <4 x i32> undef, i32 %c, i32 0
434 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
435 %c2 = icmp ugt <4 x i32> %b, %sp
436 %o = and <4 x i1> %c1, %c2
437 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
441 define arm_aapcs_vfpcc <4 x i32> @cmpuler_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
442 ; CHECK-LABEL: cmpuler_v4i1:
443 ; CHECK: @ %bb.0: @ %entry
444 ; CHECK-NEXT: vdup.32 q2, r0
445 ; CHECK-NEXT: vpt.i32 eq, q0, zr
446 ; CHECK-NEXT: vcmpt.u32 cs, q2, q1
447 ; CHECK-NEXT: vpsel q0, q0, q1
450 %c1 = icmp eq <4 x i32> %a, zeroinitializer
451 %i = insertelement <4 x i32> undef, i32 %c, i32 0
452 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
453 %c2 = icmp ule <4 x i32> %b, %sp
454 %o = and <4 x i1> %c1, %c2
455 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
459 define arm_aapcs_vfpcc <4 x i32> @cmpuger_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
460 ; CHECK-LABEL: cmpuger_v4i1:
461 ; CHECK: @ %bb.0: @ %entry
462 ; CHECK-NEXT: vpt.i32 eq, q0, zr
463 ; CHECK-NEXT: vcmpt.u32 cs, q1, r0
464 ; CHECK-NEXT: vpsel q0, q0, q1
467 %c1 = icmp eq <4 x i32> %a, zeroinitializer
468 %i = insertelement <4 x i32> undef, i32 %c, i32 0
469 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
470 %c2 = icmp uge <4 x i32> %b, %sp
471 %o = and <4 x i1> %c1, %c2
472 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
478 define arm_aapcs_vfpcc <8 x i16> @cmpeqz_v8i1(<8 x i16> %a, <8 x i16> %b) {
479 ; CHECK-LABEL: cmpeqz_v8i1:
480 ; CHECK: @ %bb.0: @ %entry
481 ; CHECK-NEXT: vorr q2, q0, q1
482 ; CHECK-NEXT: vcmp.i16 eq, q2, zr
483 ; CHECK-NEXT: vpsel q0, q0, q1
486 %c1 = icmp eq <8 x i16> %a, zeroinitializer
487 %c2 = icmp eq <8 x i16> %b, zeroinitializer
488 %o = and <8 x i1> %c1, %c2
489 %s = select <8 x i1> %o, <8 x i16> %a, <8 x i16> %b
493 define arm_aapcs_vfpcc <8 x i16> @cmpeq_v8i1(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c) {
494 ; CHECK-LABEL: cmpeq_v8i1:
495 ; CHECK: @ %bb.0: @ %entry
496 ; CHECK-NEXT: vpt.i16 eq, q0, zr
497 ; CHECK-NEXT: vcmpt.i16 eq, q1, q2
498 ; CHECK-NEXT: vpsel q0, q0, q1
501 %c1 = icmp eq <8 x i16> %a, zeroinitializer
502 %c2 = icmp eq <8 x i16> %b, %c
503 %o = and <8 x i1> %c1, %c2
504 %s = select <8 x i1> %o, <8 x i16> %a, <8 x i16> %b
508 define arm_aapcs_vfpcc <8 x i16> @cmpeqr_v8i1(<8 x i16> %a, <8 x i16> %b, i16 %c) {
509 ; CHECK-LABEL: cmpeqr_v8i1:
510 ; CHECK: @ %bb.0: @ %entry
511 ; CHECK-NEXT: vpt.i16 eq, q0, zr
512 ; CHECK-NEXT: vcmpt.i16 eq, q1, r0
513 ; CHECK-NEXT: vpsel q0, q0, q1
516 %c1 = icmp eq <8 x i16> %a, zeroinitializer
517 %i = insertelement <8 x i16> undef, i16 %c, i32 0
518 %sp = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
519 %c2 = icmp eq <8 x i16> %b, %sp
520 %o = and <8 x i1> %c1, %c2
521 %s = select <8 x i1> %o, <8 x i16> %a, <8 x i16> %b
526 define arm_aapcs_vfpcc <16 x i8> @cmpeqz_v16i1(<16 x i8> %a, <16 x i8> %b) {
527 ; CHECK-LABEL: cmpeqz_v16i1:
528 ; CHECK: @ %bb.0: @ %entry
529 ; CHECK-NEXT: vorr q2, q0, q1
530 ; CHECK-NEXT: vcmp.i8 eq, q2, zr
531 ; CHECK-NEXT: vpsel q0, q0, q1
534 %c1 = icmp eq <16 x i8> %a, zeroinitializer
535 %c2 = icmp eq <16 x i8> %b, zeroinitializer
536 %o = and <16 x i1> %c1, %c2
537 %s = select <16 x i1> %o, <16 x i8> %a, <16 x i8> %b
541 define arm_aapcs_vfpcc <16 x i8> @cmpeq_v16i1(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) {
542 ; CHECK-LABEL: cmpeq_v16i1:
543 ; CHECK: @ %bb.0: @ %entry
544 ; CHECK-NEXT: vpt.i8 eq, q0, zr
545 ; CHECK-NEXT: vcmpt.i8 eq, q1, q2
546 ; CHECK-NEXT: vpsel q0, q0, q1
549 %c1 = icmp eq <16 x i8> %a, zeroinitializer
550 %c2 = icmp eq <16 x i8> %b, %c
551 %o = and <16 x i1> %c1, %c2
552 %s = select <16 x i1> %o, <16 x i8> %a, <16 x i8> %b
556 define arm_aapcs_vfpcc <16 x i8> @cmpeqr_v16i1(<16 x i8> %a, <16 x i8> %b, i8 %c) {
557 ; CHECK-LABEL: cmpeqr_v16i1:
558 ; CHECK: @ %bb.0: @ %entry
559 ; CHECK-NEXT: vpt.i8 eq, q0, zr
560 ; CHECK-NEXT: vcmpt.i8 eq, q1, r0
561 ; CHECK-NEXT: vpsel q0, q0, q1
564 %c1 = icmp eq <16 x i8> %a, zeroinitializer
565 %i = insertelement <16 x i8> undef, i8 %c, i32 0
566 %sp = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
567 %c2 = icmp eq <16 x i8> %b, %sp
568 %o = and <16 x i1> %c1, %c2
569 %s = select <16 x i1> %o, <16 x i8> %a, <16 x i8> %b
574 define arm_aapcs_vfpcc <2 x i64> @cmpeqz_v2i1(<2 x i64> %a, <2 x i64> %b) {
575 ; CHECK-LABEL: cmpeqz_v2i1:
576 ; CHECK: @ %bb.0: @ %entry
577 ; CHECK-NEXT: vorr q2, q0, q1
578 ; CHECK-NEXT: vmov r0, r1, d5
579 ; CHECK-NEXT: orrs r0, r1
580 ; CHECK-NEXT: vmov r1, r2, d4
581 ; CHECK-NEXT: cset r0, eq
582 ; CHECK-NEXT: cmp r0, #0
583 ; CHECK-NEXT: csetm r0, ne
584 ; CHECK-NEXT: orrs r1, r2
585 ; CHECK-NEXT: cset r1, eq
586 ; CHECK-NEXT: cmp r1, #0
587 ; CHECK-NEXT: csetm r1, ne
588 ; CHECK-NEXT: vmov q2[2], q2[0], r1, r0
589 ; CHECK-NEXT: vmov q2[3], q2[1], r1, r0
590 ; CHECK-NEXT: vbic q1, q1, q2
591 ; CHECK-NEXT: vand q0, q0, q2
592 ; CHECK-NEXT: vorr q0, q0, q1
595 %c1 = icmp eq <2 x i64> %a, zeroinitializer
596 %c2 = icmp eq <2 x i64> %b, zeroinitializer
597 %o = and <2 x i1> %c1, %c2
598 %s = select <2 x i1> %o, <2 x i64> %a, <2 x i64> %b
602 define arm_aapcs_vfpcc <2 x i64> @cmpeq_v2i1(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) {
603 ; CHECK-LABEL: cmpeq_v2i1:
604 ; CHECK: @ %bb.0: @ %entry
605 ; CHECK-NEXT: vmov r0, r1, d5
606 ; CHECK-NEXT: vmov r2, r3, d3
607 ; CHECK-NEXT: eors r0, r2
608 ; CHECK-NEXT: eors r1, r3
609 ; CHECK-NEXT: orrs r0, r1
610 ; CHECK-NEXT: vmov r12, r2, d4
611 ; CHECK-NEXT: vmov r3, r1, d2
612 ; CHECK-NEXT: cset r0, eq
613 ; CHECK-NEXT: cmp r0, #0
614 ; CHECK-NEXT: csetm r0, ne
615 ; CHECK-NEXT: eors r1, r2
616 ; CHECK-NEXT: eor.w r2, r3, r12
617 ; CHECK-NEXT: orrs r1, r2
618 ; CHECK-NEXT: cset r1, eq
619 ; CHECK-NEXT: cmp r1, #0
620 ; CHECK-NEXT: csetm r1, ne
621 ; CHECK-NEXT: vmov q2[2], q2[0], r1, r0
622 ; CHECK-NEXT: vmov q2[3], q2[1], r1, r0
623 ; CHECK-NEXT: vmov r0, r1, d1
624 ; CHECK-NEXT: orrs r0, r1
625 ; CHECK-NEXT: vmov r1, r2, d0
626 ; CHECK-NEXT: cset r0, eq
627 ; CHECK-NEXT: cmp r0, #0
628 ; CHECK-NEXT: csetm r0, ne
629 ; CHECK-NEXT: orrs r1, r2
630 ; CHECK-NEXT: cset r1, eq
631 ; CHECK-NEXT: cmp r1, #0
632 ; CHECK-NEXT: csetm r1, ne
633 ; CHECK-NEXT: vmov q3[2], q3[0], r1, r0
634 ; CHECK-NEXT: vmov q3[3], q3[1], r1, r0
635 ; CHECK-NEXT: vand q2, q3, q2
636 ; CHECK-NEXT: vbic q1, q1, q2
637 ; CHECK-NEXT: vand q0, q0, q2
638 ; CHECK-NEXT: vorr q0, q0, q1
641 %c1 = icmp eq <2 x i64> %a, zeroinitializer
642 %c2 = icmp eq <2 x i64> %b, %c
643 %o = and <2 x i1> %c1, %c2
644 %s = select <2 x i1> %o, <2 x i64> %a, <2 x i64> %b
648 define arm_aapcs_vfpcc <2 x i64> @cmpeqr_v2i1(<2 x i64> %a, <2 x i64> %b, i64 %c) {
649 ; CHECK-LABEL: cmpeqr_v2i1:
650 ; CHECK: @ %bb.0: @ %entry
651 ; CHECK-NEXT: vmov r2, r3, d3
652 ; CHECK-NEXT: eors r3, r1
653 ; CHECK-NEXT: eors r2, r0
654 ; CHECK-NEXT: orrs r2, r3
655 ; CHECK-NEXT: vmov r12, r3, d2
656 ; CHECK-NEXT: cset r2, eq
657 ; CHECK-NEXT: cmp r2, #0
658 ; CHECK-NEXT: csetm r2, ne
659 ; CHECK-NEXT: eors r1, r3
660 ; CHECK-NEXT: eor.w r0, r0, r12
661 ; CHECK-NEXT: orrs r0, r1
662 ; CHECK-NEXT: cset r0, eq
663 ; CHECK-NEXT: cmp r0, #0
664 ; CHECK-NEXT: csetm r0, ne
665 ; CHECK-NEXT: vmov q2[2], q2[0], r0, r2
666 ; CHECK-NEXT: vmov q2[3], q2[1], r0, r2
667 ; CHECK-NEXT: vmov r0, r1, d1
668 ; CHECK-NEXT: orrs r0, r1
669 ; CHECK-NEXT: vmov r1, r2, d0
670 ; CHECK-NEXT: cset r0, eq
671 ; CHECK-NEXT: cmp r0, #0
672 ; CHECK-NEXT: csetm r0, ne
673 ; CHECK-NEXT: orrs r1, r2
674 ; CHECK-NEXT: cset r1, eq
675 ; CHECK-NEXT: cmp r1, #0
676 ; CHECK-NEXT: csetm r1, ne
677 ; CHECK-NEXT: vmov q3[2], q3[0], r1, r0
678 ; CHECK-NEXT: vmov q3[3], q3[1], r1, r0
679 ; CHECK-NEXT: vand q2, q3, q2
680 ; CHECK-NEXT: vbic q1, q1, q2
681 ; CHECK-NEXT: vand q0, q0, q2
682 ; CHECK-NEXT: vorr q0, q0, q1
685 %c1 = icmp eq <2 x i64> %a, zeroinitializer
686 %i = insertelement <2 x i64> undef, i64 %c, i32 0
687 %sp = shufflevector <2 x i64> %i, <2 x i64> undef, <2 x i32> zeroinitializer
688 %c2 = icmp eq <2 x i64> %b, %sp
689 %o = and <2 x i1> %c1, %c2
690 %s = select <2 x i1> %o, <2 x i64> %a, <2 x i64> %b