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: clz r2, r2
448 ; CHECK-NEXT: lsrs r2, r2, #5
450 ; CHECK-NEXT: movne.w r2, #-1
451 ; CHECK-NEXT: vmov.32 q3[0], r2
452 ; CHECK-NEXT: vmov.32 q3[1], r2
453 ; CHECK-NEXT: vmov r2, s3
454 ; CHECK-NEXT: eors r1, r2
455 ; CHECK-NEXT: vmov r2, s2
456 ; CHECK-NEXT: eors r0, r2
457 ; CHECK-NEXT: orrs r0, r1
458 ; CHECK-NEXT: clz r0, r0
459 ; CHECK-NEXT: lsrs r0, r0, #5
461 ; CHECK-NEXT: movne.w r0, #-1
462 ; CHECK-NEXT: vmov.32 q3[2], r0
463 ; CHECK-NEXT: vmov.32 q3[3], r0
464 ; CHECK-NEXT: vbic q0, q2, q3
465 ; CHECK-NEXT: vand q1, q1, q3
466 ; CHECK-NEXT: vorr q0, q1, q0
469 %i = insertelement <2 x i64> undef, i64 %src2, i32 0
470 %sp = shufflevector <2 x i64> %i, <2 x i64> undef, <2 x i32> zeroinitializer
471 %c = icmp eq <2 x i64> %src, %sp
472 %s = select <2 x i1> %c, <2 x i64> %a, <2 x i64> %b
476 define arm_aapcs_vfpcc <2 x i32> @vcmp_eq_v2i32(<2 x i64> %src, i64 %src2, <2 x i32> %a, <2 x i32> %b) {
477 ; CHECK-LABEL: vcmp_eq_v2i32:
478 ; CHECK: @ %bb.0: @ %entry
479 ; CHECK-NEXT: vmov r2, s1
480 ; CHECK-NEXT: vmov r3, s0
481 ; CHECK-NEXT: eors r2, r1
482 ; CHECK-NEXT: eors r3, r0
483 ; CHECK-NEXT: orrs r2, r3
484 ; CHECK-NEXT: clz r2, r2
485 ; CHECK-NEXT: lsrs r2, r2, #5
487 ; CHECK-NEXT: movne.w r2, #-1
488 ; CHECK-NEXT: vmov.32 q3[0], r2
489 ; CHECK-NEXT: vmov.32 q3[1], r2
490 ; CHECK-NEXT: vmov r2, s3
491 ; CHECK-NEXT: eors r1, r2
492 ; CHECK-NEXT: vmov r2, s2
493 ; CHECK-NEXT: eors r0, r2
494 ; CHECK-NEXT: orrs r0, r1
495 ; CHECK-NEXT: clz r0, r0
496 ; CHECK-NEXT: lsrs r0, r0, #5
498 ; CHECK-NEXT: movne.w r0, #-1
499 ; CHECK-NEXT: vmov.32 q3[2], r0
500 ; CHECK-NEXT: vmov.32 q3[3], r0
501 ; CHECK-NEXT: vbic q0, q2, q3
502 ; CHECK-NEXT: vand q1, q1, q3
503 ; CHECK-NEXT: vorr q0, q1, q0
506 %i = insertelement <2 x i64> undef, i64 %src2, i32 0
507 %sp = shufflevector <2 x i64> %i, <2 x i64> undef, <2 x i32> zeroinitializer
508 %c = icmp eq <2 x i64> %src, %sp
509 %s = select <2 x i1> %c, <2 x i32> %a, <2 x i32> %b
513 define arm_aapcs_vfpcc <2 x i32> @vcmp_multi_v2i32(<2 x i64> %a, <2 x i32> %b, <2 x i32> %c) {
514 ; CHECK-LABEL: vcmp_multi_v2i32:
516 ; CHECK-NEXT: .save {r7, lr}
517 ; CHECK-NEXT: push {r7, lr}
518 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
519 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
520 ; CHECK-NEXT: vmov r0, s1
521 ; CHECK-NEXT: movs r3, #0
522 ; CHECK-NEXT: vmov r1, s0
523 ; CHECK-NEXT: vmov r2, s8
524 ; CHECK-NEXT: vmov lr, s10
525 ; CHECK-NEXT: orrs r0, r1
526 ; CHECK-NEXT: vmov r1, s2
527 ; CHECK-NEXT: clz r0, r0
528 ; CHECK-NEXT: lsrs r0, r0, #5
530 ; CHECK-NEXT: movne.w r0, #-1
531 ; CHECK-NEXT: vmov.32 q3[0], r0
532 ; CHECK-NEXT: vmov.32 q3[1], r0
533 ; CHECK-NEXT: vmov r0, s3
534 ; CHECK-NEXT: orrs r0, r1
535 ; CHECK-NEXT: clz r0, r0
536 ; CHECK-NEXT: lsrs r0, r0, #5
538 ; CHECK-NEXT: movne.w r0, #-1
539 ; CHECK-NEXT: vmov.32 q3[2], r0
540 ; CHECK-NEXT: vmov.32 q3[3], r0
541 ; CHECK-NEXT: vbic q0, q2, q3
542 ; CHECK-NEXT: vmov r0, s0
543 ; CHECK-NEXT: subs r1, r0, r2
544 ; CHECK-NEXT: asr.w r12, r0, #31
545 ; CHECK-NEXT: sbcs.w r1, r12, r2, asr #31
546 ; CHECK-NEXT: mov.w r1, #0
548 ; CHECK-NEXT: movlt r1, #1
549 ; CHECK-NEXT: cmp r1, #0
551 ; CHECK-NEXT: movne.w r1, #-1
552 ; CHECK-NEXT: vmov.32 q3[0], r1
553 ; CHECK-NEXT: vmov.32 q3[1], r1
554 ; CHECK-NEXT: vmov r1, s2
555 ; CHECK-NEXT: subs.w r2, r1, lr
556 ; CHECK-NEXT: asr.w r12, r1, #31
557 ; CHECK-NEXT: sbcs.w r2, r12, lr, asr #31
559 ; CHECK-NEXT: movlt r3, #1
560 ; CHECK-NEXT: cmp r3, #0
562 ; CHECK-NEXT: movne.w r3, #-1
563 ; CHECK-NEXT: cmp r0, #0
565 ; CHECK-NEXT: movne r0, #1
566 ; CHECK-NEXT: cmp r0, #0
568 ; CHECK-NEXT: movne.w r0, #-1
569 ; CHECK-NEXT: vmov.32 q4[0], r0
570 ; CHECK-NEXT: vmov.32 q4[1], r0
571 ; CHECK-NEXT: vmov r0, s4
572 ; CHECK-NEXT: cmp r1, #0
574 ; CHECK-NEXT: movne r1, #1
575 ; CHECK-NEXT: cmp r1, #0
577 ; CHECK-NEXT: movne.w r1, #-1
578 ; CHECK-NEXT: vmov.32 q4[2], r1
579 ; CHECK-NEXT: vmov.32 q3[2], r3
580 ; CHECK-NEXT: vmov.32 q4[3], r1
581 ; CHECK-NEXT: vmov.32 q3[3], r3
582 ; CHECK-NEXT: cmp r0, #0
584 ; CHECK-NEXT: movne r0, #1
585 ; CHECK-NEXT: cmp r0, #0
587 ; CHECK-NEXT: movne.w r0, #-1
588 ; CHECK-NEXT: vmov.32 q5[0], r0
589 ; CHECK-NEXT: vmov.32 q5[1], r0
590 ; CHECK-NEXT: vmov r0, s6
591 ; CHECK-NEXT: cmp r0, #0
593 ; CHECK-NEXT: movne r0, #1
594 ; CHECK-NEXT: cmp r0, #0
596 ; CHECK-NEXT: movne.w r0, #-1
597 ; CHECK-NEXT: vmov.32 q5[2], r0
598 ; CHECK-NEXT: vmov.32 q5[3], r0
599 ; CHECK-NEXT: vand q1, q5, q4
600 ; CHECK-NEXT: vand q1, q3, q1
601 ; CHECK-NEXT: vbic q0, q0, q1
602 ; CHECK-NEXT: vand q1, q2, q1
603 ; CHECK-NEXT: vorr q0, q1, q0
604 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
605 ; CHECK-NEXT: pop {r7, pc}
606 %a4 = icmp eq <2 x i64> %a, zeroinitializer
607 %a5 = select <2 x i1> %a4, <2 x i32> zeroinitializer, <2 x i32> %c
608 %a6 = icmp ne <2 x i32> %b, zeroinitializer
609 %a7 = icmp slt <2 x i32> %a5, %c
610 %a8 = icmp ne <2 x i32> %a5, zeroinitializer
611 %a9 = and <2 x i1> %a6, %a8
612 %a10 = and <2 x i1> %a7, %a9
613 %a11 = select <2 x i1> %a10, <2 x i32> %c, <2 x i32> %a5