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> @vcmp_eq_v4i32(<4 x i32> %src, i32 %src2, <4 x i32> %a, <4 x i32> %b) {
5 ; CHECK-LABEL: vcmp_eq_v4i32:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: vcmp.i32 eq, q0, r0
8 ; CHECK-NEXT: vpsel q0, q1, q2
11 %i = insertelement <4 x i32> undef, i32 %src2, i32 0
12 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
13 %c = icmp eq <4 x i32> %src, %sp
14 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
18 define arm_aapcs_vfpcc <4 x i32> @vcmp_ne_v4i32(<4 x i32> %src, i32 %src2, <4 x i32> %a, <4 x i32> %b) {
19 ; CHECK-LABEL: vcmp_ne_v4i32:
20 ; CHECK: @ %bb.0: @ %entry
21 ; CHECK-NEXT: vcmp.i32 ne, q0, r0
22 ; CHECK-NEXT: vpsel q0, q1, q2
25 %i = insertelement <4 x i32> undef, i32 %src2, i32 0
26 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
27 %c = icmp ne <4 x i32> %src, %sp
28 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
32 define arm_aapcs_vfpcc <4 x i32> @vcmp_sgt_v4i32(<4 x i32> %src, i32 %src2, <4 x i32> %a, <4 x i32> %b) {
33 ; CHECK-LABEL: vcmp_sgt_v4i32:
34 ; CHECK: @ %bb.0: @ %entry
35 ; CHECK-NEXT: vcmp.s32 gt, q0, r0
36 ; CHECK-NEXT: vpsel q0, q1, q2
39 %i = insertelement <4 x i32> undef, i32 %src2, i32 0
40 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
41 %c = icmp sgt <4 x i32> %src, %sp
42 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
46 define arm_aapcs_vfpcc <4 x i32> @vcmp_sge_v4i32(<4 x i32> %src, i32 %src2, <4 x i32> %a, <4 x i32> %b) {
47 ; CHECK-LABEL: vcmp_sge_v4i32:
48 ; CHECK: @ %bb.0: @ %entry
49 ; CHECK-NEXT: vcmp.s32 ge, q0, r0
50 ; CHECK-NEXT: vpsel q0, q1, q2
53 %i = insertelement <4 x i32> undef, i32 %src2, i32 0
54 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
55 %c = icmp sge <4 x i32> %src, %sp
56 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
60 define arm_aapcs_vfpcc <4 x i32> @vcmp_slt_v4i32(<4 x i32> %src, i32 %src2, <4 x i32> %a, <4 x i32> %b) {
61 ; CHECK-LABEL: vcmp_slt_v4i32:
62 ; CHECK: @ %bb.0: @ %entry
63 ; CHECK-NEXT: vdup.32 q3, r0
64 ; CHECK-NEXT: vcmp.s32 gt, q3, q0
65 ; CHECK-NEXT: vpsel q0, q1, q2
68 %i = insertelement <4 x i32> undef, i32 %src2, i32 0
69 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
70 %c = icmp slt <4 x i32> %src, %sp
71 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
75 define arm_aapcs_vfpcc <4 x i32> @vcmp_sle_v4i32(<4 x i32> %src, i32 %src2, <4 x i32> %a, <4 x i32> %b) {
76 ; CHECK-LABEL: vcmp_sle_v4i32:
77 ; CHECK: @ %bb.0: @ %entry
78 ; CHECK-NEXT: vdup.32 q3, r0
79 ; CHECK-NEXT: vcmp.s32 ge, q3, q0
80 ; CHECK-NEXT: vpsel q0, q1, q2
83 %i = insertelement <4 x i32> undef, i32 %src2, i32 0
84 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
85 %c = icmp sle <4 x i32> %src, %sp
86 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
90 define arm_aapcs_vfpcc <4 x i32> @vcmp_ugt_v4i32(<4 x i32> %src, i32 %src2, <4 x i32> %a, <4 x i32> %b) {
91 ; CHECK-LABEL: vcmp_ugt_v4i32:
92 ; CHECK: @ %bb.0: @ %entry
93 ; CHECK-NEXT: vcmp.u32 hi, q0, r0
94 ; CHECK-NEXT: vpsel q0, q1, q2
97 %i = insertelement <4 x i32> undef, i32 %src2, i32 0
98 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
99 %c = icmp ugt <4 x i32> %src, %sp
100 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
104 define arm_aapcs_vfpcc <4 x i32> @vcmp_uge_v4i32(<4 x i32> %src, i32 %src2, <4 x i32> %a, <4 x i32> %b) {
105 ; CHECK-LABEL: vcmp_uge_v4i32:
106 ; CHECK: @ %bb.0: @ %entry
107 ; CHECK-NEXT: vcmp.u32 cs, q0, r0
108 ; CHECK-NEXT: vpsel q0, q1, q2
111 %i = insertelement <4 x i32> undef, i32 %src2, i32 0
112 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
113 %c = icmp uge <4 x i32> %src, %sp
114 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
118 define arm_aapcs_vfpcc <4 x i32> @vcmp_ult_v4i32(<4 x i32> %src, i32 %src2, <4 x i32> %a, <4 x i32> %b) {
119 ; CHECK-LABEL: vcmp_ult_v4i32:
120 ; CHECK: @ %bb.0: @ %entry
121 ; CHECK-NEXT: vdup.32 q3, r0
122 ; CHECK-NEXT: vcmp.u32 hi, q3, q0
123 ; CHECK-NEXT: vpsel q0, q1, q2
126 %i = insertelement <4 x i32> undef, i32 %src2, i32 0
127 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
128 %c = icmp ult <4 x i32> %src, %sp
129 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
133 define arm_aapcs_vfpcc <4 x i32> @vcmp_ule_v4i32(<4 x i32> %src, i32 %src2, <4 x i32> %a, <4 x i32> %b) {
134 ; CHECK-LABEL: vcmp_ule_v4i32:
135 ; CHECK: @ %bb.0: @ %entry
136 ; CHECK-NEXT: vdup.32 q3, r0
137 ; CHECK-NEXT: vcmp.u32 cs, q3, q0
138 ; CHECK-NEXT: vpsel q0, q1, q2
141 %i = insertelement <4 x i32> undef, i32 %src2, i32 0
142 %sp = shufflevector <4 x i32> %i, <4 x i32> undef, <4 x i32> zeroinitializer
143 %c = icmp ule <4 x i32> %src, %sp
144 %s = select <4 x i1> %c, <4 x i32> %a, <4 x i32> %b
149 define arm_aapcs_vfpcc <8 x i16> @vcmp_eq_v8i16(<8 x i16> %src, i16 %src2, <8 x i16> %a, <8 x i16> %b) {
150 ; CHECK-LABEL: vcmp_eq_v8i16:
151 ; CHECK: @ %bb.0: @ %entry
152 ; CHECK-NEXT: vcmp.i16 eq, q0, r0
153 ; CHECK-NEXT: vpsel q0, q1, q2
156 %i = insertelement <8 x i16> undef, i16 %src2, i32 0
157 %sp = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
158 %c = icmp eq <8 x i16> %src, %sp
159 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
163 define arm_aapcs_vfpcc <8 x i16> @vcmp_ne_v8i16(<8 x i16> %src, i16 %src2, <8 x i16> %a, <8 x i16> %b) {
164 ; CHECK-LABEL: vcmp_ne_v8i16:
165 ; CHECK: @ %bb.0: @ %entry
166 ; CHECK-NEXT: vcmp.i16 ne, q0, r0
167 ; CHECK-NEXT: vpsel q0, q1, q2
170 %i = insertelement <8 x i16> undef, i16 %src2, i32 0
171 %sp = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
172 %c = icmp ne <8 x i16> %src, %sp
173 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
177 define arm_aapcs_vfpcc <8 x i16> @vcmp_sgt_v8i16(<8 x i16> %src, i16 %src2, <8 x i16> %a, <8 x i16> %b) {
178 ; CHECK-LABEL: vcmp_sgt_v8i16:
179 ; CHECK: @ %bb.0: @ %entry
180 ; CHECK-NEXT: vcmp.s16 gt, q0, r0
181 ; CHECK-NEXT: vpsel q0, q1, q2
184 %i = insertelement <8 x i16> undef, i16 %src2, i32 0
185 %sp = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
186 %c = icmp sgt <8 x i16> %src, %sp
187 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
191 define arm_aapcs_vfpcc <8 x i16> @vcmp_sge_v8i16(<8 x i16> %src, i16 %src2, <8 x i16> %a, <8 x i16> %b) {
192 ; CHECK-LABEL: vcmp_sge_v8i16:
193 ; CHECK: @ %bb.0: @ %entry
194 ; CHECK-NEXT: vcmp.s16 ge, q0, r0
195 ; CHECK-NEXT: vpsel q0, q1, q2
198 %i = insertelement <8 x i16> undef, i16 %src2, i32 0
199 %sp = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
200 %c = icmp sge <8 x i16> %src, %sp
201 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
205 define arm_aapcs_vfpcc <8 x i16> @vcmp_slt_v8i16(<8 x i16> %src, i16 %src2, <8 x i16> %a, <8 x i16> %b) {
206 ; CHECK-LABEL: vcmp_slt_v8i16:
207 ; CHECK: @ %bb.0: @ %entry
208 ; CHECK-NEXT: vdup.16 q3, r0
209 ; CHECK-NEXT: vcmp.s16 gt, q3, q0
210 ; CHECK-NEXT: vpsel q0, q1, q2
213 %i = insertelement <8 x i16> undef, i16 %src2, i32 0
214 %sp = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
215 %c = icmp slt <8 x i16> %src, %sp
216 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
220 define arm_aapcs_vfpcc <8 x i16> @vcmp_sle_v8i16(<8 x i16> %src, i16 %src2, <8 x i16> %a, <8 x i16> %b) {
221 ; CHECK-LABEL: vcmp_sle_v8i16:
222 ; CHECK: @ %bb.0: @ %entry
223 ; CHECK-NEXT: vdup.16 q3, r0
224 ; CHECK-NEXT: vcmp.s16 ge, q3, q0
225 ; CHECK-NEXT: vpsel q0, q1, q2
228 %i = insertelement <8 x i16> undef, i16 %src2, i32 0
229 %sp = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
230 %c = icmp sle <8 x i16> %src, %sp
231 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
235 define arm_aapcs_vfpcc <8 x i16> @vcmp_ugt_v8i16(<8 x i16> %src, i16 %src2, <8 x i16> %a, <8 x i16> %b) {
236 ; CHECK-LABEL: vcmp_ugt_v8i16:
237 ; CHECK: @ %bb.0: @ %entry
238 ; CHECK-NEXT: vcmp.u16 hi, q0, r0
239 ; CHECK-NEXT: vpsel q0, q1, q2
242 %i = insertelement <8 x i16> undef, i16 %src2, i32 0
243 %sp = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
244 %c = icmp ugt <8 x i16> %src, %sp
245 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
249 define arm_aapcs_vfpcc <8 x i16> @vcmp_uge_v8i16(<8 x i16> %src, i16 %src2, <8 x i16> %a, <8 x i16> %b) {
250 ; CHECK-LABEL: vcmp_uge_v8i16:
251 ; CHECK: @ %bb.0: @ %entry
252 ; CHECK-NEXT: vcmp.u16 cs, q0, r0
253 ; CHECK-NEXT: vpsel q0, q1, q2
256 %i = insertelement <8 x i16> undef, i16 %src2, i32 0
257 %sp = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
258 %c = icmp uge <8 x i16> %src, %sp
259 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
263 define arm_aapcs_vfpcc <8 x i16> @vcmp_ult_v8i16(<8 x i16> %src, i16 %src2, <8 x i16> %a, <8 x i16> %b) {
264 ; CHECK-LABEL: vcmp_ult_v8i16:
265 ; CHECK: @ %bb.0: @ %entry
266 ; CHECK-NEXT: vdup.16 q3, r0
267 ; CHECK-NEXT: vcmp.u16 hi, q3, q0
268 ; CHECK-NEXT: vpsel q0, q1, q2
271 %i = insertelement <8 x i16> undef, i16 %src2, i32 0
272 %sp = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
273 %c = icmp ult <8 x i16> %src, %sp
274 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
278 define arm_aapcs_vfpcc <8 x i16> @vcmp_ule_v8i16(<8 x i16> %src, i16 %src2, <8 x i16> %a, <8 x i16> %b) {
279 ; CHECK-LABEL: vcmp_ule_v8i16:
280 ; CHECK: @ %bb.0: @ %entry
281 ; CHECK-NEXT: vdup.16 q3, r0
282 ; CHECK-NEXT: vcmp.u16 cs, q3, q0
283 ; CHECK-NEXT: vpsel q0, q1, q2
286 %i = insertelement <8 x i16> undef, i16 %src2, i32 0
287 %sp = shufflevector <8 x i16> %i, <8 x i16> undef, <8 x i32> zeroinitializer
288 %c = icmp ule <8 x i16> %src, %sp
289 %s = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
294 define arm_aapcs_vfpcc <16 x i8> @vcmp_eq_v16i8(<16 x i8> %src, i8 %src2, <16 x i8> %a, <16 x i8> %b) {
295 ; CHECK-LABEL: vcmp_eq_v16i8:
296 ; CHECK: @ %bb.0: @ %entry
297 ; CHECK-NEXT: vcmp.i8 eq, q0, r0
298 ; CHECK-NEXT: vpsel q0, q1, q2
301 %i = insertelement <16 x i8> undef, i8 %src2, i32 0
302 %sp = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
303 %c = icmp eq <16 x i8> %src, %sp
304 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
308 define arm_aapcs_vfpcc <16 x i8> @vcmp_ne_v16i8(<16 x i8> %src, i8 %src2, <16 x i8> %a, <16 x i8> %b) {
309 ; CHECK-LABEL: vcmp_ne_v16i8:
310 ; CHECK: @ %bb.0: @ %entry
311 ; CHECK-NEXT: vcmp.i8 ne, q0, r0
312 ; CHECK-NEXT: vpsel q0, q1, q2
315 %i = insertelement <16 x i8> undef, i8 %src2, i32 0
316 %sp = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
317 %c = icmp ne <16 x i8> %src, %sp
318 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
322 define arm_aapcs_vfpcc <16 x i8> @vcmp_sgt_v16i8(<16 x i8> %src, i8 %src2, <16 x i8> %a, <16 x i8> %b) {
323 ; CHECK-LABEL: vcmp_sgt_v16i8:
324 ; CHECK: @ %bb.0: @ %entry
325 ; CHECK-NEXT: vcmp.s8 gt, q0, r0
326 ; CHECK-NEXT: vpsel q0, q1, q2
329 %i = insertelement <16 x i8> undef, i8 %src2, i32 0
330 %sp = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
331 %c = icmp sgt <16 x i8> %src, %sp
332 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
336 define arm_aapcs_vfpcc <16 x i8> @vcmp_sge_v16i8(<16 x i8> %src, i8 %src2, <16 x i8> %a, <16 x i8> %b) {
337 ; CHECK-LABEL: vcmp_sge_v16i8:
338 ; CHECK: @ %bb.0: @ %entry
339 ; CHECK-NEXT: vcmp.s8 ge, q0, r0
340 ; CHECK-NEXT: vpsel q0, q1, q2
343 %i = insertelement <16 x i8> undef, i8 %src2, i32 0
344 %sp = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
345 %c = icmp sge <16 x i8> %src, %sp
346 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
350 define arm_aapcs_vfpcc <16 x i8> @vcmp_slt_v16i8(<16 x i8> %src, i8 %src2, <16 x i8> %a, <16 x i8> %b) {
351 ; CHECK-LABEL: vcmp_slt_v16i8:
352 ; CHECK: @ %bb.0: @ %entry
353 ; CHECK-NEXT: vdup.8 q3, r0
354 ; CHECK-NEXT: vcmp.s8 gt, q3, q0
355 ; CHECK-NEXT: vpsel q0, q1, q2
358 %i = insertelement <16 x i8> undef, i8 %src2, i32 0
359 %sp = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
360 %c = icmp slt <16 x i8> %src, %sp
361 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
365 define arm_aapcs_vfpcc <16 x i8> @vcmp_sle_v16i8(<16 x i8> %src, i8 %src2, <16 x i8> %a, <16 x i8> %b) {
366 ; CHECK-LABEL: vcmp_sle_v16i8:
367 ; CHECK: @ %bb.0: @ %entry
368 ; CHECK-NEXT: vdup.8 q3, r0
369 ; CHECK-NEXT: vcmp.s8 ge, q3, q0
370 ; CHECK-NEXT: vpsel q0, q1, q2
373 %i = insertelement <16 x i8> undef, i8 %src2, i32 0
374 %sp = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
375 %c = icmp sle <16 x i8> %src, %sp
376 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
380 define arm_aapcs_vfpcc <16 x i8> @vcmp_ugt_v16i8(<16 x i8> %src, i8 %src2, <16 x i8> %a, <16 x i8> %b) {
381 ; CHECK-LABEL: vcmp_ugt_v16i8:
382 ; CHECK: @ %bb.0: @ %entry
383 ; CHECK-NEXT: vcmp.u8 hi, q0, r0
384 ; CHECK-NEXT: vpsel q0, q1, q2
387 %i = insertelement <16 x i8> undef, i8 %src2, i32 0
388 %sp = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
389 %c = icmp ugt <16 x i8> %src, %sp
390 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
394 define arm_aapcs_vfpcc <16 x i8> @vcmp_uge_v16i8(<16 x i8> %src, i8 %src2, <16 x i8> %a, <16 x i8> %b) {
395 ; CHECK-LABEL: vcmp_uge_v16i8:
396 ; CHECK: @ %bb.0: @ %entry
397 ; CHECK-NEXT: vcmp.u8 cs, q0, r0
398 ; CHECK-NEXT: vpsel q0, q1, q2
401 %i = insertelement <16 x i8> undef, i8 %src2, i32 0
402 %sp = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
403 %c = icmp uge <16 x i8> %src, %sp
404 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
408 define arm_aapcs_vfpcc <16 x i8> @vcmp_ult_v16i8(<16 x i8> %src, i8 %src2, <16 x i8> %a, <16 x i8> %b) {
409 ; CHECK-LABEL: vcmp_ult_v16i8:
410 ; CHECK: @ %bb.0: @ %entry
411 ; CHECK-NEXT: vdup.8 q3, r0
412 ; CHECK-NEXT: vcmp.u8 hi, q3, q0
413 ; CHECK-NEXT: vpsel q0, q1, q2
416 %i = insertelement <16 x i8> undef, i8 %src2, i32 0
417 %sp = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
418 %c = icmp ult <16 x i8> %src, %sp
419 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
423 define arm_aapcs_vfpcc <16 x i8> @vcmp_ule_v16i8(<16 x i8> %src, i8 %src2, <16 x i8> %a, <16 x i8> %b) {
424 ; CHECK-LABEL: vcmp_ule_v16i8:
425 ; CHECK: @ %bb.0: @ %entry
426 ; CHECK-NEXT: vdup.8 q3, r0
427 ; CHECK-NEXT: vcmp.u8 cs, q3, q0
428 ; CHECK-NEXT: vpsel q0, q1, q2
431 %i = insertelement <16 x i8> undef, i8 %src2, i32 0
432 %sp = shufflevector <16 x i8> %i, <16 x i8> undef, <16 x i32> zeroinitializer
433 %c = icmp ule <16 x i8> %src, %sp
434 %s = select <16 x i1> %c, <16 x i8> %a, <16 x i8> %b
439 define arm_aapcs_vfpcc <2 x i64> @vcmp_eq_v2i64(<2 x i64> %src, i64 %src2, <2 x i64> %a, <2 x i64> %b) {
440 ; CHECK-LABEL: vcmp_eq_v2i64:
441 ; CHECK: @ %bb.0: @ %entry
442 ; CHECK-NEXT: vmov r2, s1
443 ; CHECK-NEXT: vmov r3, s0
444 ; CHECK-NEXT: eors r2, r1
445 ; CHECK-NEXT: eors r3, r0
446 ; CHECK-NEXT: orrs r2, r3
447 ; CHECK-NEXT: cset r2, eq
448 ; CHECK-NEXT: tst.w r2, #1
449 ; CHECK-NEXT: csetm r2, ne
450 ; CHECK-NEXT: vmov.32 q3[0], r2
451 ; CHECK-NEXT: vmov.32 q3[1], r2
452 ; CHECK-NEXT: vmov r2, s3
453 ; CHECK-NEXT: eors r1, r2
454 ; CHECK-NEXT: vmov r2, s2
455 ; CHECK-NEXT: eors r0, r2
456 ; CHECK-NEXT: orrs r0, r1
457 ; CHECK-NEXT: cset r0, eq
458 ; CHECK-NEXT: tst.w r0, #1
459 ; CHECK-NEXT: csetm r0, ne
460 ; CHECK-NEXT: vmov.32 q3[2], r0
461 ; CHECK-NEXT: vmov.32 q3[3], r0
462 ; CHECK-NEXT: vbic q0, q2, q3
463 ; CHECK-NEXT: vand q1, q1, q3
464 ; CHECK-NEXT: vorr q0, q1, q0
467 %i = insertelement <2 x i64> undef, i64 %src2, i32 0
468 %sp = shufflevector <2 x i64> %i, <2 x i64> undef, <2 x i32> zeroinitializer
469 %c = icmp eq <2 x i64> %src, %sp
470 %s = select <2 x i1> %c, <2 x i64> %a, <2 x i64> %b
474 define arm_aapcs_vfpcc <2 x i32> @vcmp_eq_v2i32(<2 x i64> %src, i64 %src2, <2 x i32> %a, <2 x i32> %b) {
475 ; CHECK-LABEL: vcmp_eq_v2i32:
476 ; CHECK: @ %bb.0: @ %entry
477 ; CHECK-NEXT: vmov r2, s1
478 ; CHECK-NEXT: vmov r3, s0
479 ; CHECK-NEXT: eors r2, r1
480 ; CHECK-NEXT: eors r3, r0
481 ; CHECK-NEXT: orrs r2, r3
482 ; CHECK-NEXT: cset r2, eq
483 ; CHECK-NEXT: tst.w r2, #1
484 ; CHECK-NEXT: csetm r2, ne
485 ; CHECK-NEXT: vmov.32 q3[0], r2
486 ; CHECK-NEXT: vmov.32 q3[1], r2
487 ; CHECK-NEXT: vmov r2, s3
488 ; CHECK-NEXT: eors r1, r2
489 ; CHECK-NEXT: vmov r2, s2
490 ; CHECK-NEXT: eors r0, r2
491 ; CHECK-NEXT: orrs r0, r1
492 ; CHECK-NEXT: cset r0, eq
493 ; CHECK-NEXT: tst.w r0, #1
494 ; CHECK-NEXT: csetm r0, ne
495 ; CHECK-NEXT: vmov.32 q3[2], r0
496 ; CHECK-NEXT: vmov.32 q3[3], r0
497 ; CHECK-NEXT: vbic q0, q2, q3
498 ; CHECK-NEXT: vand q1, q1, q3
499 ; CHECK-NEXT: vorr q0, q1, q0
502 %i = insertelement <2 x i64> undef, i64 %src2, i32 0
503 %sp = shufflevector <2 x i64> %i, <2 x i64> undef, <2 x i32> zeroinitializer
504 %c = icmp eq <2 x i64> %src, %sp
505 %s = select <2 x i1> %c, <2 x i32> %a, <2 x i32> %b
509 define arm_aapcs_vfpcc <2 x i32> @vcmp_multi_v2i32(<2 x i64> %a, <2 x i32> %b, <2 x i32> %c) {
510 ; CHECK-LABEL: vcmp_multi_v2i32:
512 ; CHECK-NEXT: .save {r7, lr}
513 ; CHECK-NEXT: push {r7, lr}
514 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
515 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
516 ; CHECK-NEXT: vmov r0, s1
517 ; CHECK-NEXT: movs r3, #0
518 ; CHECK-NEXT: vmov r1, s0
519 ; CHECK-NEXT: vmov r2, s8
520 ; CHECK-NEXT: orrs r0, r1
521 ; CHECK-NEXT: vmov r1, s2
522 ; CHECK-NEXT: cset r0, eq
523 ; CHECK-NEXT: tst.w r0, #1
524 ; CHECK-NEXT: csetm r0, ne
525 ; CHECK-NEXT: vmov.32 q3[0], r0
526 ; CHECK-NEXT: vmov.32 q3[1], r0
527 ; CHECK-NEXT: vmov r0, s3
528 ; CHECK-NEXT: orrs r0, r1
529 ; CHECK-NEXT: cset r0, eq
530 ; CHECK-NEXT: tst.w r0, #1
531 ; CHECK-NEXT: csetm r0, ne
532 ; CHECK-NEXT: vmov.32 q3[2], r0
533 ; CHECK-NEXT: vmov.32 q3[3], r0
534 ; CHECK-NEXT: vbic q0, q2, q3
535 ; CHECK-NEXT: vmov lr, s0
536 ; CHECK-NEXT: subs.w r1, lr, r2
537 ; CHECK-NEXT: asr.w r12, lr, #31
538 ; CHECK-NEXT: sbcs.w r1, r12, r2, asr #31
539 ; CHECK-NEXT: mov.w r1, #0
540 ; CHECK-NEXT: vmov r2, s10
542 ; CHECK-NEXT: movlt r1, #1
543 ; CHECK-NEXT: cmp r1, #0
544 ; CHECK-NEXT: csetm r1, ne
545 ; CHECK-NEXT: vmov.32 q3[0], r1
546 ; CHECK-NEXT: vmov.32 q3[1], r1
547 ; CHECK-NEXT: vmov r1, s2
548 ; CHECK-NEXT: subs r0, r1, r2
549 ; CHECK-NEXT: asr.w r12, r1, #31
550 ; CHECK-NEXT: sbcs.w r0, r12, r2, asr #31
552 ; CHECK-NEXT: movlt r3, #1
553 ; CHECK-NEXT: cmp r3, #0
554 ; CHECK-NEXT: csetm r0, ne
555 ; CHECK-NEXT: cmp.w lr, #0
556 ; CHECK-NEXT: vmov.32 q3[2], r0
557 ; CHECK-NEXT: vmov.32 q3[3], r0
558 ; CHECK-NEXT: cset r0, ne
559 ; CHECK-NEXT: tst.w r0, #1
560 ; CHECK-NEXT: csetm r0, ne
561 ; CHECK-NEXT: cmp r1, #0
562 ; CHECK-NEXT: vmov.32 q4[0], r0
563 ; CHECK-NEXT: vmov.32 q4[1], r0
564 ; CHECK-NEXT: cset r0, ne
565 ; CHECK-NEXT: tst.w r0, #1
566 ; CHECK-NEXT: csetm r0, ne
567 ; CHECK-NEXT: vmov.32 q4[2], r0
568 ; CHECK-NEXT: vmov.32 q4[3], r0
569 ; CHECK-NEXT: vmov r0, s4
570 ; CHECK-NEXT: cmp r0, #0
571 ; CHECK-NEXT: cset r0, ne
572 ; CHECK-NEXT: tst.w r0, #1
573 ; CHECK-NEXT: csetm r0, ne
574 ; CHECK-NEXT: vmov.32 q5[0], r0
575 ; CHECK-NEXT: vmov.32 q5[1], r0
576 ; CHECK-NEXT: vmov r0, s6
577 ; CHECK-NEXT: cmp r0, #0
578 ; CHECK-NEXT: cset r0, ne
579 ; CHECK-NEXT: tst.w r0, #1
580 ; CHECK-NEXT: csetm r0, ne
581 ; CHECK-NEXT: vmov.32 q5[2], r0
582 ; CHECK-NEXT: vmov.32 q5[3], r0
583 ; CHECK-NEXT: vand q1, q5, q4
584 ; CHECK-NEXT: vand q1, q3, q1
585 ; CHECK-NEXT: vbic q0, q0, q1
586 ; CHECK-NEXT: vand q1, q2, q1
587 ; CHECK-NEXT: vorr q0, q1, q0
588 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
589 ; CHECK-NEXT: pop {r7, pc}
590 %a4 = icmp eq <2 x i64> %a, zeroinitializer
591 %a5 = select <2 x i1> %a4, <2 x i32> zeroinitializer, <2 x i32> %c
592 %a6 = icmp ne <2 x i32> %b, zeroinitializer
593 %a7 = icmp slt <2 x i32> %a5, %c
594 %a8 = icmp ne <2 x i32> %a5, zeroinitializer
595 %a9 = and <2 x i1> %a6, %a8
596 %a10 = and <2 x i1> %a7, %a9
597 %a11 = select <2 x i1> %a10, <2 x i32> %c, <2 x i32> %a5