1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-arm-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: vdup.32 q2, r0
342 ; CHECK-NEXT: vpt.i32 eq, q0, zr
343 ; CHECK-NEXT: vcmpt.s32 gt, q2, q1
344 ; CHECK-NEXT: vpsel q0, q0, q1
347 %c1 = icmp eq <4 x i32> %a, zeroinitializer
348 %i = insertelement <4 x i32> undef, i32 %c, i32 0
349 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
350 %c2 = icmp slt <4 x i32> %b, %sp
351 %o = and <4 x i1> %c1, %c2
352 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
356 define arm_aapcs_vfpcc <4 x i32> @cmpsgtr_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
357 ; CHECK-LABEL: cmpsgtr_v4i1:
358 ; CHECK: @ %bb.0: @ %entry
359 ; CHECK-NEXT: vpt.i32 eq, q0, zr
360 ; CHECK-NEXT: vcmpt.s32 gt, q1, r0
361 ; CHECK-NEXT: vpsel q0, q0, q1
364 %c1 = icmp eq <4 x i32> %a, zeroinitializer
365 %i = insertelement <4 x i32> undef, i32 %c, i32 0
366 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
367 %c2 = icmp sgt <4 x i32> %b, %sp
368 %o = and <4 x i1> %c1, %c2
369 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
373 define arm_aapcs_vfpcc <4 x i32> @cmpsler_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
374 ; CHECK-LABEL: cmpsler_v4i1:
375 ; CHECK: @ %bb.0: @ %entry
376 ; CHECK-NEXT: vdup.32 q2, r0
377 ; CHECK-NEXT: vpt.i32 eq, q0, zr
378 ; CHECK-NEXT: vcmpt.s32 ge, q2, q1
379 ; CHECK-NEXT: vpsel q0, q0, q1
382 %c1 = icmp eq <4 x i32> %a, zeroinitializer
383 %i = insertelement <4 x i32> undef, i32 %c, i32 0
384 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
385 %c2 = icmp sle <4 x i32> %b, %sp
386 %o = and <4 x i1> %c1, %c2
387 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
391 define arm_aapcs_vfpcc <4 x i32> @cmpsger_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
392 ; CHECK-LABEL: cmpsger_v4i1:
393 ; CHECK: @ %bb.0: @ %entry
394 ; CHECK-NEXT: vpt.i32 eq, q0, zr
395 ; CHECK-NEXT: vcmpt.s32 ge, q1, r0
396 ; CHECK-NEXT: vpsel q0, q0, q1
399 %c1 = icmp eq <4 x i32> %a, zeroinitializer
400 %i = insertelement <4 x i32> undef, i32 %c, i32 0
401 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
402 %c2 = icmp sge <4 x i32> %b, %sp
403 %o = and <4 x i1> %c1, %c2
404 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
408 define arm_aapcs_vfpcc <4 x i32> @cmpultr_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
409 ; CHECK-LABEL: cmpultr_v4i1:
410 ; CHECK: @ %bb.0: @ %entry
411 ; CHECK-NEXT: vdup.32 q2, r0
412 ; CHECK-NEXT: vpt.i32 eq, q0, zr
413 ; CHECK-NEXT: vcmpt.u32 hi, q2, q1
414 ; CHECK-NEXT: vpsel q0, q0, q1
417 %c1 = icmp eq <4 x i32> %a, zeroinitializer
418 %i = insertelement <4 x i32> undef, i32 %c, i32 0
419 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
420 %c2 = icmp ult <4 x i32> %b, %sp
421 %o = and <4 x i1> %c1, %c2
422 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
426 define arm_aapcs_vfpcc <4 x i32> @cmpugtr_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
427 ; CHECK-LABEL: cmpugtr_v4i1:
428 ; CHECK: @ %bb.0: @ %entry
429 ; CHECK-NEXT: vpt.i32 eq, q0, zr
430 ; CHECK-NEXT: vcmpt.u32 hi, q1, r0
431 ; CHECK-NEXT: vpsel q0, q0, q1
434 %c1 = icmp eq <4 x i32> %a, zeroinitializer
435 %i = insertelement <4 x i32> undef, i32 %c, i32 0
436 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
437 %c2 = icmp ugt <4 x i32> %b, %sp
438 %o = and <4 x i1> %c1, %c2
439 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
443 define arm_aapcs_vfpcc <4 x i32> @cmpuler_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
444 ; CHECK-LABEL: cmpuler_v4i1:
445 ; CHECK: @ %bb.0: @ %entry
446 ; CHECK-NEXT: vdup.32 q2, r0
447 ; CHECK-NEXT: vpt.i32 eq, q0, zr
448 ; CHECK-NEXT: vcmpt.u32 cs, q2, q1
449 ; CHECK-NEXT: vpsel q0, q0, q1
452 %c1 = icmp eq <4 x i32> %a, zeroinitializer
453 %i = insertelement <4 x i32> undef, i32 %c, i32 0
454 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
455 %c2 = icmp ule <4 x i32> %b, %sp
456 %o = and <4 x i1> %c1, %c2
457 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
461 define arm_aapcs_vfpcc <4 x i32> @cmpuger_v4i1(<4 x i32> %a, <4 x i32> %b, i32 %c) {
462 ; CHECK-LABEL: cmpuger_v4i1:
463 ; CHECK: @ %bb.0: @ %entry
464 ; CHECK-NEXT: vpt.i32 eq, q0, zr
465 ; CHECK-NEXT: vcmpt.u32 cs, q1, r0
466 ; CHECK-NEXT: vpsel q0, q0, q1
469 %c1 = icmp eq <4 x i32> %a, zeroinitializer
470 %i = insertelement <4 x i32> undef, i32 %c, i32 0
471 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
472 %c2 = icmp uge <4 x i32> %b, %sp
473 %o = and <4 x i1> %c1, %c2
474 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
480 define arm_aapcs_vfpcc <8 x i16> @cmpeqz_v8i1(<8 x i16> %a, <8 x i16> %b) {
481 ; CHECK-LABEL: cmpeqz_v8i1:
482 ; CHECK: @ %bb.0: @ %entry
483 ; CHECK-NEXT: vorr q2, q0, q1
484 ; CHECK-NEXT: vcmp.i16 eq, q2, zr
485 ; CHECK-NEXT: vpsel q0, q0, q1
488 %c1 = icmp eq <8 x i16> %a, zeroinitializer
489 %c2 = icmp eq <8 x i16> %b, zeroinitializer
490 %o = and <8 x i1> %c1, %c2
491 %s = select <8 x i1> %o, <8 x i16> %a, <8 x i16> %b
495 define arm_aapcs_vfpcc <8 x i16> @cmpeq_v8i1(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c) {
496 ; CHECK-LABEL: cmpeq_v8i1:
497 ; CHECK: @ %bb.0: @ %entry
498 ; CHECK-NEXT: vpt.i16 eq, q0, zr
499 ; CHECK-NEXT: vcmpt.i16 eq, q1, q2
500 ; CHECK-NEXT: vpsel q0, q0, q1
503 %c1 = icmp eq <8 x i16> %a, zeroinitializer
504 %c2 = icmp eq <8 x i16> %b, %c
505 %o = and <8 x i1> %c1, %c2
506 %s = select <8 x i1> %o, <8 x i16> %a, <8 x i16> %b
510 define arm_aapcs_vfpcc <8 x i16> @cmpeqr_v8i1(<8 x i16> %a, <8 x i16> %b, i16 %c) {
511 ; CHECK-LABEL: cmpeqr_v8i1:
512 ; CHECK: @ %bb.0: @ %entry
513 ; CHECK-NEXT: vpt.i16 eq, q0, zr
514 ; CHECK-NEXT: vcmpt.i16 eq, q1, r0
515 ; CHECK-NEXT: vpsel q0, q0, q1
518 %c1 = icmp eq <8 x i16> %a, zeroinitializer
519 %i = insertelement <8 x i16> undef, i16 %c, i32 0
520 %sp = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
521 %c2 = icmp eq <8 x i16> %b, %sp
522 %o = and <8 x i1> %c1, %c2
523 %s = select <8 x i1> %o, <8 x i16> %a, <8 x i16> %b
528 define arm_aapcs_vfpcc <16 x i8> @cmpeqz_v16i1(<16 x i8> %a, <16 x i8> %b) {
529 ; CHECK-LABEL: cmpeqz_v16i1:
530 ; CHECK: @ %bb.0: @ %entry
531 ; CHECK-NEXT: vorr q2, q0, q1
532 ; CHECK-NEXT: vcmp.i8 eq, q2, zr
533 ; CHECK-NEXT: vpsel q0, q0, q1
536 %c1 = icmp eq <16 x i8> %a, zeroinitializer
537 %c2 = icmp eq <16 x i8> %b, zeroinitializer
538 %o = and <16 x i1> %c1, %c2
539 %s = select <16 x i1> %o, <16 x i8> %a, <16 x i8> %b
543 define arm_aapcs_vfpcc <16 x i8> @cmpeq_v16i1(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) {
544 ; CHECK-LABEL: cmpeq_v16i1:
545 ; CHECK: @ %bb.0: @ %entry
546 ; CHECK-NEXT: vpt.i8 eq, q0, zr
547 ; CHECK-NEXT: vcmpt.i8 eq, q1, q2
548 ; CHECK-NEXT: vpsel q0, q0, q1
551 %c1 = icmp eq <16 x i8> %a, zeroinitializer
552 %c2 = icmp eq <16 x i8> %b, %c
553 %o = and <16 x i1> %c1, %c2
554 %s = select <16 x i1> %o, <16 x i8> %a, <16 x i8> %b
558 define arm_aapcs_vfpcc <16 x i8> @cmpeqr_v16i1(<16 x i8> %a, <16 x i8> %b, i8 %c) {
559 ; CHECK-LABEL: cmpeqr_v16i1:
560 ; CHECK: @ %bb.0: @ %entry
561 ; CHECK-NEXT: vpt.i8 eq, q0, zr
562 ; CHECK-NEXT: vcmpt.i8 eq, q1, r0
563 ; CHECK-NEXT: vpsel q0, q0, q1
566 %c1 = icmp eq <16 x i8> %a, zeroinitializer
567 %i = insertelement <16 x i8> undef, i8 %c, i32 0
568 %sp = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
569 %c2 = icmp eq <16 x i8> %b, %sp
570 %o = and <16 x i1> %c1, %c2
571 %s = select <16 x i1> %o, <16 x i8> %a, <16 x i8> %b
576 define arm_aapcs_vfpcc <2 x i64> @cmpeqz_v2i1(<2 x i64> %a, <2 x i64> %b) {
577 ; CHECK-LABEL: cmpeqz_v2i1:
578 ; CHECK: @ %bb.0: @ %entry
579 ; CHECK-NEXT: vorr q2, q0, q1
580 ; CHECK-NEXT: vmov r0, s9
581 ; CHECK-NEXT: vmov r1, s8
582 ; CHECK-NEXT: orrs r0, r1
583 ; CHECK-NEXT: vmov r1, s10
584 ; CHECK-NEXT: cset r0, eq
585 ; CHECK-NEXT: tst.w r0, #1
586 ; CHECK-NEXT: csetm r0, ne
587 ; CHECK-NEXT: vmov.32 q3[0], r0
588 ; CHECK-NEXT: vmov.32 q3[1], r0
589 ; CHECK-NEXT: vmov r0, s11
590 ; CHECK-NEXT: orrs r0, r1
591 ; CHECK-NEXT: cset r0, eq
592 ; CHECK-NEXT: tst.w r0, #1
593 ; CHECK-NEXT: csetm r0, ne
594 ; CHECK-NEXT: vmov.32 q3[2], r0
595 ; CHECK-NEXT: vmov.32 q3[3], r0
596 ; CHECK-NEXT: vbic q1, q1, q3
597 ; CHECK-NEXT: vand q0, q0, q3
598 ; CHECK-NEXT: vorr q0, q0, q1
601 %c1 = icmp eq <2 x i64> %a, zeroinitializer
602 %c2 = icmp eq <2 x i64> %b, zeroinitializer
603 %o = and <2 x i1> %c1, %c2
604 %s = select <2 x i1> %o, <2 x i64> %a, <2 x i64> %b
608 define arm_aapcs_vfpcc <2 x i64> @cmpeq_v2i1(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) {
609 ; CHECK-LABEL: cmpeq_v2i1:
610 ; CHECK: @ %bb.0: @ %entry
611 ; CHECK-NEXT: vmov r0, s9
612 ; CHECK-NEXT: vmov r1, s5
613 ; CHECK-NEXT: vmov r2, s4
614 ; CHECK-NEXT: eors r0, r1
615 ; CHECK-NEXT: vmov r1, s8
616 ; CHECK-NEXT: eors r1, r2
617 ; CHECK-NEXT: vmov r2, s6
618 ; CHECK-NEXT: orrs r0, r1
619 ; CHECK-NEXT: vmov r1, s7
620 ; CHECK-NEXT: cset r0, eq
621 ; CHECK-NEXT: tst.w r0, #1
622 ; CHECK-NEXT: csetm r0, ne
623 ; CHECK-NEXT: vmov.32 q3[0], r0
624 ; CHECK-NEXT: vmov.32 q3[1], r0
625 ; CHECK-NEXT: vmov r0, s11
626 ; CHECK-NEXT: eors r0, r1
627 ; CHECK-NEXT: vmov r1, s10
628 ; CHECK-NEXT: eors r1, r2
629 ; CHECK-NEXT: orrs r0, r1
630 ; CHECK-NEXT: vmov r1, s0
631 ; CHECK-NEXT: cset r0, eq
632 ; CHECK-NEXT: tst.w r0, #1
633 ; CHECK-NEXT: csetm r0, ne
634 ; CHECK-NEXT: vmov.32 q3[2], r0
635 ; CHECK-NEXT: vmov.32 q3[3], r0
636 ; CHECK-NEXT: vmov r0, s1
637 ; CHECK-NEXT: orrs r0, r1
638 ; CHECK-NEXT: vmov r1, s2
639 ; CHECK-NEXT: cset r0, eq
640 ; CHECK-NEXT: tst.w r0, #1
641 ; CHECK-NEXT: csetm r0, ne
642 ; CHECK-NEXT: vmov.32 q2[0], r0
643 ; CHECK-NEXT: vmov.32 q2[1], r0
644 ; CHECK-NEXT: vmov r0, s3
645 ; CHECK-NEXT: orrs r0, r1
646 ; CHECK-NEXT: cset r0, eq
647 ; CHECK-NEXT: tst.w r0, #1
648 ; CHECK-NEXT: csetm r0, ne
649 ; CHECK-NEXT: vmov.32 q2[2], r0
650 ; CHECK-NEXT: vmov.32 q2[3], r0
651 ; CHECK-NEXT: vand q2, q2, q3
652 ; CHECK-NEXT: vbic q1, q1, q2
653 ; CHECK-NEXT: vand q0, q0, q2
654 ; CHECK-NEXT: vorr q0, q0, q1
657 %c1 = icmp eq <2 x i64> %a, zeroinitializer
658 %c2 = icmp eq <2 x i64> %b, %c
659 %o = and <2 x i1> %c1, %c2
660 %s = select <2 x i1> %o, <2 x i64> %a, <2 x i64> %b
664 define arm_aapcs_vfpcc <2 x i64> @cmpeqr_v2i1(<2 x i64> %a, <2 x i64> %b, i64 %c) {
665 ; CHECK-LABEL: cmpeqr_v2i1:
666 ; CHECK: @ %bb.0: @ %entry
667 ; CHECK-NEXT: vmov r2, s5
668 ; CHECK-NEXT: vmov r3, s4
669 ; CHECK-NEXT: eors r2, r1
670 ; CHECK-NEXT: eors r3, r0
671 ; CHECK-NEXT: orrs r2, r3
672 ; CHECK-NEXT: cset r2, eq
673 ; CHECK-NEXT: tst.w r2, #1
674 ; CHECK-NEXT: csetm r2, ne
675 ; CHECK-NEXT: vmov.32 q2[0], r2
676 ; CHECK-NEXT: vmov.32 q2[1], r2
677 ; CHECK-NEXT: vmov r2, s7
678 ; CHECK-NEXT: eors r1, r2
679 ; CHECK-NEXT: vmov r2, s6
680 ; CHECK-NEXT: eors r0, r2
681 ; CHECK-NEXT: orrs r0, r1
682 ; CHECK-NEXT: vmov r1, s0
683 ; CHECK-NEXT: cset r0, eq
684 ; CHECK-NEXT: tst.w r0, #1
685 ; CHECK-NEXT: csetm r0, ne
686 ; CHECK-NEXT: vmov.32 q2[2], r0
687 ; CHECK-NEXT: vmov.32 q2[3], r0
688 ; CHECK-NEXT: vmov r0, s1
689 ; CHECK-NEXT: orrs r0, r1
690 ; CHECK-NEXT: vmov r1, s2
691 ; CHECK-NEXT: cset r0, eq
692 ; CHECK-NEXT: tst.w r0, #1
693 ; CHECK-NEXT: csetm r0, ne
694 ; CHECK-NEXT: vmov.32 q3[0], r0
695 ; CHECK-NEXT: vmov.32 q3[1], r0
696 ; CHECK-NEXT: vmov r0, s3
697 ; CHECK-NEXT: orrs r0, r1
698 ; CHECK-NEXT: cset r0, eq
699 ; CHECK-NEXT: tst.w r0, #1
700 ; CHECK-NEXT: csetm r0, ne
701 ; CHECK-NEXT: vmov.32 q3[2], r0
702 ; CHECK-NEXT: vmov.32 q3[3], r0
703 ; CHECK-NEXT: vand q2, q3, q2
704 ; CHECK-NEXT: vbic q1, q1, q2
705 ; CHECK-NEXT: vand q0, q0, q2
706 ; CHECK-NEXT: vorr q0, q0, q1
709 %c1 = icmp eq <2 x i64> %a, zeroinitializer
710 %i = insertelement <2 x i64> undef, i64 %c, i32 0
711 %sp = shufflevector <2 x i64> %i, <2 x i64> undef, <2 x i32> zeroinitializer
712 %c2 = icmp eq <2 x i64> %b, %sp
713 %o = and <2 x i1> %c1, %c2
714 %s = select <2 x i1> %o, <2 x i64> %a, <2 x i64> %b