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,+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK-MVE
3 ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK-MVEFP
5 define arm_aapcs_vfpcc <4 x float> @vcmp_oeq_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
6 ; CHECK-MVE-LABEL: vcmp_oeq_v4f32:
7 ; CHECK-MVE: @ %bb.0: @ %entry
8 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
9 ; CHECK-MVE-NEXT: movs r1, #0
10 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
11 ; CHECK-MVE-NEXT: it eq
12 ; CHECK-MVE-NEXT: moveq r1, #1
13 ; CHECK-MVE-NEXT: cmp r1, #0
14 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
15 ; CHECK-MVE-NEXT: cset r1, ne
16 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
17 ; CHECK-MVE-NEXT: mov.w r2, #0
18 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
19 ; CHECK-MVE-NEXT: it eq
20 ; CHECK-MVE-NEXT: moveq r2, #1
21 ; CHECK-MVE-NEXT: cmp r2, #0
22 ; CHECK-MVE-NEXT: cset r2, ne
23 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
24 ; CHECK-MVE-NEXT: mov.w r3, #0
25 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
26 ; CHECK-MVE-NEXT: it eq
27 ; CHECK-MVE-NEXT: moveq r3, #1
28 ; CHECK-MVE-NEXT: cmp r3, #0
29 ; CHECK-MVE-NEXT: cset r3, ne
30 ; CHECK-MVE-NEXT: movs r0, #0
31 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
32 ; CHECK-MVE-NEXT: it eq
33 ; CHECK-MVE-NEXT: moveq r0, #1
34 ; CHECK-MVE-NEXT: cmp r0, #0
35 ; CHECK-MVE-NEXT: cset r0, ne
36 ; CHECK-MVE-NEXT: cmp r3, #0
37 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
38 ; CHECK-MVE-NEXT: cmp r0, #0
39 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
40 ; CHECK-MVE-NEXT: cmp r1, #0
41 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
42 ; CHECK-MVE-NEXT: cmp r2, #0
43 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
44 ; CHECK-MVE-NEXT: bx lr
46 ; CHECK-MVEFP-LABEL: vcmp_oeq_v4f32:
47 ; CHECK-MVEFP: @ %bb.0: @ %entry
48 ; CHECK-MVEFP-NEXT: vcmp.f32 eq, q0, zr
49 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
50 ; CHECK-MVEFP-NEXT: bx lr
52 %c = fcmp oeq <4 x float> %src, zeroinitializer
53 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
57 define arm_aapcs_vfpcc <4 x float> @vcmp_one_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
58 ; CHECK-MVE-LABEL: vcmp_one_v4f32:
59 ; CHECK-MVE: @ %bb.0: @ %entry
60 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
61 ; CHECK-MVE-NEXT: movs r1, #0
62 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
63 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
64 ; CHECK-MVE-NEXT: it mi
65 ; CHECK-MVE-NEXT: movmi r1, #1
66 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
67 ; CHECK-MVE-NEXT: it gt
68 ; CHECK-MVE-NEXT: movgt r1, #1
69 ; CHECK-MVE-NEXT: cmp r1, #0
70 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
71 ; CHECK-MVE-NEXT: mov.w r2, #0
72 ; CHECK-MVE-NEXT: cset r1, ne
73 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
74 ; CHECK-MVE-NEXT: it mi
75 ; CHECK-MVE-NEXT: movmi r2, #1
76 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
77 ; CHECK-MVE-NEXT: it gt
78 ; CHECK-MVE-NEXT: movgt r2, #1
79 ; CHECK-MVE-NEXT: cmp r2, #0
80 ; CHECK-MVE-NEXT: mov.w r3, #0
81 ; CHECK-MVE-NEXT: cset r2, ne
82 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
83 ; CHECK-MVE-NEXT: it mi
84 ; CHECK-MVE-NEXT: movmi r3, #1
85 ; CHECK-MVE-NEXT: it gt
86 ; CHECK-MVE-NEXT: movgt r3, #1
87 ; CHECK-MVE-NEXT: cmp r3, #0
88 ; CHECK-MVE-NEXT: mov.w r0, #0
89 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
90 ; CHECK-MVE-NEXT: cset r3, ne
91 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
92 ; CHECK-MVE-NEXT: it mi
93 ; CHECK-MVE-NEXT: movmi r0, #1
94 ; CHECK-MVE-NEXT: it gt
95 ; CHECK-MVE-NEXT: movgt r0, #1
96 ; CHECK-MVE-NEXT: cmp r0, #0
97 ; CHECK-MVE-NEXT: cset r0, ne
98 ; CHECK-MVE-NEXT: cmp r3, #0
99 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
100 ; CHECK-MVE-NEXT: cmp r0, #0
101 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
102 ; CHECK-MVE-NEXT: cmp r1, #0
103 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
104 ; CHECK-MVE-NEXT: cmp r2, #0
105 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
106 ; CHECK-MVE-NEXT: bx lr
108 ; CHECK-MVEFP-LABEL: vcmp_one_v4f32:
109 ; CHECK-MVEFP: @ %bb.0: @ %entry
110 ; CHECK-MVEFP-NEXT: vpt.f32 ge, q0, zr
111 ; CHECK-MVEFP-NEXT: vcmpt.f32 le, q0, zr
112 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q1
113 ; CHECK-MVEFP-NEXT: bx lr
115 %c = fcmp one <4 x float> %src, zeroinitializer
116 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
120 define arm_aapcs_vfpcc <4 x float> @vcmp_ogt_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
121 ; CHECK-MVE-LABEL: vcmp_ogt_v4f32:
122 ; CHECK-MVE: @ %bb.0: @ %entry
123 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
124 ; CHECK-MVE-NEXT: movs r1, #0
125 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
126 ; CHECK-MVE-NEXT: it gt
127 ; CHECK-MVE-NEXT: movgt r1, #1
128 ; CHECK-MVE-NEXT: cmp r1, #0
129 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
130 ; CHECK-MVE-NEXT: cset r1, ne
131 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
132 ; CHECK-MVE-NEXT: mov.w r2, #0
133 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
134 ; CHECK-MVE-NEXT: it gt
135 ; CHECK-MVE-NEXT: movgt r2, #1
136 ; CHECK-MVE-NEXT: cmp r2, #0
137 ; CHECK-MVE-NEXT: cset r2, ne
138 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
139 ; CHECK-MVE-NEXT: mov.w r3, #0
140 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
141 ; CHECK-MVE-NEXT: it gt
142 ; CHECK-MVE-NEXT: movgt r3, #1
143 ; CHECK-MVE-NEXT: cmp r3, #0
144 ; CHECK-MVE-NEXT: cset r3, ne
145 ; CHECK-MVE-NEXT: movs r0, #0
146 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
147 ; CHECK-MVE-NEXT: it gt
148 ; CHECK-MVE-NEXT: movgt r0, #1
149 ; CHECK-MVE-NEXT: cmp r0, #0
150 ; CHECK-MVE-NEXT: cset r0, ne
151 ; CHECK-MVE-NEXT: cmp r3, #0
152 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
153 ; CHECK-MVE-NEXT: cmp r0, #0
154 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
155 ; CHECK-MVE-NEXT: cmp r1, #0
156 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
157 ; CHECK-MVE-NEXT: cmp r2, #0
158 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
159 ; CHECK-MVE-NEXT: bx lr
161 ; CHECK-MVEFP-LABEL: vcmp_ogt_v4f32:
162 ; CHECK-MVEFP: @ %bb.0: @ %entry
163 ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q0, zr
164 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
165 ; CHECK-MVEFP-NEXT: bx lr
167 %c = fcmp ogt <4 x float> %src, zeroinitializer
168 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
172 define arm_aapcs_vfpcc <4 x float> @vcmp_oge_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
173 ; CHECK-MVE-LABEL: vcmp_oge_v4f32:
174 ; CHECK-MVE: @ %bb.0: @ %entry
175 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
176 ; CHECK-MVE-NEXT: movs r1, #0
177 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
178 ; CHECK-MVE-NEXT: it ge
179 ; CHECK-MVE-NEXT: movge r1, #1
180 ; CHECK-MVE-NEXT: cmp r1, #0
181 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
182 ; CHECK-MVE-NEXT: cset r1, ne
183 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
184 ; CHECK-MVE-NEXT: mov.w r2, #0
185 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
186 ; CHECK-MVE-NEXT: it ge
187 ; CHECK-MVE-NEXT: movge r2, #1
188 ; CHECK-MVE-NEXT: cmp r2, #0
189 ; CHECK-MVE-NEXT: cset r2, ne
190 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
191 ; CHECK-MVE-NEXT: mov.w r3, #0
192 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
193 ; CHECK-MVE-NEXT: it ge
194 ; CHECK-MVE-NEXT: movge r3, #1
195 ; CHECK-MVE-NEXT: cmp r3, #0
196 ; CHECK-MVE-NEXT: cset r3, ne
197 ; CHECK-MVE-NEXT: movs r0, #0
198 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
199 ; CHECK-MVE-NEXT: it ge
200 ; CHECK-MVE-NEXT: movge r0, #1
201 ; CHECK-MVE-NEXT: cmp r0, #0
202 ; CHECK-MVE-NEXT: cset r0, ne
203 ; CHECK-MVE-NEXT: cmp r3, #0
204 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
205 ; CHECK-MVE-NEXT: cmp r0, #0
206 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
207 ; CHECK-MVE-NEXT: cmp r1, #0
208 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
209 ; CHECK-MVE-NEXT: cmp r2, #0
210 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
211 ; CHECK-MVE-NEXT: bx lr
213 ; CHECK-MVEFP-LABEL: vcmp_oge_v4f32:
214 ; CHECK-MVEFP: @ %bb.0: @ %entry
215 ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q0, zr
216 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
217 ; CHECK-MVEFP-NEXT: bx lr
219 %c = fcmp oge <4 x float> %src, zeroinitializer
220 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
224 define arm_aapcs_vfpcc <4 x float> @vcmp_olt_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
225 ; CHECK-MVE-LABEL: vcmp_olt_v4f32:
226 ; CHECK-MVE: @ %bb.0: @ %entry
227 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
228 ; CHECK-MVE-NEXT: movs r1, #0
229 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
230 ; CHECK-MVE-NEXT: it mi
231 ; CHECK-MVE-NEXT: movmi r1, #1
232 ; CHECK-MVE-NEXT: cmp r1, #0
233 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
234 ; CHECK-MVE-NEXT: cset r1, ne
235 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
236 ; CHECK-MVE-NEXT: mov.w r2, #0
237 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
238 ; CHECK-MVE-NEXT: it mi
239 ; CHECK-MVE-NEXT: movmi r2, #1
240 ; CHECK-MVE-NEXT: cmp r2, #0
241 ; CHECK-MVE-NEXT: cset r2, ne
242 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
243 ; CHECK-MVE-NEXT: mov.w r3, #0
244 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
245 ; CHECK-MVE-NEXT: it mi
246 ; CHECK-MVE-NEXT: movmi r3, #1
247 ; CHECK-MVE-NEXT: cmp r3, #0
248 ; CHECK-MVE-NEXT: cset r3, ne
249 ; CHECK-MVE-NEXT: movs r0, #0
250 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
251 ; CHECK-MVE-NEXT: it mi
252 ; CHECK-MVE-NEXT: movmi r0, #1
253 ; CHECK-MVE-NEXT: cmp r0, #0
254 ; CHECK-MVE-NEXT: cset r0, ne
255 ; CHECK-MVE-NEXT: cmp r3, #0
256 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
257 ; CHECK-MVE-NEXT: cmp r0, #0
258 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
259 ; CHECK-MVE-NEXT: cmp r1, #0
260 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
261 ; CHECK-MVE-NEXT: cmp r2, #0
262 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
263 ; CHECK-MVE-NEXT: bx lr
265 ; CHECK-MVEFP-LABEL: vcmp_olt_v4f32:
266 ; CHECK-MVEFP: @ %bb.0: @ %entry
267 ; CHECK-MVEFP-NEXT: vcmp.f32 lt, q0, zr
268 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
269 ; CHECK-MVEFP-NEXT: bx lr
271 %c = fcmp olt <4 x float> %src, zeroinitializer
272 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
276 define arm_aapcs_vfpcc <4 x float> @vcmp_ole_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
277 ; CHECK-MVE-LABEL: vcmp_ole_v4f32:
278 ; CHECK-MVE: @ %bb.0: @ %entry
279 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
280 ; CHECK-MVE-NEXT: movs r1, #0
281 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
282 ; CHECK-MVE-NEXT: it ls
283 ; CHECK-MVE-NEXT: movls r1, #1
284 ; CHECK-MVE-NEXT: cmp r1, #0
285 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
286 ; CHECK-MVE-NEXT: cset r1, ne
287 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
288 ; CHECK-MVE-NEXT: mov.w r2, #0
289 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
290 ; CHECK-MVE-NEXT: it ls
291 ; CHECK-MVE-NEXT: movls r2, #1
292 ; CHECK-MVE-NEXT: cmp r2, #0
293 ; CHECK-MVE-NEXT: cset r2, ne
294 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
295 ; CHECK-MVE-NEXT: mov.w r3, #0
296 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
297 ; CHECK-MVE-NEXT: it ls
298 ; CHECK-MVE-NEXT: movls r3, #1
299 ; CHECK-MVE-NEXT: cmp r3, #0
300 ; CHECK-MVE-NEXT: cset r3, ne
301 ; CHECK-MVE-NEXT: movs r0, #0
302 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
303 ; CHECK-MVE-NEXT: it ls
304 ; CHECK-MVE-NEXT: movls r0, #1
305 ; CHECK-MVE-NEXT: cmp r0, #0
306 ; CHECK-MVE-NEXT: cset r0, ne
307 ; CHECK-MVE-NEXT: cmp r3, #0
308 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
309 ; CHECK-MVE-NEXT: cmp r0, #0
310 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
311 ; CHECK-MVE-NEXT: cmp r1, #0
312 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
313 ; CHECK-MVE-NEXT: cmp r2, #0
314 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
315 ; CHECK-MVE-NEXT: bx lr
317 ; CHECK-MVEFP-LABEL: vcmp_ole_v4f32:
318 ; CHECK-MVEFP: @ %bb.0: @ %entry
319 ; CHECK-MVEFP-NEXT: vcmp.f32 le, q0, zr
320 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
321 ; CHECK-MVEFP-NEXT: bx lr
323 %c = fcmp ole <4 x float> %src, zeroinitializer
324 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
328 define arm_aapcs_vfpcc <4 x float> @vcmp_ueq_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
329 ; CHECK-MVE-LABEL: vcmp_ueq_v4f32:
330 ; CHECK-MVE: @ %bb.0: @ %entry
331 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
332 ; CHECK-MVE-NEXT: movs r1, #0
333 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
334 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
335 ; CHECK-MVE-NEXT: it eq
336 ; CHECK-MVE-NEXT: moveq r1, #1
337 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
338 ; CHECK-MVE-NEXT: it vs
339 ; CHECK-MVE-NEXT: movvs r1, #1
340 ; CHECK-MVE-NEXT: cmp r1, #0
341 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
342 ; CHECK-MVE-NEXT: mov.w r2, #0
343 ; CHECK-MVE-NEXT: cset r1, ne
344 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
345 ; CHECK-MVE-NEXT: it eq
346 ; CHECK-MVE-NEXT: moveq r2, #1
347 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
348 ; CHECK-MVE-NEXT: it vs
349 ; CHECK-MVE-NEXT: movvs r2, #1
350 ; CHECK-MVE-NEXT: cmp r2, #0
351 ; CHECK-MVE-NEXT: mov.w r3, #0
352 ; CHECK-MVE-NEXT: cset r2, ne
353 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
354 ; CHECK-MVE-NEXT: it eq
355 ; CHECK-MVE-NEXT: moveq r3, #1
356 ; CHECK-MVE-NEXT: it vs
357 ; CHECK-MVE-NEXT: movvs r3, #1
358 ; CHECK-MVE-NEXT: cmp r3, #0
359 ; CHECK-MVE-NEXT: mov.w r0, #0
360 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
361 ; CHECK-MVE-NEXT: cset r3, ne
362 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
363 ; CHECK-MVE-NEXT: it eq
364 ; CHECK-MVE-NEXT: moveq r0, #1
365 ; CHECK-MVE-NEXT: it vs
366 ; CHECK-MVE-NEXT: movvs r0, #1
367 ; CHECK-MVE-NEXT: cmp r0, #0
368 ; CHECK-MVE-NEXT: cset r0, ne
369 ; CHECK-MVE-NEXT: cmp r3, #0
370 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
371 ; CHECK-MVE-NEXT: cmp r0, #0
372 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
373 ; CHECK-MVE-NEXT: cmp r1, #0
374 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
375 ; CHECK-MVE-NEXT: cmp r2, #0
376 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
377 ; CHECK-MVE-NEXT: bx lr
379 ; CHECK-MVEFP-LABEL: vcmp_ueq_v4f32:
380 ; CHECK-MVEFP: @ %bb.0: @ %entry
381 ; CHECK-MVEFP-NEXT: vpt.f32 ge, q0, zr
382 ; CHECK-MVEFP-NEXT: vcmpt.f32 le, q0, zr
383 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
384 ; CHECK-MVEFP-NEXT: bx lr
386 %c = fcmp ueq <4 x float> %src, zeroinitializer
387 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
391 define arm_aapcs_vfpcc <4 x float> @vcmp_une_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
392 ; CHECK-MVE-LABEL: vcmp_une_v4f32:
393 ; CHECK-MVE: @ %bb.0: @ %entry
394 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
395 ; CHECK-MVE-NEXT: movs r1, #0
396 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
397 ; CHECK-MVE-NEXT: it ne
398 ; CHECK-MVE-NEXT: movne r1, #1
399 ; CHECK-MVE-NEXT: cmp r1, #0
400 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
401 ; CHECK-MVE-NEXT: cset r1, ne
402 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
403 ; CHECK-MVE-NEXT: mov.w r2, #0
404 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
405 ; CHECK-MVE-NEXT: it ne
406 ; CHECK-MVE-NEXT: movne r2, #1
407 ; CHECK-MVE-NEXT: cmp r2, #0
408 ; CHECK-MVE-NEXT: cset r2, ne
409 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
410 ; CHECK-MVE-NEXT: mov.w r3, #0
411 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
412 ; CHECK-MVE-NEXT: it ne
413 ; CHECK-MVE-NEXT: movne r3, #1
414 ; CHECK-MVE-NEXT: cmp r3, #0
415 ; CHECK-MVE-NEXT: cset r3, ne
416 ; CHECK-MVE-NEXT: movs r0, #0
417 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
418 ; CHECK-MVE-NEXT: it ne
419 ; CHECK-MVE-NEXT: movne r0, #1
420 ; CHECK-MVE-NEXT: cmp r0, #0
421 ; CHECK-MVE-NEXT: cset r0, ne
422 ; CHECK-MVE-NEXT: cmp r3, #0
423 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
424 ; CHECK-MVE-NEXT: cmp r0, #0
425 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
426 ; CHECK-MVE-NEXT: cmp r1, #0
427 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
428 ; CHECK-MVE-NEXT: cmp r2, #0
429 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
430 ; CHECK-MVE-NEXT: bx lr
432 ; CHECK-MVEFP-LABEL: vcmp_une_v4f32:
433 ; CHECK-MVEFP: @ %bb.0: @ %entry
434 ; CHECK-MVEFP-NEXT: vcmp.f32 ne, q0, zr
435 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
436 ; CHECK-MVEFP-NEXT: bx lr
438 %c = fcmp une <4 x float> %src, zeroinitializer
439 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
443 define arm_aapcs_vfpcc <4 x float> @vcmp_ugt_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
444 ; CHECK-MVE-LABEL: vcmp_ugt_v4f32:
445 ; CHECK-MVE: @ %bb.0: @ %entry
446 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
447 ; CHECK-MVE-NEXT: movs r1, #0
448 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
449 ; CHECK-MVE-NEXT: it hi
450 ; CHECK-MVE-NEXT: movhi r1, #1
451 ; CHECK-MVE-NEXT: cmp r1, #0
452 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
453 ; CHECK-MVE-NEXT: cset r1, ne
454 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
455 ; CHECK-MVE-NEXT: mov.w r2, #0
456 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
457 ; CHECK-MVE-NEXT: it hi
458 ; CHECK-MVE-NEXT: movhi r2, #1
459 ; CHECK-MVE-NEXT: cmp r2, #0
460 ; CHECK-MVE-NEXT: cset r2, ne
461 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
462 ; CHECK-MVE-NEXT: mov.w r3, #0
463 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
464 ; CHECK-MVE-NEXT: it hi
465 ; CHECK-MVE-NEXT: movhi r3, #1
466 ; CHECK-MVE-NEXT: cmp r3, #0
467 ; CHECK-MVE-NEXT: cset r3, ne
468 ; CHECK-MVE-NEXT: movs r0, #0
469 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
470 ; CHECK-MVE-NEXT: it hi
471 ; CHECK-MVE-NEXT: movhi r0, #1
472 ; CHECK-MVE-NEXT: cmp r0, #0
473 ; CHECK-MVE-NEXT: cset r0, ne
474 ; CHECK-MVE-NEXT: cmp r3, #0
475 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
476 ; CHECK-MVE-NEXT: cmp r0, #0
477 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
478 ; CHECK-MVE-NEXT: cmp r1, #0
479 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
480 ; CHECK-MVE-NEXT: cmp r2, #0
481 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
482 ; CHECK-MVE-NEXT: bx lr
484 ; CHECK-MVEFP-LABEL: vcmp_ugt_v4f32:
485 ; CHECK-MVEFP: @ %bb.0: @ %entry
486 ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q0, zr
487 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
488 ; CHECK-MVEFP-NEXT: bx lr
490 %c = fcmp ugt <4 x float> %src, zeroinitializer
491 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
495 define arm_aapcs_vfpcc <4 x float> @vcmp_uge_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
496 ; CHECK-MVE-LABEL: vcmp_uge_v4f32:
497 ; CHECK-MVE: @ %bb.0: @ %entry
498 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
499 ; CHECK-MVE-NEXT: movs r1, #0
500 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
501 ; CHECK-MVE-NEXT: it pl
502 ; CHECK-MVE-NEXT: movpl r1, #1
503 ; CHECK-MVE-NEXT: cmp r1, #0
504 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
505 ; CHECK-MVE-NEXT: cset r1, ne
506 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
507 ; CHECK-MVE-NEXT: mov.w r2, #0
508 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
509 ; CHECK-MVE-NEXT: it pl
510 ; CHECK-MVE-NEXT: movpl r2, #1
511 ; CHECK-MVE-NEXT: cmp r2, #0
512 ; CHECK-MVE-NEXT: cset r2, ne
513 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
514 ; CHECK-MVE-NEXT: mov.w r3, #0
515 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
516 ; CHECK-MVE-NEXT: it pl
517 ; CHECK-MVE-NEXT: movpl r3, #1
518 ; CHECK-MVE-NEXT: cmp r3, #0
519 ; CHECK-MVE-NEXT: cset r3, ne
520 ; CHECK-MVE-NEXT: movs r0, #0
521 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
522 ; CHECK-MVE-NEXT: it pl
523 ; CHECK-MVE-NEXT: movpl r0, #1
524 ; CHECK-MVE-NEXT: cmp r0, #0
525 ; CHECK-MVE-NEXT: cset r0, ne
526 ; CHECK-MVE-NEXT: cmp r3, #0
527 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
528 ; CHECK-MVE-NEXT: cmp r0, #0
529 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
530 ; CHECK-MVE-NEXT: cmp r1, #0
531 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
532 ; CHECK-MVE-NEXT: cmp r2, #0
533 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
534 ; CHECK-MVE-NEXT: bx lr
536 ; CHECK-MVEFP-LABEL: vcmp_uge_v4f32:
537 ; CHECK-MVEFP: @ %bb.0: @ %entry
538 ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q0, zr
539 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
540 ; CHECK-MVEFP-NEXT: bx lr
542 %c = fcmp uge <4 x float> %src, zeroinitializer
543 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
547 define arm_aapcs_vfpcc <4 x float> @vcmp_ult_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
548 ; CHECK-MVE-LABEL: vcmp_ult_v4f32:
549 ; CHECK-MVE: @ %bb.0: @ %entry
550 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
551 ; CHECK-MVE-NEXT: movs r1, #0
552 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
553 ; CHECK-MVE-NEXT: it lt
554 ; CHECK-MVE-NEXT: movlt r1, #1
555 ; CHECK-MVE-NEXT: cmp r1, #0
556 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
557 ; CHECK-MVE-NEXT: cset r1, ne
558 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
559 ; CHECK-MVE-NEXT: mov.w r2, #0
560 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
561 ; CHECK-MVE-NEXT: it lt
562 ; CHECK-MVE-NEXT: movlt r2, #1
563 ; CHECK-MVE-NEXT: cmp r2, #0
564 ; CHECK-MVE-NEXT: cset r2, ne
565 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
566 ; CHECK-MVE-NEXT: mov.w r3, #0
567 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
568 ; CHECK-MVE-NEXT: it lt
569 ; CHECK-MVE-NEXT: movlt r3, #1
570 ; CHECK-MVE-NEXT: cmp r3, #0
571 ; CHECK-MVE-NEXT: cset r3, ne
572 ; CHECK-MVE-NEXT: movs r0, #0
573 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
574 ; CHECK-MVE-NEXT: it lt
575 ; CHECK-MVE-NEXT: movlt r0, #1
576 ; CHECK-MVE-NEXT: cmp r0, #0
577 ; CHECK-MVE-NEXT: cset r0, ne
578 ; CHECK-MVE-NEXT: cmp r3, #0
579 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
580 ; CHECK-MVE-NEXT: cmp r0, #0
581 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
582 ; CHECK-MVE-NEXT: cmp r1, #0
583 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
584 ; CHECK-MVE-NEXT: cmp r2, #0
585 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
586 ; CHECK-MVE-NEXT: bx lr
588 ; CHECK-MVEFP-LABEL: vcmp_ult_v4f32:
589 ; CHECK-MVEFP: @ %bb.0: @ %entry
590 ; CHECK-MVEFP-NEXT: vcmp.f32 lt, q0, zr
591 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
592 ; CHECK-MVEFP-NEXT: bx lr
594 %c = fcmp ult <4 x float> %src, zeroinitializer
595 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
599 define arm_aapcs_vfpcc <4 x float> @vcmp_ule_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
600 ; CHECK-MVE-LABEL: vcmp_ule_v4f32:
601 ; CHECK-MVE: @ %bb.0: @ %entry
602 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
603 ; CHECK-MVE-NEXT: movs r1, #0
604 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
605 ; CHECK-MVE-NEXT: it le
606 ; CHECK-MVE-NEXT: movle r1, #1
607 ; CHECK-MVE-NEXT: cmp r1, #0
608 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
609 ; CHECK-MVE-NEXT: cset r1, ne
610 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
611 ; CHECK-MVE-NEXT: mov.w r2, #0
612 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
613 ; CHECK-MVE-NEXT: it le
614 ; CHECK-MVE-NEXT: movle r2, #1
615 ; CHECK-MVE-NEXT: cmp r2, #0
616 ; CHECK-MVE-NEXT: cset r2, ne
617 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
618 ; CHECK-MVE-NEXT: mov.w r3, #0
619 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
620 ; CHECK-MVE-NEXT: it le
621 ; CHECK-MVE-NEXT: movle r3, #1
622 ; CHECK-MVE-NEXT: cmp r3, #0
623 ; CHECK-MVE-NEXT: cset r3, ne
624 ; CHECK-MVE-NEXT: movs r0, #0
625 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
626 ; CHECK-MVE-NEXT: it le
627 ; CHECK-MVE-NEXT: movle r0, #1
628 ; CHECK-MVE-NEXT: cmp r0, #0
629 ; CHECK-MVE-NEXT: cset r0, ne
630 ; CHECK-MVE-NEXT: cmp r3, #0
631 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
632 ; CHECK-MVE-NEXT: cmp r0, #0
633 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
634 ; CHECK-MVE-NEXT: cmp r1, #0
635 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
636 ; CHECK-MVE-NEXT: cmp r2, #0
637 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
638 ; CHECK-MVE-NEXT: bx lr
640 ; CHECK-MVEFP-LABEL: vcmp_ule_v4f32:
641 ; CHECK-MVEFP: @ %bb.0: @ %entry
642 ; CHECK-MVEFP-NEXT: vcmp.f32 le, q0, zr
643 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
644 ; CHECK-MVEFP-NEXT: bx lr
646 %c = fcmp ule <4 x float> %src, zeroinitializer
647 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
651 define arm_aapcs_vfpcc <4 x float> @vcmp_ord_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
652 ; CHECK-MVE-LABEL: vcmp_ord_v4f32:
653 ; CHECK-MVE: @ %bb.0: @ %entry
654 ; CHECK-MVE-NEXT: vcmp.f32 s1, s1
655 ; CHECK-MVE-NEXT: movs r1, #0
656 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
657 ; CHECK-MVE-NEXT: it vc
658 ; CHECK-MVE-NEXT: movvc r1, #1
659 ; CHECK-MVE-NEXT: cmp r1, #0
660 ; CHECK-MVE-NEXT: vcmp.f32 s0, s0
661 ; CHECK-MVE-NEXT: cset r1, ne
662 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
663 ; CHECK-MVE-NEXT: mov.w r2, #0
664 ; CHECK-MVE-NEXT: vcmp.f32 s3, s3
665 ; CHECK-MVE-NEXT: it vc
666 ; CHECK-MVE-NEXT: movvc r2, #1
667 ; CHECK-MVE-NEXT: cmp r2, #0
668 ; CHECK-MVE-NEXT: cset r2, ne
669 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
670 ; CHECK-MVE-NEXT: mov.w r3, #0
671 ; CHECK-MVE-NEXT: vcmp.f32 s2, s2
672 ; CHECK-MVE-NEXT: it vc
673 ; CHECK-MVE-NEXT: movvc r3, #1
674 ; CHECK-MVE-NEXT: cmp r3, #0
675 ; CHECK-MVE-NEXT: cset r3, ne
676 ; CHECK-MVE-NEXT: movs r0, #0
677 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
678 ; CHECK-MVE-NEXT: it vc
679 ; CHECK-MVE-NEXT: movvc r0, #1
680 ; CHECK-MVE-NEXT: cmp r0, #0
681 ; CHECK-MVE-NEXT: cset r0, ne
682 ; CHECK-MVE-NEXT: cmp r3, #0
683 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
684 ; CHECK-MVE-NEXT: cmp r0, #0
685 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
686 ; CHECK-MVE-NEXT: cmp r1, #0
687 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
688 ; CHECK-MVE-NEXT: cmp r2, #0
689 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
690 ; CHECK-MVE-NEXT: bx lr
692 ; CHECK-MVEFP-LABEL: vcmp_ord_v4f32:
693 ; CHECK-MVEFP: @ %bb.0: @ %entry
694 ; CHECK-MVEFP-NEXT: vpt.f32 ge, q0, zr
695 ; CHECK-MVEFP-NEXT: vcmpt.f32 lt, q0, zr
696 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q1
697 ; CHECK-MVEFP-NEXT: bx lr
699 %c = fcmp ord <4 x float> %src, zeroinitializer
700 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
704 define arm_aapcs_vfpcc <4 x float> @vcmp_uno_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
705 ; CHECK-MVE-LABEL: vcmp_uno_v4f32:
706 ; CHECK-MVE: @ %bb.0: @ %entry
707 ; CHECK-MVE-NEXT: vcmp.f32 s1, s1
708 ; CHECK-MVE-NEXT: movs r1, #0
709 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
710 ; CHECK-MVE-NEXT: it vs
711 ; CHECK-MVE-NEXT: movvs r1, #1
712 ; CHECK-MVE-NEXT: cmp r1, #0
713 ; CHECK-MVE-NEXT: vcmp.f32 s0, s0
714 ; CHECK-MVE-NEXT: cset r1, ne
715 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
716 ; CHECK-MVE-NEXT: mov.w r2, #0
717 ; CHECK-MVE-NEXT: vcmp.f32 s3, s3
718 ; CHECK-MVE-NEXT: it vs
719 ; CHECK-MVE-NEXT: movvs r2, #1
720 ; CHECK-MVE-NEXT: cmp r2, #0
721 ; CHECK-MVE-NEXT: cset r2, ne
722 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
723 ; CHECK-MVE-NEXT: mov.w r3, #0
724 ; CHECK-MVE-NEXT: vcmp.f32 s2, s2
725 ; CHECK-MVE-NEXT: it vs
726 ; CHECK-MVE-NEXT: movvs r3, #1
727 ; CHECK-MVE-NEXT: cmp r3, #0
728 ; CHECK-MVE-NEXT: cset r3, ne
729 ; CHECK-MVE-NEXT: movs r0, #0
730 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
731 ; CHECK-MVE-NEXT: it vs
732 ; CHECK-MVE-NEXT: movvs r0, #1
733 ; CHECK-MVE-NEXT: cmp r0, #0
734 ; CHECK-MVE-NEXT: cset r0, ne
735 ; CHECK-MVE-NEXT: cmp r3, #0
736 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
737 ; CHECK-MVE-NEXT: cmp r0, #0
738 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
739 ; CHECK-MVE-NEXT: cmp r1, #0
740 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
741 ; CHECK-MVE-NEXT: cmp r2, #0
742 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
743 ; CHECK-MVE-NEXT: bx lr
745 ; CHECK-MVEFP-LABEL: vcmp_uno_v4f32:
746 ; CHECK-MVEFP: @ %bb.0: @ %entry
747 ; CHECK-MVEFP-NEXT: vpt.f32 ge, q0, zr
748 ; CHECK-MVEFP-NEXT: vcmpt.f32 lt, q0, zr
749 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
750 ; CHECK-MVEFP-NEXT: bx lr
752 %c = fcmp uno <4 x float> %src, zeroinitializer
753 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
759 define arm_aapcs_vfpcc <8 x half> @vcmp_oeq_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
760 ; CHECK-MVE-LABEL: vcmp_oeq_v8f16:
761 ; CHECK-MVE: @ %bb.0: @ %entry
762 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
763 ; CHECK-MVE-NEXT: movs r1, #0
764 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
765 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
766 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
767 ; CHECK-MVE-NEXT: it eq
768 ; CHECK-MVE-NEXT: moveq r1, #1
769 ; CHECK-MVE-NEXT: cmp r1, #0
770 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
771 ; CHECK-MVE-NEXT: cset r1, ne
772 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
773 ; CHECK-MVE-NEXT: cmp r1, #0
774 ; CHECK-MVE-NEXT: mov.w r1, #0
775 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
776 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
777 ; CHECK-MVE-NEXT: it eq
778 ; CHECK-MVE-NEXT: moveq r1, #1
779 ; CHECK-MVE-NEXT: cmp r1, #0
780 ; CHECK-MVE-NEXT: cset r1, ne
781 ; CHECK-MVE-NEXT: movs r0, #0
782 ; CHECK-MVE-NEXT: cmp r1, #0
783 ; CHECK-MVE-NEXT: mov.w r1, #0
784 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
785 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
786 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
787 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
788 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
789 ; CHECK-MVE-NEXT: it eq
790 ; CHECK-MVE-NEXT: moveq r1, #1
791 ; CHECK-MVE-NEXT: cmp r1, #0
792 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
793 ; CHECK-MVE-NEXT: cset r1, ne
794 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
795 ; CHECK-MVE-NEXT: cmp r1, #0
796 ; CHECK-MVE-NEXT: mov.w r1, #0
797 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
798 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
799 ; CHECK-MVE-NEXT: it eq
800 ; CHECK-MVE-NEXT: moveq r1, #1
801 ; CHECK-MVE-NEXT: cmp r1, #0
802 ; CHECK-MVE-NEXT: cset r1, ne
803 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
804 ; CHECK-MVE-NEXT: cmp r1, #0
805 ; CHECK-MVE-NEXT: mov.w r1, #0
806 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
807 ; CHECK-MVE-NEXT: vins.f16 s0, s12
808 ; CHECK-MVE-NEXT: vins.f16 s1, s4
809 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
810 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
811 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
812 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
813 ; CHECK-MVE-NEXT: it eq
814 ; CHECK-MVE-NEXT: moveq r1, #1
815 ; CHECK-MVE-NEXT: cmp r1, #0
816 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
817 ; CHECK-MVE-NEXT: cset r1, ne
818 ; CHECK-MVE-NEXT: cmp r1, #0
819 ; CHECK-MVE-NEXT: mov.w r1, #0
820 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
821 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
822 ; CHECK-MVE-NEXT: it eq
823 ; CHECK-MVE-NEXT: moveq r1, #1
824 ; CHECK-MVE-NEXT: cmp r1, #0
825 ; CHECK-MVE-NEXT: cset r1, ne
826 ; CHECK-MVE-NEXT: cmp r1, #0
827 ; CHECK-MVE-NEXT: mov.w r1, #0
828 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
829 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
830 ; CHECK-MVE-NEXT: vins.f16 s2, s4
831 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
832 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
833 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
834 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
835 ; CHECK-MVE-NEXT: it eq
836 ; CHECK-MVE-NEXT: moveq r1, #1
837 ; CHECK-MVE-NEXT: cmp r1, #0
838 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
839 ; CHECK-MVE-NEXT: cset r1, ne
840 ; CHECK-MVE-NEXT: cmp r1, #0
841 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
842 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
843 ; CHECK-MVE-NEXT: it eq
844 ; CHECK-MVE-NEXT: moveq r0, #1
845 ; CHECK-MVE-NEXT: cmp r0, #0
846 ; CHECK-MVE-NEXT: cset r0, ne
847 ; CHECK-MVE-NEXT: cmp r0, #0
848 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
849 ; CHECK-MVE-NEXT: vins.f16 s3, s4
850 ; CHECK-MVE-NEXT: bx lr
852 ; CHECK-MVEFP-LABEL: vcmp_oeq_v8f16:
853 ; CHECK-MVEFP: @ %bb.0: @ %entry
854 ; CHECK-MVEFP-NEXT: vcmp.f16 eq, q0, zr
855 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
856 ; CHECK-MVEFP-NEXT: bx lr
858 %c = fcmp oeq <8 x half> %src, zeroinitializer
859 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
863 define arm_aapcs_vfpcc <8 x half> @vcmp_one_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
864 ; CHECK-MVE-LABEL: vcmp_one_v8f16:
865 ; CHECK-MVE: @ %bb.0: @ %entry
866 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
867 ; CHECK-MVE-NEXT: movs r1, #0
868 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
869 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
870 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
871 ; CHECK-MVE-NEXT: it mi
872 ; CHECK-MVE-NEXT: movmi r1, #1
873 ; CHECK-MVE-NEXT: it gt
874 ; CHECK-MVE-NEXT: movgt r1, #1
875 ; CHECK-MVE-NEXT: cmp r1, #0
876 ; CHECK-MVE-NEXT: cset r1, ne
877 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
878 ; CHECK-MVE-NEXT: cmp r1, #0
879 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
880 ; CHECK-MVE-NEXT: mov.w r1, #0
881 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
882 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
883 ; CHECK-MVE-NEXT: it mi
884 ; CHECK-MVE-NEXT: movmi r1, #1
885 ; CHECK-MVE-NEXT: it gt
886 ; CHECK-MVE-NEXT: movgt r1, #1
887 ; CHECK-MVE-NEXT: cmp r1, #0
888 ; CHECK-MVE-NEXT: cset r1, ne
889 ; CHECK-MVE-NEXT: movs r0, #0
890 ; CHECK-MVE-NEXT: cmp r1, #0
891 ; CHECK-MVE-NEXT: mov.w r1, #0
892 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
893 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
894 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
895 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
896 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
897 ; CHECK-MVE-NEXT: it mi
898 ; CHECK-MVE-NEXT: movmi r1, #1
899 ; CHECK-MVE-NEXT: it gt
900 ; CHECK-MVE-NEXT: movgt r1, #1
901 ; CHECK-MVE-NEXT: cmp r1, #0
902 ; CHECK-MVE-NEXT: cset r1, ne
903 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
904 ; CHECK-MVE-NEXT: cmp r1, #0
905 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
906 ; CHECK-MVE-NEXT: mov.w r1, #0
907 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
908 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
909 ; CHECK-MVE-NEXT: it mi
910 ; CHECK-MVE-NEXT: movmi r1, #1
911 ; CHECK-MVE-NEXT: it gt
912 ; CHECK-MVE-NEXT: movgt r1, #1
913 ; CHECK-MVE-NEXT: cmp r1, #0
914 ; CHECK-MVE-NEXT: cset r1, ne
915 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
916 ; CHECK-MVE-NEXT: cmp r1, #0
917 ; CHECK-MVE-NEXT: mov.w r1, #0
918 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
919 ; CHECK-MVE-NEXT: vins.f16 s0, s12
920 ; CHECK-MVE-NEXT: vins.f16 s1, s4
921 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
922 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
923 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
924 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
925 ; CHECK-MVE-NEXT: it mi
926 ; CHECK-MVE-NEXT: movmi r1, #1
927 ; CHECK-MVE-NEXT: it gt
928 ; CHECK-MVE-NEXT: movgt r1, #1
929 ; CHECK-MVE-NEXT: cmp r1, #0
930 ; CHECK-MVE-NEXT: cset r1, ne
931 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
932 ; CHECK-MVE-NEXT: cmp r1, #0
933 ; CHECK-MVE-NEXT: mov.w r1, #0
934 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
935 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
936 ; CHECK-MVE-NEXT: it mi
937 ; CHECK-MVE-NEXT: movmi r1, #1
938 ; CHECK-MVE-NEXT: it gt
939 ; CHECK-MVE-NEXT: movgt r1, #1
940 ; CHECK-MVE-NEXT: cmp r1, #0
941 ; CHECK-MVE-NEXT: cset r1, ne
942 ; CHECK-MVE-NEXT: cmp r1, #0
943 ; CHECK-MVE-NEXT: mov.w r1, #0
944 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
945 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
946 ; CHECK-MVE-NEXT: vins.f16 s2, s4
947 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
948 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
949 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
950 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
951 ; CHECK-MVE-NEXT: it mi
952 ; CHECK-MVE-NEXT: movmi r1, #1
953 ; CHECK-MVE-NEXT: it gt
954 ; CHECK-MVE-NEXT: movgt r1, #1
955 ; CHECK-MVE-NEXT: cmp r1, #0
956 ; CHECK-MVE-NEXT: cset r1, ne
957 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
958 ; CHECK-MVE-NEXT: cmp r1, #0
959 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
960 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
961 ; CHECK-MVE-NEXT: it mi
962 ; CHECK-MVE-NEXT: movmi r0, #1
963 ; CHECK-MVE-NEXT: it gt
964 ; CHECK-MVE-NEXT: movgt r0, #1
965 ; CHECK-MVE-NEXT: cmp r0, #0
966 ; CHECK-MVE-NEXT: cset r0, ne
967 ; CHECK-MVE-NEXT: cmp r0, #0
968 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
969 ; CHECK-MVE-NEXT: vins.f16 s3, s4
970 ; CHECK-MVE-NEXT: bx lr
972 ; CHECK-MVEFP-LABEL: vcmp_one_v8f16:
973 ; CHECK-MVEFP: @ %bb.0: @ %entry
974 ; CHECK-MVEFP-NEXT: vpt.f16 ge, q0, zr
975 ; CHECK-MVEFP-NEXT: vcmpt.f16 le, q0, zr
976 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q1
977 ; CHECK-MVEFP-NEXT: bx lr
979 %c = fcmp one <8 x half> %src, zeroinitializer
980 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
984 define arm_aapcs_vfpcc <8 x half> @vcmp_ogt_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
985 ; CHECK-MVE-LABEL: vcmp_ogt_v8f16:
986 ; CHECK-MVE: @ %bb.0: @ %entry
987 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
988 ; CHECK-MVE-NEXT: movs r1, #0
989 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
990 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
991 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
992 ; CHECK-MVE-NEXT: it gt
993 ; CHECK-MVE-NEXT: movgt r1, #1
994 ; CHECK-MVE-NEXT: cmp r1, #0
995 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
996 ; CHECK-MVE-NEXT: cset r1, ne
997 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
998 ; CHECK-MVE-NEXT: cmp r1, #0
999 ; CHECK-MVE-NEXT: mov.w r1, #0
1000 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1001 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1002 ; CHECK-MVE-NEXT: it gt
1003 ; CHECK-MVE-NEXT: movgt r1, #1
1004 ; CHECK-MVE-NEXT: cmp r1, #0
1005 ; CHECK-MVE-NEXT: cset r1, ne
1006 ; CHECK-MVE-NEXT: movs r0, #0
1007 ; CHECK-MVE-NEXT: cmp r1, #0
1008 ; CHECK-MVE-NEXT: mov.w r1, #0
1009 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
1010 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
1011 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1012 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
1013 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1014 ; CHECK-MVE-NEXT: it gt
1015 ; CHECK-MVE-NEXT: movgt r1, #1
1016 ; CHECK-MVE-NEXT: cmp r1, #0
1017 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
1018 ; CHECK-MVE-NEXT: cset r1, ne
1019 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
1020 ; CHECK-MVE-NEXT: cmp r1, #0
1021 ; CHECK-MVE-NEXT: mov.w r1, #0
1022 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1023 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1024 ; CHECK-MVE-NEXT: it gt
1025 ; CHECK-MVE-NEXT: movgt r1, #1
1026 ; CHECK-MVE-NEXT: cmp r1, #0
1027 ; CHECK-MVE-NEXT: cset r1, ne
1028 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
1029 ; CHECK-MVE-NEXT: cmp r1, #0
1030 ; CHECK-MVE-NEXT: mov.w r1, #0
1031 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
1032 ; CHECK-MVE-NEXT: vins.f16 s0, s12
1033 ; CHECK-MVE-NEXT: vins.f16 s1, s4
1034 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
1035 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1036 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
1037 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1038 ; CHECK-MVE-NEXT: it gt
1039 ; CHECK-MVE-NEXT: movgt r1, #1
1040 ; CHECK-MVE-NEXT: cmp r1, #0
1041 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
1042 ; CHECK-MVE-NEXT: cset r1, ne
1043 ; CHECK-MVE-NEXT: cmp r1, #0
1044 ; CHECK-MVE-NEXT: mov.w r1, #0
1045 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1046 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1047 ; CHECK-MVE-NEXT: it gt
1048 ; CHECK-MVE-NEXT: movgt r1, #1
1049 ; CHECK-MVE-NEXT: cmp r1, #0
1050 ; CHECK-MVE-NEXT: cset r1, ne
1051 ; CHECK-MVE-NEXT: cmp r1, #0
1052 ; CHECK-MVE-NEXT: mov.w r1, #0
1053 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
1054 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
1055 ; CHECK-MVE-NEXT: vins.f16 s2, s4
1056 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
1057 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1058 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
1059 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1060 ; CHECK-MVE-NEXT: it gt
1061 ; CHECK-MVE-NEXT: movgt r1, #1
1062 ; CHECK-MVE-NEXT: cmp r1, #0
1063 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
1064 ; CHECK-MVE-NEXT: cset r1, ne
1065 ; CHECK-MVE-NEXT: cmp r1, #0
1066 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
1067 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1068 ; CHECK-MVE-NEXT: it gt
1069 ; CHECK-MVE-NEXT: movgt r0, #1
1070 ; CHECK-MVE-NEXT: cmp r0, #0
1071 ; CHECK-MVE-NEXT: cset r0, ne
1072 ; CHECK-MVE-NEXT: cmp r0, #0
1073 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
1074 ; CHECK-MVE-NEXT: vins.f16 s3, s4
1075 ; CHECK-MVE-NEXT: bx lr
1077 ; CHECK-MVEFP-LABEL: vcmp_ogt_v8f16:
1078 ; CHECK-MVEFP: @ %bb.0: @ %entry
1079 ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q0, zr
1080 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1081 ; CHECK-MVEFP-NEXT: bx lr
1083 %c = fcmp ogt <8 x half> %src, zeroinitializer
1084 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1088 define arm_aapcs_vfpcc <8 x half> @vcmp_oge_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
1089 ; CHECK-MVE-LABEL: vcmp_oge_v8f16:
1090 ; CHECK-MVE: @ %bb.0: @ %entry
1091 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1092 ; CHECK-MVE-NEXT: movs r1, #0
1093 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
1094 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1095 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1096 ; CHECK-MVE-NEXT: it ge
1097 ; CHECK-MVE-NEXT: movge r1, #1
1098 ; CHECK-MVE-NEXT: cmp r1, #0
1099 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1100 ; CHECK-MVE-NEXT: cset r1, ne
1101 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
1102 ; CHECK-MVE-NEXT: cmp r1, #0
1103 ; CHECK-MVE-NEXT: mov.w r1, #0
1104 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1105 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1106 ; CHECK-MVE-NEXT: it ge
1107 ; CHECK-MVE-NEXT: movge r1, #1
1108 ; CHECK-MVE-NEXT: cmp r1, #0
1109 ; CHECK-MVE-NEXT: cset r1, ne
1110 ; CHECK-MVE-NEXT: movs r0, #0
1111 ; CHECK-MVE-NEXT: cmp r1, #0
1112 ; CHECK-MVE-NEXT: mov.w r1, #0
1113 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
1114 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
1115 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1116 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
1117 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1118 ; CHECK-MVE-NEXT: it ge
1119 ; CHECK-MVE-NEXT: movge r1, #1
1120 ; CHECK-MVE-NEXT: cmp r1, #0
1121 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
1122 ; CHECK-MVE-NEXT: cset r1, ne
1123 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
1124 ; CHECK-MVE-NEXT: cmp r1, #0
1125 ; CHECK-MVE-NEXT: mov.w r1, #0
1126 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1127 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1128 ; CHECK-MVE-NEXT: it ge
1129 ; CHECK-MVE-NEXT: movge r1, #1
1130 ; CHECK-MVE-NEXT: cmp r1, #0
1131 ; CHECK-MVE-NEXT: cset r1, ne
1132 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
1133 ; CHECK-MVE-NEXT: cmp r1, #0
1134 ; CHECK-MVE-NEXT: mov.w r1, #0
1135 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
1136 ; CHECK-MVE-NEXT: vins.f16 s0, s12
1137 ; CHECK-MVE-NEXT: vins.f16 s1, s4
1138 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
1139 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1140 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
1141 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1142 ; CHECK-MVE-NEXT: it ge
1143 ; CHECK-MVE-NEXT: movge r1, #1
1144 ; CHECK-MVE-NEXT: cmp r1, #0
1145 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
1146 ; CHECK-MVE-NEXT: cset r1, ne
1147 ; CHECK-MVE-NEXT: cmp r1, #0
1148 ; CHECK-MVE-NEXT: mov.w r1, #0
1149 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1150 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1151 ; CHECK-MVE-NEXT: it ge
1152 ; CHECK-MVE-NEXT: movge r1, #1
1153 ; CHECK-MVE-NEXT: cmp r1, #0
1154 ; CHECK-MVE-NEXT: cset r1, ne
1155 ; CHECK-MVE-NEXT: cmp r1, #0
1156 ; CHECK-MVE-NEXT: mov.w r1, #0
1157 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
1158 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
1159 ; CHECK-MVE-NEXT: vins.f16 s2, s4
1160 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
1161 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1162 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
1163 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1164 ; CHECK-MVE-NEXT: it ge
1165 ; CHECK-MVE-NEXT: movge r1, #1
1166 ; CHECK-MVE-NEXT: cmp r1, #0
1167 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
1168 ; CHECK-MVE-NEXT: cset r1, ne
1169 ; CHECK-MVE-NEXT: cmp r1, #0
1170 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
1171 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1172 ; CHECK-MVE-NEXT: it ge
1173 ; CHECK-MVE-NEXT: movge r0, #1
1174 ; CHECK-MVE-NEXT: cmp r0, #0
1175 ; CHECK-MVE-NEXT: cset r0, ne
1176 ; CHECK-MVE-NEXT: cmp r0, #0
1177 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
1178 ; CHECK-MVE-NEXT: vins.f16 s3, s4
1179 ; CHECK-MVE-NEXT: bx lr
1181 ; CHECK-MVEFP-LABEL: vcmp_oge_v8f16:
1182 ; CHECK-MVEFP: @ %bb.0: @ %entry
1183 ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q0, zr
1184 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1185 ; CHECK-MVEFP-NEXT: bx lr
1187 %c = fcmp oge <8 x half> %src, zeroinitializer
1188 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1192 define arm_aapcs_vfpcc <8 x half> @vcmp_olt_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
1193 ; CHECK-MVE-LABEL: vcmp_olt_v8f16:
1194 ; CHECK-MVE: @ %bb.0: @ %entry
1195 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1196 ; CHECK-MVE-NEXT: movs r1, #0
1197 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
1198 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1199 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1200 ; CHECK-MVE-NEXT: it mi
1201 ; CHECK-MVE-NEXT: movmi r1, #1
1202 ; CHECK-MVE-NEXT: cmp r1, #0
1203 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1204 ; CHECK-MVE-NEXT: cset r1, ne
1205 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
1206 ; CHECK-MVE-NEXT: cmp r1, #0
1207 ; CHECK-MVE-NEXT: mov.w r1, #0
1208 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1209 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1210 ; CHECK-MVE-NEXT: it mi
1211 ; CHECK-MVE-NEXT: movmi r1, #1
1212 ; CHECK-MVE-NEXT: cmp r1, #0
1213 ; CHECK-MVE-NEXT: cset r1, ne
1214 ; CHECK-MVE-NEXT: movs r0, #0
1215 ; CHECK-MVE-NEXT: cmp r1, #0
1216 ; CHECK-MVE-NEXT: mov.w r1, #0
1217 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
1218 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
1219 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1220 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
1221 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1222 ; CHECK-MVE-NEXT: it mi
1223 ; CHECK-MVE-NEXT: movmi r1, #1
1224 ; CHECK-MVE-NEXT: cmp r1, #0
1225 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
1226 ; CHECK-MVE-NEXT: cset r1, ne
1227 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
1228 ; CHECK-MVE-NEXT: cmp r1, #0
1229 ; CHECK-MVE-NEXT: mov.w r1, #0
1230 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1231 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1232 ; CHECK-MVE-NEXT: it mi
1233 ; CHECK-MVE-NEXT: movmi r1, #1
1234 ; CHECK-MVE-NEXT: cmp r1, #0
1235 ; CHECK-MVE-NEXT: cset r1, ne
1236 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
1237 ; CHECK-MVE-NEXT: cmp r1, #0
1238 ; CHECK-MVE-NEXT: mov.w r1, #0
1239 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
1240 ; CHECK-MVE-NEXT: vins.f16 s0, s12
1241 ; CHECK-MVE-NEXT: vins.f16 s1, s4
1242 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
1243 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1244 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
1245 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1246 ; CHECK-MVE-NEXT: it mi
1247 ; CHECK-MVE-NEXT: movmi r1, #1
1248 ; CHECK-MVE-NEXT: cmp r1, #0
1249 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
1250 ; CHECK-MVE-NEXT: cset r1, ne
1251 ; CHECK-MVE-NEXT: cmp r1, #0
1252 ; CHECK-MVE-NEXT: mov.w r1, #0
1253 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1254 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1255 ; CHECK-MVE-NEXT: it mi
1256 ; CHECK-MVE-NEXT: movmi r1, #1
1257 ; CHECK-MVE-NEXT: cmp r1, #0
1258 ; CHECK-MVE-NEXT: cset r1, ne
1259 ; CHECK-MVE-NEXT: cmp r1, #0
1260 ; CHECK-MVE-NEXT: mov.w r1, #0
1261 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
1262 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
1263 ; CHECK-MVE-NEXT: vins.f16 s2, s4
1264 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
1265 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1266 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
1267 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1268 ; CHECK-MVE-NEXT: it mi
1269 ; CHECK-MVE-NEXT: movmi r1, #1
1270 ; CHECK-MVE-NEXT: cmp r1, #0
1271 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
1272 ; CHECK-MVE-NEXT: cset r1, ne
1273 ; CHECK-MVE-NEXT: cmp r1, #0
1274 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
1275 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1276 ; CHECK-MVE-NEXT: it mi
1277 ; CHECK-MVE-NEXT: movmi r0, #1
1278 ; CHECK-MVE-NEXT: cmp r0, #0
1279 ; CHECK-MVE-NEXT: cset r0, ne
1280 ; CHECK-MVE-NEXT: cmp r0, #0
1281 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
1282 ; CHECK-MVE-NEXT: vins.f16 s3, s4
1283 ; CHECK-MVE-NEXT: bx lr
1285 ; CHECK-MVEFP-LABEL: vcmp_olt_v8f16:
1286 ; CHECK-MVEFP: @ %bb.0: @ %entry
1287 ; CHECK-MVEFP-NEXT: vcmp.f16 lt, q0, zr
1288 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1289 ; CHECK-MVEFP-NEXT: bx lr
1291 %c = fcmp olt <8 x half> %src, zeroinitializer
1292 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1296 define arm_aapcs_vfpcc <8 x half> @vcmp_ole_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
1297 ; CHECK-MVE-LABEL: vcmp_ole_v8f16:
1298 ; CHECK-MVE: @ %bb.0: @ %entry
1299 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1300 ; CHECK-MVE-NEXT: movs r1, #0
1301 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
1302 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1303 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1304 ; CHECK-MVE-NEXT: it ls
1305 ; CHECK-MVE-NEXT: movls r1, #1
1306 ; CHECK-MVE-NEXT: cmp r1, #0
1307 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1308 ; CHECK-MVE-NEXT: cset r1, ne
1309 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
1310 ; CHECK-MVE-NEXT: cmp r1, #0
1311 ; CHECK-MVE-NEXT: mov.w r1, #0
1312 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1313 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1314 ; CHECK-MVE-NEXT: it ls
1315 ; CHECK-MVE-NEXT: movls r1, #1
1316 ; CHECK-MVE-NEXT: cmp r1, #0
1317 ; CHECK-MVE-NEXT: cset r1, ne
1318 ; CHECK-MVE-NEXT: movs r0, #0
1319 ; CHECK-MVE-NEXT: cmp r1, #0
1320 ; CHECK-MVE-NEXT: mov.w r1, #0
1321 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
1322 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
1323 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1324 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
1325 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1326 ; CHECK-MVE-NEXT: it ls
1327 ; CHECK-MVE-NEXT: movls r1, #1
1328 ; CHECK-MVE-NEXT: cmp r1, #0
1329 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
1330 ; CHECK-MVE-NEXT: cset r1, ne
1331 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
1332 ; CHECK-MVE-NEXT: cmp r1, #0
1333 ; CHECK-MVE-NEXT: mov.w r1, #0
1334 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1335 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1336 ; CHECK-MVE-NEXT: it ls
1337 ; CHECK-MVE-NEXT: movls r1, #1
1338 ; CHECK-MVE-NEXT: cmp r1, #0
1339 ; CHECK-MVE-NEXT: cset r1, ne
1340 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
1341 ; CHECK-MVE-NEXT: cmp r1, #0
1342 ; CHECK-MVE-NEXT: mov.w r1, #0
1343 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
1344 ; CHECK-MVE-NEXT: vins.f16 s0, s12
1345 ; CHECK-MVE-NEXT: vins.f16 s1, s4
1346 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
1347 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1348 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
1349 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1350 ; CHECK-MVE-NEXT: it ls
1351 ; CHECK-MVE-NEXT: movls r1, #1
1352 ; CHECK-MVE-NEXT: cmp r1, #0
1353 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
1354 ; CHECK-MVE-NEXT: cset r1, ne
1355 ; CHECK-MVE-NEXT: cmp r1, #0
1356 ; CHECK-MVE-NEXT: mov.w r1, #0
1357 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1358 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1359 ; CHECK-MVE-NEXT: it ls
1360 ; CHECK-MVE-NEXT: movls r1, #1
1361 ; CHECK-MVE-NEXT: cmp r1, #0
1362 ; CHECK-MVE-NEXT: cset r1, ne
1363 ; CHECK-MVE-NEXT: cmp r1, #0
1364 ; CHECK-MVE-NEXT: mov.w r1, #0
1365 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
1366 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
1367 ; CHECK-MVE-NEXT: vins.f16 s2, s4
1368 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
1369 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1370 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
1371 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1372 ; CHECK-MVE-NEXT: it ls
1373 ; CHECK-MVE-NEXT: movls r1, #1
1374 ; CHECK-MVE-NEXT: cmp r1, #0
1375 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
1376 ; CHECK-MVE-NEXT: cset r1, ne
1377 ; CHECK-MVE-NEXT: cmp r1, #0
1378 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
1379 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1380 ; CHECK-MVE-NEXT: it ls
1381 ; CHECK-MVE-NEXT: movls r0, #1
1382 ; CHECK-MVE-NEXT: cmp r0, #0
1383 ; CHECK-MVE-NEXT: cset r0, ne
1384 ; CHECK-MVE-NEXT: cmp r0, #0
1385 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
1386 ; CHECK-MVE-NEXT: vins.f16 s3, s4
1387 ; CHECK-MVE-NEXT: bx lr
1389 ; CHECK-MVEFP-LABEL: vcmp_ole_v8f16:
1390 ; CHECK-MVEFP: @ %bb.0: @ %entry
1391 ; CHECK-MVEFP-NEXT: vcmp.f16 le, q0, zr
1392 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1393 ; CHECK-MVEFP-NEXT: bx lr
1395 %c = fcmp ole <8 x half> %src, zeroinitializer
1396 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1400 define arm_aapcs_vfpcc <8 x half> @vcmp_ueq_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
1401 ; CHECK-MVE-LABEL: vcmp_ueq_v8f16:
1402 ; CHECK-MVE: @ %bb.0: @ %entry
1403 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1404 ; CHECK-MVE-NEXT: movs r1, #0
1405 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
1406 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1407 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1408 ; CHECK-MVE-NEXT: it eq
1409 ; CHECK-MVE-NEXT: moveq r1, #1
1410 ; CHECK-MVE-NEXT: it vs
1411 ; CHECK-MVE-NEXT: movvs r1, #1
1412 ; CHECK-MVE-NEXT: cmp r1, #0
1413 ; CHECK-MVE-NEXT: cset r1, ne
1414 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1415 ; CHECK-MVE-NEXT: cmp r1, #0
1416 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
1417 ; CHECK-MVE-NEXT: mov.w r1, #0
1418 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1419 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1420 ; CHECK-MVE-NEXT: it eq
1421 ; CHECK-MVE-NEXT: moveq r1, #1
1422 ; CHECK-MVE-NEXT: it vs
1423 ; CHECK-MVE-NEXT: movvs r1, #1
1424 ; CHECK-MVE-NEXT: cmp r1, #0
1425 ; CHECK-MVE-NEXT: cset r1, ne
1426 ; CHECK-MVE-NEXT: movs r0, #0
1427 ; CHECK-MVE-NEXT: cmp r1, #0
1428 ; CHECK-MVE-NEXT: mov.w r1, #0
1429 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
1430 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
1431 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1432 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
1433 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1434 ; CHECK-MVE-NEXT: it eq
1435 ; CHECK-MVE-NEXT: moveq r1, #1
1436 ; CHECK-MVE-NEXT: it vs
1437 ; CHECK-MVE-NEXT: movvs r1, #1
1438 ; CHECK-MVE-NEXT: cmp r1, #0
1439 ; CHECK-MVE-NEXT: cset r1, ne
1440 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
1441 ; CHECK-MVE-NEXT: cmp r1, #0
1442 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
1443 ; CHECK-MVE-NEXT: mov.w r1, #0
1444 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1445 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1446 ; CHECK-MVE-NEXT: it eq
1447 ; CHECK-MVE-NEXT: moveq r1, #1
1448 ; CHECK-MVE-NEXT: it vs
1449 ; CHECK-MVE-NEXT: movvs r1, #1
1450 ; CHECK-MVE-NEXT: cmp r1, #0
1451 ; CHECK-MVE-NEXT: cset r1, ne
1452 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
1453 ; CHECK-MVE-NEXT: cmp r1, #0
1454 ; CHECK-MVE-NEXT: mov.w r1, #0
1455 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
1456 ; CHECK-MVE-NEXT: vins.f16 s0, s12
1457 ; CHECK-MVE-NEXT: vins.f16 s1, s4
1458 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
1459 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1460 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
1461 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1462 ; CHECK-MVE-NEXT: it eq
1463 ; CHECK-MVE-NEXT: moveq r1, #1
1464 ; CHECK-MVE-NEXT: it vs
1465 ; CHECK-MVE-NEXT: movvs r1, #1
1466 ; CHECK-MVE-NEXT: cmp r1, #0
1467 ; CHECK-MVE-NEXT: cset r1, ne
1468 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
1469 ; CHECK-MVE-NEXT: cmp r1, #0
1470 ; CHECK-MVE-NEXT: mov.w r1, #0
1471 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1472 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1473 ; CHECK-MVE-NEXT: it eq
1474 ; CHECK-MVE-NEXT: moveq r1, #1
1475 ; CHECK-MVE-NEXT: it vs
1476 ; CHECK-MVE-NEXT: movvs r1, #1
1477 ; CHECK-MVE-NEXT: cmp r1, #0
1478 ; CHECK-MVE-NEXT: cset r1, ne
1479 ; CHECK-MVE-NEXT: cmp r1, #0
1480 ; CHECK-MVE-NEXT: mov.w r1, #0
1481 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
1482 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
1483 ; CHECK-MVE-NEXT: vins.f16 s2, s4
1484 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
1485 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1486 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
1487 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1488 ; CHECK-MVE-NEXT: it eq
1489 ; CHECK-MVE-NEXT: moveq r1, #1
1490 ; CHECK-MVE-NEXT: it vs
1491 ; CHECK-MVE-NEXT: movvs r1, #1
1492 ; CHECK-MVE-NEXT: cmp r1, #0
1493 ; CHECK-MVE-NEXT: cset r1, ne
1494 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
1495 ; CHECK-MVE-NEXT: cmp r1, #0
1496 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
1497 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1498 ; CHECK-MVE-NEXT: it eq
1499 ; CHECK-MVE-NEXT: moveq r0, #1
1500 ; CHECK-MVE-NEXT: it vs
1501 ; CHECK-MVE-NEXT: movvs r0, #1
1502 ; CHECK-MVE-NEXT: cmp r0, #0
1503 ; CHECK-MVE-NEXT: cset r0, ne
1504 ; CHECK-MVE-NEXT: cmp r0, #0
1505 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
1506 ; CHECK-MVE-NEXT: vins.f16 s3, s4
1507 ; CHECK-MVE-NEXT: bx lr
1509 ; CHECK-MVEFP-LABEL: vcmp_ueq_v8f16:
1510 ; CHECK-MVEFP: @ %bb.0: @ %entry
1511 ; CHECK-MVEFP-NEXT: vpt.f16 ge, q0, zr
1512 ; CHECK-MVEFP-NEXT: vcmpt.f16 le, q0, zr
1513 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1514 ; CHECK-MVEFP-NEXT: bx lr
1516 %c = fcmp ueq <8 x half> %src, zeroinitializer
1517 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1521 define arm_aapcs_vfpcc <8 x half> @vcmp_une_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
1522 ; CHECK-MVE-LABEL: vcmp_une_v8f16:
1523 ; CHECK-MVE: @ %bb.0: @ %entry
1524 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1525 ; CHECK-MVE-NEXT: movs r1, #0
1526 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
1527 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1528 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1529 ; CHECK-MVE-NEXT: it ne
1530 ; CHECK-MVE-NEXT: movne r1, #1
1531 ; CHECK-MVE-NEXT: cmp r1, #0
1532 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1533 ; CHECK-MVE-NEXT: cset r1, ne
1534 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
1535 ; CHECK-MVE-NEXT: cmp r1, #0
1536 ; CHECK-MVE-NEXT: mov.w r1, #0
1537 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1538 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1539 ; CHECK-MVE-NEXT: it ne
1540 ; CHECK-MVE-NEXT: movne r1, #1
1541 ; CHECK-MVE-NEXT: cmp r1, #0
1542 ; CHECK-MVE-NEXT: cset r1, ne
1543 ; CHECK-MVE-NEXT: movs r0, #0
1544 ; CHECK-MVE-NEXT: cmp r1, #0
1545 ; CHECK-MVE-NEXT: mov.w r1, #0
1546 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
1547 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
1548 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1549 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
1550 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1551 ; CHECK-MVE-NEXT: it ne
1552 ; CHECK-MVE-NEXT: movne r1, #1
1553 ; CHECK-MVE-NEXT: cmp r1, #0
1554 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
1555 ; CHECK-MVE-NEXT: cset r1, ne
1556 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
1557 ; CHECK-MVE-NEXT: cmp r1, #0
1558 ; CHECK-MVE-NEXT: mov.w r1, #0
1559 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1560 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1561 ; CHECK-MVE-NEXT: it ne
1562 ; CHECK-MVE-NEXT: movne r1, #1
1563 ; CHECK-MVE-NEXT: cmp r1, #0
1564 ; CHECK-MVE-NEXT: cset r1, ne
1565 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
1566 ; CHECK-MVE-NEXT: cmp r1, #0
1567 ; CHECK-MVE-NEXT: mov.w r1, #0
1568 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
1569 ; CHECK-MVE-NEXT: vins.f16 s0, s12
1570 ; CHECK-MVE-NEXT: vins.f16 s1, s4
1571 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
1572 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1573 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
1574 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1575 ; CHECK-MVE-NEXT: it ne
1576 ; CHECK-MVE-NEXT: movne r1, #1
1577 ; CHECK-MVE-NEXT: cmp r1, #0
1578 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
1579 ; CHECK-MVE-NEXT: cset r1, ne
1580 ; CHECK-MVE-NEXT: cmp r1, #0
1581 ; CHECK-MVE-NEXT: mov.w r1, #0
1582 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1583 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1584 ; CHECK-MVE-NEXT: it ne
1585 ; CHECK-MVE-NEXT: movne r1, #1
1586 ; CHECK-MVE-NEXT: cmp r1, #0
1587 ; CHECK-MVE-NEXT: cset r1, ne
1588 ; CHECK-MVE-NEXT: cmp r1, #0
1589 ; CHECK-MVE-NEXT: mov.w r1, #0
1590 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
1591 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
1592 ; CHECK-MVE-NEXT: vins.f16 s2, s4
1593 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
1594 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1595 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
1596 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1597 ; CHECK-MVE-NEXT: it ne
1598 ; CHECK-MVE-NEXT: movne r1, #1
1599 ; CHECK-MVE-NEXT: cmp r1, #0
1600 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
1601 ; CHECK-MVE-NEXT: cset r1, ne
1602 ; CHECK-MVE-NEXT: cmp r1, #0
1603 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
1604 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1605 ; CHECK-MVE-NEXT: it ne
1606 ; CHECK-MVE-NEXT: movne r0, #1
1607 ; CHECK-MVE-NEXT: cmp r0, #0
1608 ; CHECK-MVE-NEXT: cset r0, ne
1609 ; CHECK-MVE-NEXT: cmp r0, #0
1610 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
1611 ; CHECK-MVE-NEXT: vins.f16 s3, s4
1612 ; CHECK-MVE-NEXT: bx lr
1614 ; CHECK-MVEFP-LABEL: vcmp_une_v8f16:
1615 ; CHECK-MVEFP: @ %bb.0: @ %entry
1616 ; CHECK-MVEFP-NEXT: vcmp.f16 ne, q0, zr
1617 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1618 ; CHECK-MVEFP-NEXT: bx lr
1620 %c = fcmp une <8 x half> %src, zeroinitializer
1621 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1625 define arm_aapcs_vfpcc <8 x half> @vcmp_ugt_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
1626 ; CHECK-MVE-LABEL: vcmp_ugt_v8f16:
1627 ; CHECK-MVE: @ %bb.0: @ %entry
1628 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1629 ; CHECK-MVE-NEXT: movs r1, #0
1630 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
1631 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1632 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1633 ; CHECK-MVE-NEXT: it hi
1634 ; CHECK-MVE-NEXT: movhi r1, #1
1635 ; CHECK-MVE-NEXT: cmp r1, #0
1636 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1637 ; CHECK-MVE-NEXT: cset r1, ne
1638 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
1639 ; CHECK-MVE-NEXT: cmp r1, #0
1640 ; CHECK-MVE-NEXT: mov.w r1, #0
1641 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1642 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1643 ; CHECK-MVE-NEXT: it hi
1644 ; CHECK-MVE-NEXT: movhi r1, #1
1645 ; CHECK-MVE-NEXT: cmp r1, #0
1646 ; CHECK-MVE-NEXT: cset r1, ne
1647 ; CHECK-MVE-NEXT: movs r0, #0
1648 ; CHECK-MVE-NEXT: cmp r1, #0
1649 ; CHECK-MVE-NEXT: mov.w r1, #0
1650 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
1651 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
1652 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1653 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
1654 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1655 ; CHECK-MVE-NEXT: it hi
1656 ; CHECK-MVE-NEXT: movhi r1, #1
1657 ; CHECK-MVE-NEXT: cmp r1, #0
1658 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
1659 ; CHECK-MVE-NEXT: cset r1, ne
1660 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
1661 ; CHECK-MVE-NEXT: cmp r1, #0
1662 ; CHECK-MVE-NEXT: mov.w r1, #0
1663 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1664 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1665 ; CHECK-MVE-NEXT: it hi
1666 ; CHECK-MVE-NEXT: movhi r1, #1
1667 ; CHECK-MVE-NEXT: cmp r1, #0
1668 ; CHECK-MVE-NEXT: cset r1, ne
1669 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
1670 ; CHECK-MVE-NEXT: cmp r1, #0
1671 ; CHECK-MVE-NEXT: mov.w r1, #0
1672 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
1673 ; CHECK-MVE-NEXT: vins.f16 s0, s12
1674 ; CHECK-MVE-NEXT: vins.f16 s1, s4
1675 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
1676 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1677 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
1678 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1679 ; CHECK-MVE-NEXT: it hi
1680 ; CHECK-MVE-NEXT: movhi r1, #1
1681 ; CHECK-MVE-NEXT: cmp r1, #0
1682 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
1683 ; CHECK-MVE-NEXT: cset r1, ne
1684 ; CHECK-MVE-NEXT: cmp r1, #0
1685 ; CHECK-MVE-NEXT: mov.w r1, #0
1686 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1687 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1688 ; CHECK-MVE-NEXT: it hi
1689 ; CHECK-MVE-NEXT: movhi r1, #1
1690 ; CHECK-MVE-NEXT: cmp r1, #0
1691 ; CHECK-MVE-NEXT: cset r1, ne
1692 ; CHECK-MVE-NEXT: cmp r1, #0
1693 ; CHECK-MVE-NEXT: mov.w r1, #0
1694 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
1695 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
1696 ; CHECK-MVE-NEXT: vins.f16 s2, s4
1697 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
1698 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1699 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
1700 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1701 ; CHECK-MVE-NEXT: it hi
1702 ; CHECK-MVE-NEXT: movhi r1, #1
1703 ; CHECK-MVE-NEXT: cmp r1, #0
1704 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
1705 ; CHECK-MVE-NEXT: cset r1, ne
1706 ; CHECK-MVE-NEXT: cmp r1, #0
1707 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
1708 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1709 ; CHECK-MVE-NEXT: it hi
1710 ; CHECK-MVE-NEXT: movhi r0, #1
1711 ; CHECK-MVE-NEXT: cmp r0, #0
1712 ; CHECK-MVE-NEXT: cset r0, ne
1713 ; CHECK-MVE-NEXT: cmp r0, #0
1714 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
1715 ; CHECK-MVE-NEXT: vins.f16 s3, s4
1716 ; CHECK-MVE-NEXT: bx lr
1718 ; CHECK-MVEFP-LABEL: vcmp_ugt_v8f16:
1719 ; CHECK-MVEFP: @ %bb.0: @ %entry
1720 ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q0, zr
1721 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1722 ; CHECK-MVEFP-NEXT: bx lr
1724 %c = fcmp ugt <8 x half> %src, zeroinitializer
1725 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1729 define arm_aapcs_vfpcc <8 x half> @vcmp_uge_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
1730 ; CHECK-MVE-LABEL: vcmp_uge_v8f16:
1731 ; CHECK-MVE: @ %bb.0: @ %entry
1732 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1733 ; CHECK-MVE-NEXT: movs r1, #0
1734 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
1735 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1736 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1737 ; CHECK-MVE-NEXT: it pl
1738 ; CHECK-MVE-NEXT: movpl r1, #1
1739 ; CHECK-MVE-NEXT: cmp r1, #0
1740 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1741 ; CHECK-MVE-NEXT: cset r1, ne
1742 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
1743 ; CHECK-MVE-NEXT: cmp r1, #0
1744 ; CHECK-MVE-NEXT: mov.w r1, #0
1745 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1746 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1747 ; CHECK-MVE-NEXT: it pl
1748 ; CHECK-MVE-NEXT: movpl r1, #1
1749 ; CHECK-MVE-NEXT: cmp r1, #0
1750 ; CHECK-MVE-NEXT: cset r1, ne
1751 ; CHECK-MVE-NEXT: movs r0, #0
1752 ; CHECK-MVE-NEXT: cmp r1, #0
1753 ; CHECK-MVE-NEXT: mov.w r1, #0
1754 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
1755 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
1756 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1757 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
1758 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1759 ; CHECK-MVE-NEXT: it pl
1760 ; CHECK-MVE-NEXT: movpl r1, #1
1761 ; CHECK-MVE-NEXT: cmp r1, #0
1762 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
1763 ; CHECK-MVE-NEXT: cset r1, ne
1764 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
1765 ; CHECK-MVE-NEXT: cmp r1, #0
1766 ; CHECK-MVE-NEXT: mov.w r1, #0
1767 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1768 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1769 ; CHECK-MVE-NEXT: it pl
1770 ; CHECK-MVE-NEXT: movpl r1, #1
1771 ; CHECK-MVE-NEXT: cmp r1, #0
1772 ; CHECK-MVE-NEXT: cset r1, ne
1773 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
1774 ; CHECK-MVE-NEXT: cmp r1, #0
1775 ; CHECK-MVE-NEXT: mov.w r1, #0
1776 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
1777 ; CHECK-MVE-NEXT: vins.f16 s0, s12
1778 ; CHECK-MVE-NEXT: vins.f16 s1, s4
1779 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
1780 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1781 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
1782 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1783 ; CHECK-MVE-NEXT: it pl
1784 ; CHECK-MVE-NEXT: movpl r1, #1
1785 ; CHECK-MVE-NEXT: cmp r1, #0
1786 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
1787 ; CHECK-MVE-NEXT: cset r1, ne
1788 ; CHECK-MVE-NEXT: cmp r1, #0
1789 ; CHECK-MVE-NEXT: mov.w r1, #0
1790 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1791 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1792 ; CHECK-MVE-NEXT: it pl
1793 ; CHECK-MVE-NEXT: movpl r1, #1
1794 ; CHECK-MVE-NEXT: cmp r1, #0
1795 ; CHECK-MVE-NEXT: cset r1, ne
1796 ; CHECK-MVE-NEXT: cmp r1, #0
1797 ; CHECK-MVE-NEXT: mov.w r1, #0
1798 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
1799 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
1800 ; CHECK-MVE-NEXT: vins.f16 s2, s4
1801 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
1802 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1803 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
1804 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1805 ; CHECK-MVE-NEXT: it pl
1806 ; CHECK-MVE-NEXT: movpl r1, #1
1807 ; CHECK-MVE-NEXT: cmp r1, #0
1808 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
1809 ; CHECK-MVE-NEXT: cset r1, ne
1810 ; CHECK-MVE-NEXT: cmp r1, #0
1811 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
1812 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1813 ; CHECK-MVE-NEXT: it pl
1814 ; CHECK-MVE-NEXT: movpl r0, #1
1815 ; CHECK-MVE-NEXT: cmp r0, #0
1816 ; CHECK-MVE-NEXT: cset r0, ne
1817 ; CHECK-MVE-NEXT: cmp r0, #0
1818 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
1819 ; CHECK-MVE-NEXT: vins.f16 s3, s4
1820 ; CHECK-MVE-NEXT: bx lr
1822 ; CHECK-MVEFP-LABEL: vcmp_uge_v8f16:
1823 ; CHECK-MVEFP: @ %bb.0: @ %entry
1824 ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q0, zr
1825 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1826 ; CHECK-MVEFP-NEXT: bx lr
1828 %c = fcmp uge <8 x half> %src, zeroinitializer
1829 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1833 define arm_aapcs_vfpcc <8 x half> @vcmp_ult_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
1834 ; CHECK-MVE-LABEL: vcmp_ult_v8f16:
1835 ; CHECK-MVE: @ %bb.0: @ %entry
1836 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1837 ; CHECK-MVE-NEXT: movs r1, #0
1838 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
1839 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1840 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1841 ; CHECK-MVE-NEXT: it lt
1842 ; CHECK-MVE-NEXT: movlt r1, #1
1843 ; CHECK-MVE-NEXT: cmp r1, #0
1844 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1845 ; CHECK-MVE-NEXT: cset r1, ne
1846 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
1847 ; CHECK-MVE-NEXT: cmp r1, #0
1848 ; CHECK-MVE-NEXT: mov.w r1, #0
1849 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1850 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1851 ; CHECK-MVE-NEXT: it lt
1852 ; CHECK-MVE-NEXT: movlt r1, #1
1853 ; CHECK-MVE-NEXT: cmp r1, #0
1854 ; CHECK-MVE-NEXT: cset r1, ne
1855 ; CHECK-MVE-NEXT: movs r0, #0
1856 ; CHECK-MVE-NEXT: cmp r1, #0
1857 ; CHECK-MVE-NEXT: mov.w r1, #0
1858 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
1859 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
1860 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1861 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
1862 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1863 ; CHECK-MVE-NEXT: it lt
1864 ; CHECK-MVE-NEXT: movlt r1, #1
1865 ; CHECK-MVE-NEXT: cmp r1, #0
1866 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
1867 ; CHECK-MVE-NEXT: cset r1, ne
1868 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
1869 ; CHECK-MVE-NEXT: cmp r1, #0
1870 ; CHECK-MVE-NEXT: mov.w r1, #0
1871 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1872 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1873 ; CHECK-MVE-NEXT: it lt
1874 ; CHECK-MVE-NEXT: movlt r1, #1
1875 ; CHECK-MVE-NEXT: cmp r1, #0
1876 ; CHECK-MVE-NEXT: cset r1, ne
1877 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
1878 ; CHECK-MVE-NEXT: cmp r1, #0
1879 ; CHECK-MVE-NEXT: mov.w r1, #0
1880 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
1881 ; CHECK-MVE-NEXT: vins.f16 s0, s12
1882 ; CHECK-MVE-NEXT: vins.f16 s1, s4
1883 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
1884 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1885 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
1886 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1887 ; CHECK-MVE-NEXT: it lt
1888 ; CHECK-MVE-NEXT: movlt r1, #1
1889 ; CHECK-MVE-NEXT: cmp r1, #0
1890 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
1891 ; CHECK-MVE-NEXT: cset r1, ne
1892 ; CHECK-MVE-NEXT: cmp r1, #0
1893 ; CHECK-MVE-NEXT: mov.w r1, #0
1894 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1895 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1896 ; CHECK-MVE-NEXT: it lt
1897 ; CHECK-MVE-NEXT: movlt r1, #1
1898 ; CHECK-MVE-NEXT: cmp r1, #0
1899 ; CHECK-MVE-NEXT: cset r1, ne
1900 ; CHECK-MVE-NEXT: cmp r1, #0
1901 ; CHECK-MVE-NEXT: mov.w r1, #0
1902 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
1903 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
1904 ; CHECK-MVE-NEXT: vins.f16 s2, s4
1905 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
1906 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1907 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
1908 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1909 ; CHECK-MVE-NEXT: it lt
1910 ; CHECK-MVE-NEXT: movlt r1, #1
1911 ; CHECK-MVE-NEXT: cmp r1, #0
1912 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
1913 ; CHECK-MVE-NEXT: cset r1, ne
1914 ; CHECK-MVE-NEXT: cmp r1, #0
1915 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
1916 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1917 ; CHECK-MVE-NEXT: it lt
1918 ; CHECK-MVE-NEXT: movlt r0, #1
1919 ; CHECK-MVE-NEXT: cmp r0, #0
1920 ; CHECK-MVE-NEXT: cset r0, ne
1921 ; CHECK-MVE-NEXT: cmp r0, #0
1922 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
1923 ; CHECK-MVE-NEXT: vins.f16 s3, s4
1924 ; CHECK-MVE-NEXT: bx lr
1926 ; CHECK-MVEFP-LABEL: vcmp_ult_v8f16:
1927 ; CHECK-MVEFP: @ %bb.0: @ %entry
1928 ; CHECK-MVEFP-NEXT: vcmp.f16 lt, q0, zr
1929 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1930 ; CHECK-MVEFP-NEXT: bx lr
1932 %c = fcmp ult <8 x half> %src, zeroinitializer
1933 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1937 define arm_aapcs_vfpcc <8 x half> @vcmp_ule_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
1938 ; CHECK-MVE-LABEL: vcmp_ule_v8f16:
1939 ; CHECK-MVE: @ %bb.0: @ %entry
1940 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1941 ; CHECK-MVE-NEXT: movs r1, #0
1942 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
1943 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1944 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1945 ; CHECK-MVE-NEXT: it le
1946 ; CHECK-MVE-NEXT: movle r1, #1
1947 ; CHECK-MVE-NEXT: cmp r1, #0
1948 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1949 ; CHECK-MVE-NEXT: cset r1, ne
1950 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
1951 ; CHECK-MVE-NEXT: cmp r1, #0
1952 ; CHECK-MVE-NEXT: mov.w r1, #0
1953 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1954 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1955 ; CHECK-MVE-NEXT: it le
1956 ; CHECK-MVE-NEXT: movle r1, #1
1957 ; CHECK-MVE-NEXT: cmp r1, #0
1958 ; CHECK-MVE-NEXT: cset r1, ne
1959 ; CHECK-MVE-NEXT: movs r0, #0
1960 ; CHECK-MVE-NEXT: cmp r1, #0
1961 ; CHECK-MVE-NEXT: mov.w r1, #0
1962 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
1963 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
1964 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1965 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
1966 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1967 ; CHECK-MVE-NEXT: it le
1968 ; CHECK-MVE-NEXT: movle r1, #1
1969 ; CHECK-MVE-NEXT: cmp r1, #0
1970 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
1971 ; CHECK-MVE-NEXT: cset r1, ne
1972 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
1973 ; CHECK-MVE-NEXT: cmp r1, #0
1974 ; CHECK-MVE-NEXT: mov.w r1, #0
1975 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1976 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1977 ; CHECK-MVE-NEXT: it le
1978 ; CHECK-MVE-NEXT: movle r1, #1
1979 ; CHECK-MVE-NEXT: cmp r1, #0
1980 ; CHECK-MVE-NEXT: cset r1, ne
1981 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
1982 ; CHECK-MVE-NEXT: cmp r1, #0
1983 ; CHECK-MVE-NEXT: mov.w r1, #0
1984 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
1985 ; CHECK-MVE-NEXT: vins.f16 s0, s12
1986 ; CHECK-MVE-NEXT: vins.f16 s1, s4
1987 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
1988 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
1989 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
1990 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1991 ; CHECK-MVE-NEXT: it le
1992 ; CHECK-MVE-NEXT: movle r1, #1
1993 ; CHECK-MVE-NEXT: cmp r1, #0
1994 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
1995 ; CHECK-MVE-NEXT: cset r1, ne
1996 ; CHECK-MVE-NEXT: cmp r1, #0
1997 ; CHECK-MVE-NEXT: mov.w r1, #0
1998 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
1999 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2000 ; CHECK-MVE-NEXT: it le
2001 ; CHECK-MVE-NEXT: movle r1, #1
2002 ; CHECK-MVE-NEXT: cmp r1, #0
2003 ; CHECK-MVE-NEXT: cset r1, ne
2004 ; CHECK-MVE-NEXT: cmp r1, #0
2005 ; CHECK-MVE-NEXT: mov.w r1, #0
2006 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
2007 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
2008 ; CHECK-MVE-NEXT: vins.f16 s2, s4
2009 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
2010 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
2011 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
2012 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2013 ; CHECK-MVE-NEXT: it le
2014 ; CHECK-MVE-NEXT: movle r1, #1
2015 ; CHECK-MVE-NEXT: cmp r1, #0
2016 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
2017 ; CHECK-MVE-NEXT: cset r1, ne
2018 ; CHECK-MVE-NEXT: cmp r1, #0
2019 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
2020 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2021 ; CHECK-MVE-NEXT: it le
2022 ; CHECK-MVE-NEXT: movle r0, #1
2023 ; CHECK-MVE-NEXT: cmp r0, #0
2024 ; CHECK-MVE-NEXT: cset r0, ne
2025 ; CHECK-MVE-NEXT: cmp r0, #0
2026 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
2027 ; CHECK-MVE-NEXT: vins.f16 s3, s4
2028 ; CHECK-MVE-NEXT: bx lr
2030 ; CHECK-MVEFP-LABEL: vcmp_ule_v8f16:
2031 ; CHECK-MVEFP: @ %bb.0: @ %entry
2032 ; CHECK-MVEFP-NEXT: vcmp.f16 le, q0, zr
2033 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2034 ; CHECK-MVEFP-NEXT: bx lr
2036 %c = fcmp ule <8 x half> %src, zeroinitializer
2037 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
2041 define arm_aapcs_vfpcc <8 x half> @vcmp_ord_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
2042 ; CHECK-MVE-LABEL: vcmp_ord_v8f16:
2043 ; CHECK-MVE: @ %bb.0: @ %entry
2044 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
2045 ; CHECK-MVE-NEXT: movs r1, #0
2046 ; CHECK-MVE-NEXT: vcmp.f16 s12, s12
2047 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
2048 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2049 ; CHECK-MVE-NEXT: it vc
2050 ; CHECK-MVE-NEXT: movvc r1, #1
2051 ; CHECK-MVE-NEXT: cmp r1, #0
2052 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
2053 ; CHECK-MVE-NEXT: cset r1, ne
2054 ; CHECK-MVE-NEXT: vcmp.f16 s0, s0
2055 ; CHECK-MVE-NEXT: cmp r1, #0
2056 ; CHECK-MVE-NEXT: mov.w r1, #0
2057 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
2058 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2059 ; CHECK-MVE-NEXT: it vc
2060 ; CHECK-MVE-NEXT: movvc r1, #1
2061 ; CHECK-MVE-NEXT: cmp r1, #0
2062 ; CHECK-MVE-NEXT: cset r1, ne
2063 ; CHECK-MVE-NEXT: movs r0, #0
2064 ; CHECK-MVE-NEXT: cmp r1, #0
2065 ; CHECK-MVE-NEXT: mov.w r1, #0
2066 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
2067 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
2068 ; CHECK-MVE-NEXT: vcmp.f16 s4, s4
2069 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
2070 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2071 ; CHECK-MVE-NEXT: it vc
2072 ; CHECK-MVE-NEXT: movvc r1, #1
2073 ; CHECK-MVE-NEXT: cmp r1, #0
2074 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
2075 ; CHECK-MVE-NEXT: cset r1, ne
2076 ; CHECK-MVE-NEXT: vcmp.f16 s1, s1
2077 ; CHECK-MVE-NEXT: cmp r1, #0
2078 ; CHECK-MVE-NEXT: mov.w r1, #0
2079 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
2080 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2081 ; CHECK-MVE-NEXT: it vc
2082 ; CHECK-MVE-NEXT: movvc r1, #1
2083 ; CHECK-MVE-NEXT: cmp r1, #0
2084 ; CHECK-MVE-NEXT: cset r1, ne
2085 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
2086 ; CHECK-MVE-NEXT: cmp r1, #0
2087 ; CHECK-MVE-NEXT: mov.w r1, #0
2088 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
2089 ; CHECK-MVE-NEXT: vins.f16 s0, s12
2090 ; CHECK-MVE-NEXT: vins.f16 s1, s4
2091 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
2092 ; CHECK-MVE-NEXT: vcmp.f16 s4, s4
2093 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
2094 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2095 ; CHECK-MVE-NEXT: it vc
2096 ; CHECK-MVE-NEXT: movvc r1, #1
2097 ; CHECK-MVE-NEXT: cmp r1, #0
2098 ; CHECK-MVE-NEXT: vcmp.f16 s2, s2
2099 ; CHECK-MVE-NEXT: cset r1, ne
2100 ; CHECK-MVE-NEXT: cmp r1, #0
2101 ; CHECK-MVE-NEXT: mov.w r1, #0
2102 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
2103 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2104 ; CHECK-MVE-NEXT: it vc
2105 ; CHECK-MVE-NEXT: movvc r1, #1
2106 ; CHECK-MVE-NEXT: cmp r1, #0
2107 ; CHECK-MVE-NEXT: cset r1, ne
2108 ; CHECK-MVE-NEXT: cmp r1, #0
2109 ; CHECK-MVE-NEXT: mov.w r1, #0
2110 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
2111 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
2112 ; CHECK-MVE-NEXT: vins.f16 s2, s4
2113 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
2114 ; CHECK-MVE-NEXT: vcmp.f16 s4, s4
2115 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
2116 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2117 ; CHECK-MVE-NEXT: it vc
2118 ; CHECK-MVE-NEXT: movvc r1, #1
2119 ; CHECK-MVE-NEXT: cmp r1, #0
2120 ; CHECK-MVE-NEXT: vcmp.f16 s3, s3
2121 ; CHECK-MVE-NEXT: cset r1, ne
2122 ; CHECK-MVE-NEXT: cmp r1, #0
2123 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
2124 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2125 ; CHECK-MVE-NEXT: it vc
2126 ; CHECK-MVE-NEXT: movvc r0, #1
2127 ; CHECK-MVE-NEXT: cmp r0, #0
2128 ; CHECK-MVE-NEXT: cset r0, ne
2129 ; CHECK-MVE-NEXT: cmp r0, #0
2130 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
2131 ; CHECK-MVE-NEXT: vins.f16 s3, s4
2132 ; CHECK-MVE-NEXT: bx lr
2134 ; CHECK-MVEFP-LABEL: vcmp_ord_v8f16:
2135 ; CHECK-MVEFP: @ %bb.0: @ %entry
2136 ; CHECK-MVEFP-NEXT: vpt.f16 ge, q0, zr
2137 ; CHECK-MVEFP-NEXT: vcmpt.f16 lt, q0, zr
2138 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q1
2139 ; CHECK-MVEFP-NEXT: bx lr
2141 %c = fcmp ord <8 x half> %src, zeroinitializer
2142 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
2146 define arm_aapcs_vfpcc <8 x half> @vcmp_uno_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
2147 ; CHECK-MVE-LABEL: vcmp_uno_v8f16:
2148 ; CHECK-MVE: @ %bb.0: @ %entry
2149 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
2150 ; CHECK-MVE-NEXT: movs r1, #0
2151 ; CHECK-MVE-NEXT: vcmp.f16 s12, s12
2152 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
2153 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2154 ; CHECK-MVE-NEXT: it vs
2155 ; CHECK-MVE-NEXT: movvs r1, #1
2156 ; CHECK-MVE-NEXT: cmp r1, #0
2157 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
2158 ; CHECK-MVE-NEXT: cset r1, ne
2159 ; CHECK-MVE-NEXT: vcmp.f16 s0, s0
2160 ; CHECK-MVE-NEXT: cmp r1, #0
2161 ; CHECK-MVE-NEXT: mov.w r1, #0
2162 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
2163 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2164 ; CHECK-MVE-NEXT: it vs
2165 ; CHECK-MVE-NEXT: movvs r1, #1
2166 ; CHECK-MVE-NEXT: cmp r1, #0
2167 ; CHECK-MVE-NEXT: cset r1, ne
2168 ; CHECK-MVE-NEXT: movs r0, #0
2169 ; CHECK-MVE-NEXT: cmp r1, #0
2170 ; CHECK-MVE-NEXT: mov.w r1, #0
2171 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
2172 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
2173 ; CHECK-MVE-NEXT: vcmp.f16 s4, s4
2174 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
2175 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2176 ; CHECK-MVE-NEXT: it vs
2177 ; CHECK-MVE-NEXT: movvs r1, #1
2178 ; CHECK-MVE-NEXT: cmp r1, #0
2179 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
2180 ; CHECK-MVE-NEXT: cset r1, ne
2181 ; CHECK-MVE-NEXT: vcmp.f16 s1, s1
2182 ; CHECK-MVE-NEXT: cmp r1, #0
2183 ; CHECK-MVE-NEXT: mov.w r1, #0
2184 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
2185 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2186 ; CHECK-MVE-NEXT: it vs
2187 ; CHECK-MVE-NEXT: movvs r1, #1
2188 ; CHECK-MVE-NEXT: cmp r1, #0
2189 ; CHECK-MVE-NEXT: cset r1, ne
2190 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
2191 ; CHECK-MVE-NEXT: cmp r1, #0
2192 ; CHECK-MVE-NEXT: mov.w r1, #0
2193 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
2194 ; CHECK-MVE-NEXT: vins.f16 s0, s12
2195 ; CHECK-MVE-NEXT: vins.f16 s1, s4
2196 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
2197 ; CHECK-MVE-NEXT: vcmp.f16 s4, s4
2198 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
2199 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2200 ; CHECK-MVE-NEXT: it vs
2201 ; CHECK-MVE-NEXT: movvs r1, #1
2202 ; CHECK-MVE-NEXT: cmp r1, #0
2203 ; CHECK-MVE-NEXT: vcmp.f16 s2, s2
2204 ; CHECK-MVE-NEXT: cset r1, ne
2205 ; CHECK-MVE-NEXT: cmp r1, #0
2206 ; CHECK-MVE-NEXT: mov.w r1, #0
2207 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
2208 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2209 ; CHECK-MVE-NEXT: it vs
2210 ; CHECK-MVE-NEXT: movvs r1, #1
2211 ; CHECK-MVE-NEXT: cmp r1, #0
2212 ; CHECK-MVE-NEXT: cset r1, ne
2213 ; CHECK-MVE-NEXT: cmp r1, #0
2214 ; CHECK-MVE-NEXT: mov.w r1, #0
2215 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
2216 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
2217 ; CHECK-MVE-NEXT: vins.f16 s2, s4
2218 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
2219 ; CHECK-MVE-NEXT: vcmp.f16 s4, s4
2220 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
2221 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2222 ; CHECK-MVE-NEXT: it vs
2223 ; CHECK-MVE-NEXT: movvs r1, #1
2224 ; CHECK-MVE-NEXT: cmp r1, #0
2225 ; CHECK-MVE-NEXT: vcmp.f16 s3, s3
2226 ; CHECK-MVE-NEXT: cset r1, ne
2227 ; CHECK-MVE-NEXT: cmp r1, #0
2228 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
2229 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2230 ; CHECK-MVE-NEXT: it vs
2231 ; CHECK-MVE-NEXT: movvs r0, #1
2232 ; CHECK-MVE-NEXT: cmp r0, #0
2233 ; CHECK-MVE-NEXT: cset r0, ne
2234 ; CHECK-MVE-NEXT: cmp r0, #0
2235 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
2236 ; CHECK-MVE-NEXT: vins.f16 s3, s4
2237 ; CHECK-MVE-NEXT: bx lr
2239 ; CHECK-MVEFP-LABEL: vcmp_uno_v8f16:
2240 ; CHECK-MVEFP: @ %bb.0: @ %entry
2241 ; CHECK-MVEFP-NEXT: vpt.f16 ge, q0, zr
2242 ; CHECK-MVEFP-NEXT: vcmpt.f16 lt, q0, zr
2243 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2244 ; CHECK-MVEFP-NEXT: bx lr
2246 %c = fcmp uno <8 x half> %src, zeroinitializer
2247 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
2254 define arm_aapcs_vfpcc <4 x float> @vcmp_r_oeq_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2255 ; CHECK-MVE-LABEL: vcmp_r_oeq_v4f32:
2256 ; CHECK-MVE: @ %bb.0: @ %entry
2257 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2258 ; CHECK-MVE-NEXT: movs r1, #0
2259 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2260 ; CHECK-MVE-NEXT: it eq
2261 ; CHECK-MVE-NEXT: moveq r1, #1
2262 ; CHECK-MVE-NEXT: cmp r1, #0
2263 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
2264 ; CHECK-MVE-NEXT: cset r1, ne
2265 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2266 ; CHECK-MVE-NEXT: mov.w r2, #0
2267 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
2268 ; CHECK-MVE-NEXT: it eq
2269 ; CHECK-MVE-NEXT: moveq r2, #1
2270 ; CHECK-MVE-NEXT: cmp r2, #0
2271 ; CHECK-MVE-NEXT: cset r2, ne
2272 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2273 ; CHECK-MVE-NEXT: mov.w r3, #0
2274 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
2275 ; CHECK-MVE-NEXT: it eq
2276 ; CHECK-MVE-NEXT: moveq r3, #1
2277 ; CHECK-MVE-NEXT: cmp r3, #0
2278 ; CHECK-MVE-NEXT: cset r3, ne
2279 ; CHECK-MVE-NEXT: movs r0, #0
2280 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2281 ; CHECK-MVE-NEXT: it eq
2282 ; CHECK-MVE-NEXT: moveq r0, #1
2283 ; CHECK-MVE-NEXT: cmp r0, #0
2284 ; CHECK-MVE-NEXT: cset r0, ne
2285 ; CHECK-MVE-NEXT: cmp r3, #0
2286 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2287 ; CHECK-MVE-NEXT: cmp r0, #0
2288 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2289 ; CHECK-MVE-NEXT: cmp r1, #0
2290 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2291 ; CHECK-MVE-NEXT: cmp r2, #0
2292 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2293 ; CHECK-MVE-NEXT: bx lr
2295 ; CHECK-MVEFP-LABEL: vcmp_r_oeq_v4f32:
2296 ; CHECK-MVEFP: @ %bb.0: @ %entry
2297 ; CHECK-MVEFP-NEXT: vcmp.f32 eq, q0, zr
2298 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2299 ; CHECK-MVEFP-NEXT: bx lr
2301 %c = fcmp oeq <4 x float> zeroinitializer, %src
2302 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2306 define arm_aapcs_vfpcc <4 x float> @vcmp_r_one_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2307 ; CHECK-MVE-LABEL: vcmp_r_one_v4f32:
2308 ; CHECK-MVE: @ %bb.0: @ %entry
2309 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2310 ; CHECK-MVE-NEXT: movs r1, #0
2311 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2312 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2313 ; CHECK-MVE-NEXT: it mi
2314 ; CHECK-MVE-NEXT: movmi r1, #1
2315 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2316 ; CHECK-MVE-NEXT: it gt
2317 ; CHECK-MVE-NEXT: movgt r1, #1
2318 ; CHECK-MVE-NEXT: cmp r1, #0
2319 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
2320 ; CHECK-MVE-NEXT: mov.w r2, #0
2321 ; CHECK-MVE-NEXT: cset r1, ne
2322 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2323 ; CHECK-MVE-NEXT: it mi
2324 ; CHECK-MVE-NEXT: movmi r2, #1
2325 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
2326 ; CHECK-MVE-NEXT: it gt
2327 ; CHECK-MVE-NEXT: movgt r2, #1
2328 ; CHECK-MVE-NEXT: cmp r2, #0
2329 ; CHECK-MVE-NEXT: mov.w r3, #0
2330 ; CHECK-MVE-NEXT: cset r2, ne
2331 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2332 ; CHECK-MVE-NEXT: it mi
2333 ; CHECK-MVE-NEXT: movmi r3, #1
2334 ; CHECK-MVE-NEXT: it gt
2335 ; CHECK-MVE-NEXT: movgt r3, #1
2336 ; CHECK-MVE-NEXT: cmp r3, #0
2337 ; CHECK-MVE-NEXT: mov.w r0, #0
2338 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
2339 ; CHECK-MVE-NEXT: cset r3, ne
2340 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2341 ; CHECK-MVE-NEXT: it mi
2342 ; CHECK-MVE-NEXT: movmi r0, #1
2343 ; CHECK-MVE-NEXT: it gt
2344 ; CHECK-MVE-NEXT: movgt r0, #1
2345 ; CHECK-MVE-NEXT: cmp r0, #0
2346 ; CHECK-MVE-NEXT: cset r0, ne
2347 ; CHECK-MVE-NEXT: cmp r3, #0
2348 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2349 ; CHECK-MVE-NEXT: cmp r0, #0
2350 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2351 ; CHECK-MVE-NEXT: cmp r1, #0
2352 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2353 ; CHECK-MVE-NEXT: cmp r2, #0
2354 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2355 ; CHECK-MVE-NEXT: bx lr
2357 ; CHECK-MVEFP-LABEL: vcmp_r_one_v4f32:
2358 ; CHECK-MVEFP: @ %bb.0: @ %entry
2359 ; CHECK-MVEFP-NEXT: vpt.f32 le, q0, zr
2360 ; CHECK-MVEFP-NEXT: vcmpt.f32 ge, q0, zr
2361 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q1
2362 ; CHECK-MVEFP-NEXT: bx lr
2364 %c = fcmp one <4 x float> zeroinitializer, %src
2365 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2369 define arm_aapcs_vfpcc <4 x float> @vcmp_r_ogt_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2370 ; CHECK-MVE-LABEL: vcmp_r_ogt_v4f32:
2371 ; CHECK-MVE: @ %bb.0: @ %entry
2372 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2373 ; CHECK-MVE-NEXT: movs r1, #0
2374 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2375 ; CHECK-MVE-NEXT: it mi
2376 ; CHECK-MVE-NEXT: movmi r1, #1
2377 ; CHECK-MVE-NEXT: cmp r1, #0
2378 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
2379 ; CHECK-MVE-NEXT: cset r1, ne
2380 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2381 ; CHECK-MVE-NEXT: mov.w r2, #0
2382 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
2383 ; CHECK-MVE-NEXT: it mi
2384 ; CHECK-MVE-NEXT: movmi r2, #1
2385 ; CHECK-MVE-NEXT: cmp r2, #0
2386 ; CHECK-MVE-NEXT: cset r2, ne
2387 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2388 ; CHECK-MVE-NEXT: mov.w r3, #0
2389 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
2390 ; CHECK-MVE-NEXT: it mi
2391 ; CHECK-MVE-NEXT: movmi r3, #1
2392 ; CHECK-MVE-NEXT: cmp r3, #0
2393 ; CHECK-MVE-NEXT: cset r3, ne
2394 ; CHECK-MVE-NEXT: movs r0, #0
2395 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2396 ; CHECK-MVE-NEXT: it mi
2397 ; CHECK-MVE-NEXT: movmi r0, #1
2398 ; CHECK-MVE-NEXT: cmp r0, #0
2399 ; CHECK-MVE-NEXT: cset r0, ne
2400 ; CHECK-MVE-NEXT: cmp r3, #0
2401 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2402 ; CHECK-MVE-NEXT: cmp r0, #0
2403 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2404 ; CHECK-MVE-NEXT: cmp r1, #0
2405 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2406 ; CHECK-MVE-NEXT: cmp r2, #0
2407 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2408 ; CHECK-MVE-NEXT: bx lr
2410 ; CHECK-MVEFP-LABEL: vcmp_r_ogt_v4f32:
2411 ; CHECK-MVEFP: @ %bb.0: @ %entry
2412 ; CHECK-MVEFP-NEXT: vcmp.f32 lt, q0, zr
2413 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2414 ; CHECK-MVEFP-NEXT: bx lr
2416 %c = fcmp ogt <4 x float> zeroinitializer, %src
2417 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2421 define arm_aapcs_vfpcc <4 x float> @vcmp_r_oge_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2422 ; CHECK-MVE-LABEL: vcmp_r_oge_v4f32:
2423 ; CHECK-MVE: @ %bb.0: @ %entry
2424 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2425 ; CHECK-MVE-NEXT: movs r1, #0
2426 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2427 ; CHECK-MVE-NEXT: it ls
2428 ; CHECK-MVE-NEXT: movls r1, #1
2429 ; CHECK-MVE-NEXT: cmp r1, #0
2430 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
2431 ; CHECK-MVE-NEXT: cset r1, ne
2432 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2433 ; CHECK-MVE-NEXT: mov.w r2, #0
2434 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
2435 ; CHECK-MVE-NEXT: it ls
2436 ; CHECK-MVE-NEXT: movls r2, #1
2437 ; CHECK-MVE-NEXT: cmp r2, #0
2438 ; CHECK-MVE-NEXT: cset r2, ne
2439 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2440 ; CHECK-MVE-NEXT: mov.w r3, #0
2441 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
2442 ; CHECK-MVE-NEXT: it ls
2443 ; CHECK-MVE-NEXT: movls r3, #1
2444 ; CHECK-MVE-NEXT: cmp r3, #0
2445 ; CHECK-MVE-NEXT: cset r3, ne
2446 ; CHECK-MVE-NEXT: movs r0, #0
2447 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2448 ; CHECK-MVE-NEXT: it ls
2449 ; CHECK-MVE-NEXT: movls r0, #1
2450 ; CHECK-MVE-NEXT: cmp r0, #0
2451 ; CHECK-MVE-NEXT: cset r0, ne
2452 ; CHECK-MVE-NEXT: cmp r3, #0
2453 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2454 ; CHECK-MVE-NEXT: cmp r0, #0
2455 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2456 ; CHECK-MVE-NEXT: cmp r1, #0
2457 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2458 ; CHECK-MVE-NEXT: cmp r2, #0
2459 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2460 ; CHECK-MVE-NEXT: bx lr
2462 ; CHECK-MVEFP-LABEL: vcmp_r_oge_v4f32:
2463 ; CHECK-MVEFP: @ %bb.0: @ %entry
2464 ; CHECK-MVEFP-NEXT: vcmp.f32 le, q0, zr
2465 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2466 ; CHECK-MVEFP-NEXT: bx lr
2468 %c = fcmp oge <4 x float> zeroinitializer, %src
2469 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2473 define arm_aapcs_vfpcc <4 x float> @vcmp_r_olt_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2474 ; CHECK-MVE-LABEL: vcmp_r_olt_v4f32:
2475 ; CHECK-MVE: @ %bb.0: @ %entry
2476 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2477 ; CHECK-MVE-NEXT: movs r1, #0
2478 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2479 ; CHECK-MVE-NEXT: it gt
2480 ; CHECK-MVE-NEXT: movgt r1, #1
2481 ; CHECK-MVE-NEXT: cmp r1, #0
2482 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
2483 ; CHECK-MVE-NEXT: cset r1, ne
2484 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2485 ; CHECK-MVE-NEXT: mov.w r2, #0
2486 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
2487 ; CHECK-MVE-NEXT: it gt
2488 ; CHECK-MVE-NEXT: movgt r2, #1
2489 ; CHECK-MVE-NEXT: cmp r2, #0
2490 ; CHECK-MVE-NEXT: cset r2, ne
2491 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2492 ; CHECK-MVE-NEXT: mov.w r3, #0
2493 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
2494 ; CHECK-MVE-NEXT: it gt
2495 ; CHECK-MVE-NEXT: movgt r3, #1
2496 ; CHECK-MVE-NEXT: cmp r3, #0
2497 ; CHECK-MVE-NEXT: cset r3, ne
2498 ; CHECK-MVE-NEXT: movs r0, #0
2499 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2500 ; CHECK-MVE-NEXT: it gt
2501 ; CHECK-MVE-NEXT: movgt r0, #1
2502 ; CHECK-MVE-NEXT: cmp r0, #0
2503 ; CHECK-MVE-NEXT: cset r0, ne
2504 ; CHECK-MVE-NEXT: cmp r3, #0
2505 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2506 ; CHECK-MVE-NEXT: cmp r0, #0
2507 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2508 ; CHECK-MVE-NEXT: cmp r1, #0
2509 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2510 ; CHECK-MVE-NEXT: cmp r2, #0
2511 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2512 ; CHECK-MVE-NEXT: bx lr
2514 ; CHECK-MVEFP-LABEL: vcmp_r_olt_v4f32:
2515 ; CHECK-MVEFP: @ %bb.0: @ %entry
2516 ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q0, zr
2517 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2518 ; CHECK-MVEFP-NEXT: bx lr
2520 %c = fcmp olt <4 x float> zeroinitializer, %src
2521 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2525 define arm_aapcs_vfpcc <4 x float> @vcmp_r_ole_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2526 ; CHECK-MVE-LABEL: vcmp_r_ole_v4f32:
2527 ; CHECK-MVE: @ %bb.0: @ %entry
2528 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2529 ; CHECK-MVE-NEXT: movs r1, #0
2530 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2531 ; CHECK-MVE-NEXT: it ge
2532 ; CHECK-MVE-NEXT: movge r1, #1
2533 ; CHECK-MVE-NEXT: cmp r1, #0
2534 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
2535 ; CHECK-MVE-NEXT: cset r1, ne
2536 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2537 ; CHECK-MVE-NEXT: mov.w r2, #0
2538 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
2539 ; CHECK-MVE-NEXT: it ge
2540 ; CHECK-MVE-NEXT: movge r2, #1
2541 ; CHECK-MVE-NEXT: cmp r2, #0
2542 ; CHECK-MVE-NEXT: cset r2, ne
2543 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2544 ; CHECK-MVE-NEXT: mov.w r3, #0
2545 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
2546 ; CHECK-MVE-NEXT: it ge
2547 ; CHECK-MVE-NEXT: movge r3, #1
2548 ; CHECK-MVE-NEXT: cmp r3, #0
2549 ; CHECK-MVE-NEXT: cset r3, ne
2550 ; CHECK-MVE-NEXT: movs r0, #0
2551 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2552 ; CHECK-MVE-NEXT: it ge
2553 ; CHECK-MVE-NEXT: movge r0, #1
2554 ; CHECK-MVE-NEXT: cmp r0, #0
2555 ; CHECK-MVE-NEXT: cset r0, ne
2556 ; CHECK-MVE-NEXT: cmp r3, #0
2557 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2558 ; CHECK-MVE-NEXT: cmp r0, #0
2559 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2560 ; CHECK-MVE-NEXT: cmp r1, #0
2561 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2562 ; CHECK-MVE-NEXT: cmp r2, #0
2563 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2564 ; CHECK-MVE-NEXT: bx lr
2566 ; CHECK-MVEFP-LABEL: vcmp_r_ole_v4f32:
2567 ; CHECK-MVEFP: @ %bb.0: @ %entry
2568 ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q0, zr
2569 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2570 ; CHECK-MVEFP-NEXT: bx lr
2572 %c = fcmp ole <4 x float> zeroinitializer, %src
2573 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2577 define arm_aapcs_vfpcc <4 x float> @vcmp_r_ueq_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2578 ; CHECK-MVE-LABEL: vcmp_r_ueq_v4f32:
2579 ; CHECK-MVE: @ %bb.0: @ %entry
2580 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2581 ; CHECK-MVE-NEXT: movs r1, #0
2582 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2583 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2584 ; CHECK-MVE-NEXT: it eq
2585 ; CHECK-MVE-NEXT: moveq r1, #1
2586 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2587 ; CHECK-MVE-NEXT: it vs
2588 ; CHECK-MVE-NEXT: movvs r1, #1
2589 ; CHECK-MVE-NEXT: cmp r1, #0
2590 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
2591 ; CHECK-MVE-NEXT: mov.w r2, #0
2592 ; CHECK-MVE-NEXT: cset r1, ne
2593 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2594 ; CHECK-MVE-NEXT: it eq
2595 ; CHECK-MVE-NEXT: moveq r2, #1
2596 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
2597 ; CHECK-MVE-NEXT: it vs
2598 ; CHECK-MVE-NEXT: movvs r2, #1
2599 ; CHECK-MVE-NEXT: cmp r2, #0
2600 ; CHECK-MVE-NEXT: mov.w r3, #0
2601 ; CHECK-MVE-NEXT: cset r2, ne
2602 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2603 ; CHECK-MVE-NEXT: it eq
2604 ; CHECK-MVE-NEXT: moveq r3, #1
2605 ; CHECK-MVE-NEXT: it vs
2606 ; CHECK-MVE-NEXT: movvs r3, #1
2607 ; CHECK-MVE-NEXT: cmp r3, #0
2608 ; CHECK-MVE-NEXT: mov.w r0, #0
2609 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
2610 ; CHECK-MVE-NEXT: cset r3, ne
2611 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2612 ; CHECK-MVE-NEXT: it eq
2613 ; CHECK-MVE-NEXT: moveq r0, #1
2614 ; CHECK-MVE-NEXT: it vs
2615 ; CHECK-MVE-NEXT: movvs r0, #1
2616 ; CHECK-MVE-NEXT: cmp r0, #0
2617 ; CHECK-MVE-NEXT: cset r0, ne
2618 ; CHECK-MVE-NEXT: cmp r3, #0
2619 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2620 ; CHECK-MVE-NEXT: cmp r0, #0
2621 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2622 ; CHECK-MVE-NEXT: cmp r1, #0
2623 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2624 ; CHECK-MVE-NEXT: cmp r2, #0
2625 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2626 ; CHECK-MVE-NEXT: bx lr
2628 ; CHECK-MVEFP-LABEL: vcmp_r_ueq_v4f32:
2629 ; CHECK-MVEFP: @ %bb.0: @ %entry
2630 ; CHECK-MVEFP-NEXT: vpt.f32 le, q0, zr
2631 ; CHECK-MVEFP-NEXT: vcmpt.f32 ge, q0, zr
2632 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2633 ; CHECK-MVEFP-NEXT: bx lr
2635 %c = fcmp ueq <4 x float> zeroinitializer, %src
2636 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2640 define arm_aapcs_vfpcc <4 x float> @vcmp_r_une_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2641 ; CHECK-MVE-LABEL: vcmp_r_une_v4f32:
2642 ; CHECK-MVE: @ %bb.0: @ %entry
2643 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2644 ; CHECK-MVE-NEXT: movs r1, #0
2645 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2646 ; CHECK-MVE-NEXT: it ne
2647 ; CHECK-MVE-NEXT: movne r1, #1
2648 ; CHECK-MVE-NEXT: cmp r1, #0
2649 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
2650 ; CHECK-MVE-NEXT: cset r1, ne
2651 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2652 ; CHECK-MVE-NEXT: mov.w r2, #0
2653 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
2654 ; CHECK-MVE-NEXT: it ne
2655 ; CHECK-MVE-NEXT: movne r2, #1
2656 ; CHECK-MVE-NEXT: cmp r2, #0
2657 ; CHECK-MVE-NEXT: cset r2, ne
2658 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2659 ; CHECK-MVE-NEXT: mov.w r3, #0
2660 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
2661 ; CHECK-MVE-NEXT: it ne
2662 ; CHECK-MVE-NEXT: movne r3, #1
2663 ; CHECK-MVE-NEXT: cmp r3, #0
2664 ; CHECK-MVE-NEXT: cset r3, ne
2665 ; CHECK-MVE-NEXT: movs r0, #0
2666 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2667 ; CHECK-MVE-NEXT: it ne
2668 ; CHECK-MVE-NEXT: movne r0, #1
2669 ; CHECK-MVE-NEXT: cmp r0, #0
2670 ; CHECK-MVE-NEXT: cset r0, ne
2671 ; CHECK-MVE-NEXT: cmp r3, #0
2672 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2673 ; CHECK-MVE-NEXT: cmp r0, #0
2674 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2675 ; CHECK-MVE-NEXT: cmp r1, #0
2676 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2677 ; CHECK-MVE-NEXT: cmp r2, #0
2678 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2679 ; CHECK-MVE-NEXT: bx lr
2681 ; CHECK-MVEFP-LABEL: vcmp_r_une_v4f32:
2682 ; CHECK-MVEFP: @ %bb.0: @ %entry
2683 ; CHECK-MVEFP-NEXT: vcmp.f32 ne, q0, zr
2684 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2685 ; CHECK-MVEFP-NEXT: bx lr
2687 %c = fcmp une <4 x float> zeroinitializer, %src
2688 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2692 define arm_aapcs_vfpcc <4 x float> @vcmp_r_ugt_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2693 ; CHECK-MVE-LABEL: vcmp_r_ugt_v4f32:
2694 ; CHECK-MVE: @ %bb.0: @ %entry
2695 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2696 ; CHECK-MVE-NEXT: movs r1, #0
2697 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2698 ; CHECK-MVE-NEXT: it lt
2699 ; CHECK-MVE-NEXT: movlt r1, #1
2700 ; CHECK-MVE-NEXT: cmp r1, #0
2701 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
2702 ; CHECK-MVE-NEXT: cset r1, ne
2703 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2704 ; CHECK-MVE-NEXT: mov.w r2, #0
2705 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
2706 ; CHECK-MVE-NEXT: it lt
2707 ; CHECK-MVE-NEXT: movlt r2, #1
2708 ; CHECK-MVE-NEXT: cmp r2, #0
2709 ; CHECK-MVE-NEXT: cset r2, ne
2710 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2711 ; CHECK-MVE-NEXT: mov.w r3, #0
2712 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
2713 ; CHECK-MVE-NEXT: it lt
2714 ; CHECK-MVE-NEXT: movlt r3, #1
2715 ; CHECK-MVE-NEXT: cmp r3, #0
2716 ; CHECK-MVE-NEXT: cset r3, ne
2717 ; CHECK-MVE-NEXT: movs r0, #0
2718 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2719 ; CHECK-MVE-NEXT: it lt
2720 ; CHECK-MVE-NEXT: movlt r0, #1
2721 ; CHECK-MVE-NEXT: cmp r0, #0
2722 ; CHECK-MVE-NEXT: cset r0, ne
2723 ; CHECK-MVE-NEXT: cmp r3, #0
2724 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2725 ; CHECK-MVE-NEXT: cmp r0, #0
2726 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2727 ; CHECK-MVE-NEXT: cmp r1, #0
2728 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2729 ; CHECK-MVE-NEXT: cmp r2, #0
2730 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2731 ; CHECK-MVE-NEXT: bx lr
2733 ; CHECK-MVEFP-LABEL: vcmp_r_ugt_v4f32:
2734 ; CHECK-MVEFP: @ %bb.0: @ %entry
2735 ; CHECK-MVEFP-NEXT: vcmp.f32 lt, q0, zr
2736 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2737 ; CHECK-MVEFP-NEXT: bx lr
2739 %c = fcmp ugt <4 x float> zeroinitializer, %src
2740 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2744 define arm_aapcs_vfpcc <4 x float> @vcmp_r_uge_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2745 ; CHECK-MVE-LABEL: vcmp_r_uge_v4f32:
2746 ; CHECK-MVE: @ %bb.0: @ %entry
2747 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2748 ; CHECK-MVE-NEXT: movs r1, #0
2749 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2750 ; CHECK-MVE-NEXT: it le
2751 ; CHECK-MVE-NEXT: movle r1, #1
2752 ; CHECK-MVE-NEXT: cmp r1, #0
2753 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
2754 ; CHECK-MVE-NEXT: cset r1, ne
2755 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2756 ; CHECK-MVE-NEXT: mov.w r2, #0
2757 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
2758 ; CHECK-MVE-NEXT: it le
2759 ; CHECK-MVE-NEXT: movle r2, #1
2760 ; CHECK-MVE-NEXT: cmp r2, #0
2761 ; CHECK-MVE-NEXT: cset r2, ne
2762 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2763 ; CHECK-MVE-NEXT: mov.w r3, #0
2764 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
2765 ; CHECK-MVE-NEXT: it le
2766 ; CHECK-MVE-NEXT: movle r3, #1
2767 ; CHECK-MVE-NEXT: cmp r3, #0
2768 ; CHECK-MVE-NEXT: cset r3, ne
2769 ; CHECK-MVE-NEXT: movs r0, #0
2770 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2771 ; CHECK-MVE-NEXT: it le
2772 ; CHECK-MVE-NEXT: movle r0, #1
2773 ; CHECK-MVE-NEXT: cmp r0, #0
2774 ; CHECK-MVE-NEXT: cset r0, ne
2775 ; CHECK-MVE-NEXT: cmp r3, #0
2776 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2777 ; CHECK-MVE-NEXT: cmp r0, #0
2778 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2779 ; CHECK-MVE-NEXT: cmp r1, #0
2780 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2781 ; CHECK-MVE-NEXT: cmp r2, #0
2782 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2783 ; CHECK-MVE-NEXT: bx lr
2785 ; CHECK-MVEFP-LABEL: vcmp_r_uge_v4f32:
2786 ; CHECK-MVEFP: @ %bb.0: @ %entry
2787 ; CHECK-MVEFP-NEXT: vcmp.f32 le, q0, zr
2788 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2789 ; CHECK-MVEFP-NEXT: bx lr
2791 %c = fcmp uge <4 x float> zeroinitializer, %src
2792 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2796 define arm_aapcs_vfpcc <4 x float> @vcmp_r_ult_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2797 ; CHECK-MVE-LABEL: vcmp_r_ult_v4f32:
2798 ; CHECK-MVE: @ %bb.0: @ %entry
2799 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2800 ; CHECK-MVE-NEXT: movs r1, #0
2801 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2802 ; CHECK-MVE-NEXT: it hi
2803 ; CHECK-MVE-NEXT: movhi r1, #1
2804 ; CHECK-MVE-NEXT: cmp r1, #0
2805 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
2806 ; CHECK-MVE-NEXT: cset r1, ne
2807 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2808 ; CHECK-MVE-NEXT: mov.w r2, #0
2809 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
2810 ; CHECK-MVE-NEXT: it hi
2811 ; CHECK-MVE-NEXT: movhi r2, #1
2812 ; CHECK-MVE-NEXT: cmp r2, #0
2813 ; CHECK-MVE-NEXT: cset r2, ne
2814 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2815 ; CHECK-MVE-NEXT: mov.w r3, #0
2816 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
2817 ; CHECK-MVE-NEXT: it hi
2818 ; CHECK-MVE-NEXT: movhi r3, #1
2819 ; CHECK-MVE-NEXT: cmp r3, #0
2820 ; CHECK-MVE-NEXT: cset r3, ne
2821 ; CHECK-MVE-NEXT: movs r0, #0
2822 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2823 ; CHECK-MVE-NEXT: it hi
2824 ; CHECK-MVE-NEXT: movhi r0, #1
2825 ; CHECK-MVE-NEXT: cmp r0, #0
2826 ; CHECK-MVE-NEXT: cset r0, ne
2827 ; CHECK-MVE-NEXT: cmp r3, #0
2828 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2829 ; CHECK-MVE-NEXT: cmp r0, #0
2830 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2831 ; CHECK-MVE-NEXT: cmp r1, #0
2832 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2833 ; CHECK-MVE-NEXT: cmp r2, #0
2834 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2835 ; CHECK-MVE-NEXT: bx lr
2837 ; CHECK-MVEFP-LABEL: vcmp_r_ult_v4f32:
2838 ; CHECK-MVEFP: @ %bb.0: @ %entry
2839 ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q0, zr
2840 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2841 ; CHECK-MVEFP-NEXT: bx lr
2843 %c = fcmp ult <4 x float> zeroinitializer, %src
2844 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2848 define arm_aapcs_vfpcc <4 x float> @vcmp_r_ule_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2849 ; CHECK-MVE-LABEL: vcmp_r_ule_v4f32:
2850 ; CHECK-MVE: @ %bb.0: @ %entry
2851 ; CHECK-MVE-NEXT: vcmp.f32 s1, #0
2852 ; CHECK-MVE-NEXT: movs r1, #0
2853 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2854 ; CHECK-MVE-NEXT: it pl
2855 ; CHECK-MVE-NEXT: movpl r1, #1
2856 ; CHECK-MVE-NEXT: cmp r1, #0
2857 ; CHECK-MVE-NEXT: vcmp.f32 s0, #0
2858 ; CHECK-MVE-NEXT: cset r1, ne
2859 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2860 ; CHECK-MVE-NEXT: mov.w r2, #0
2861 ; CHECK-MVE-NEXT: vcmp.f32 s3, #0
2862 ; CHECK-MVE-NEXT: it pl
2863 ; CHECK-MVE-NEXT: movpl r2, #1
2864 ; CHECK-MVE-NEXT: cmp r2, #0
2865 ; CHECK-MVE-NEXT: cset r2, ne
2866 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2867 ; CHECK-MVE-NEXT: mov.w r3, #0
2868 ; CHECK-MVE-NEXT: vcmp.f32 s2, #0
2869 ; CHECK-MVE-NEXT: it pl
2870 ; CHECK-MVE-NEXT: movpl r3, #1
2871 ; CHECK-MVE-NEXT: cmp r3, #0
2872 ; CHECK-MVE-NEXT: cset r3, ne
2873 ; CHECK-MVE-NEXT: movs r0, #0
2874 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2875 ; CHECK-MVE-NEXT: it pl
2876 ; CHECK-MVE-NEXT: movpl r0, #1
2877 ; CHECK-MVE-NEXT: cmp r0, #0
2878 ; CHECK-MVE-NEXT: cset r0, ne
2879 ; CHECK-MVE-NEXT: cmp r3, #0
2880 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2881 ; CHECK-MVE-NEXT: cmp r0, #0
2882 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2883 ; CHECK-MVE-NEXT: cmp r1, #0
2884 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2885 ; CHECK-MVE-NEXT: cmp r2, #0
2886 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2887 ; CHECK-MVE-NEXT: bx lr
2889 ; CHECK-MVEFP-LABEL: vcmp_r_ule_v4f32:
2890 ; CHECK-MVEFP: @ %bb.0: @ %entry
2891 ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q0, zr
2892 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2893 ; CHECK-MVEFP-NEXT: bx lr
2895 %c = fcmp ule <4 x float> zeroinitializer, %src
2896 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2900 define arm_aapcs_vfpcc <4 x float> @vcmp_r_ord_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2901 ; CHECK-MVE-LABEL: vcmp_r_ord_v4f32:
2902 ; CHECK-MVE: @ %bb.0: @ %entry
2903 ; CHECK-MVE-NEXT: vcmp.f32 s1, s1
2904 ; CHECK-MVE-NEXT: movs r1, #0
2905 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2906 ; CHECK-MVE-NEXT: it vc
2907 ; CHECK-MVE-NEXT: movvc r1, #1
2908 ; CHECK-MVE-NEXT: cmp r1, #0
2909 ; CHECK-MVE-NEXT: vcmp.f32 s0, s0
2910 ; CHECK-MVE-NEXT: cset r1, ne
2911 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2912 ; CHECK-MVE-NEXT: mov.w r2, #0
2913 ; CHECK-MVE-NEXT: vcmp.f32 s3, s3
2914 ; CHECK-MVE-NEXT: it vc
2915 ; CHECK-MVE-NEXT: movvc r2, #1
2916 ; CHECK-MVE-NEXT: cmp r2, #0
2917 ; CHECK-MVE-NEXT: cset r2, ne
2918 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2919 ; CHECK-MVE-NEXT: mov.w r3, #0
2920 ; CHECK-MVE-NEXT: vcmp.f32 s2, s2
2921 ; CHECK-MVE-NEXT: it vc
2922 ; CHECK-MVE-NEXT: movvc r3, #1
2923 ; CHECK-MVE-NEXT: cmp r3, #0
2924 ; CHECK-MVE-NEXT: cset r3, ne
2925 ; CHECK-MVE-NEXT: movs r0, #0
2926 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2927 ; CHECK-MVE-NEXT: it vc
2928 ; CHECK-MVE-NEXT: movvc r0, #1
2929 ; CHECK-MVE-NEXT: cmp r0, #0
2930 ; CHECK-MVE-NEXT: cset r0, ne
2931 ; CHECK-MVE-NEXT: cmp r3, #0
2932 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2933 ; CHECK-MVE-NEXT: cmp r0, #0
2934 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2935 ; CHECK-MVE-NEXT: cmp r1, #0
2936 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2937 ; CHECK-MVE-NEXT: cmp r2, #0
2938 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2939 ; CHECK-MVE-NEXT: bx lr
2941 ; CHECK-MVEFP-LABEL: vcmp_r_ord_v4f32:
2942 ; CHECK-MVEFP: @ %bb.0: @ %entry
2943 ; CHECK-MVEFP-NEXT: vpt.f32 le, q0, zr
2944 ; CHECK-MVEFP-NEXT: vcmpt.f32 gt, q0, zr
2945 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q1
2946 ; CHECK-MVEFP-NEXT: bx lr
2948 %c = fcmp ord <4 x float> zeroinitializer, %src
2949 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
2953 define arm_aapcs_vfpcc <4 x float> @vcmp_r_uno_v4f32(<4 x float> %src, <4 x float> %a, <4 x float> %b) {
2954 ; CHECK-MVE-LABEL: vcmp_r_uno_v4f32:
2955 ; CHECK-MVE: @ %bb.0: @ %entry
2956 ; CHECK-MVE-NEXT: vcmp.f32 s1, s1
2957 ; CHECK-MVE-NEXT: movs r1, #0
2958 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2959 ; CHECK-MVE-NEXT: it vs
2960 ; CHECK-MVE-NEXT: movvs r1, #1
2961 ; CHECK-MVE-NEXT: cmp r1, #0
2962 ; CHECK-MVE-NEXT: vcmp.f32 s0, s0
2963 ; CHECK-MVE-NEXT: cset r1, ne
2964 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2965 ; CHECK-MVE-NEXT: mov.w r2, #0
2966 ; CHECK-MVE-NEXT: vcmp.f32 s3, s3
2967 ; CHECK-MVE-NEXT: it vs
2968 ; CHECK-MVE-NEXT: movvs r2, #1
2969 ; CHECK-MVE-NEXT: cmp r2, #0
2970 ; CHECK-MVE-NEXT: cset r2, ne
2971 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2972 ; CHECK-MVE-NEXT: mov.w r3, #0
2973 ; CHECK-MVE-NEXT: vcmp.f32 s2, s2
2974 ; CHECK-MVE-NEXT: it vs
2975 ; CHECK-MVE-NEXT: movvs r3, #1
2976 ; CHECK-MVE-NEXT: cmp r3, #0
2977 ; CHECK-MVE-NEXT: cset r3, ne
2978 ; CHECK-MVE-NEXT: movs r0, #0
2979 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2980 ; CHECK-MVE-NEXT: it vs
2981 ; CHECK-MVE-NEXT: movvs r0, #1
2982 ; CHECK-MVE-NEXT: cmp r0, #0
2983 ; CHECK-MVE-NEXT: cset r0, ne
2984 ; CHECK-MVE-NEXT: cmp r3, #0
2985 ; CHECK-MVE-NEXT: vseleq.f32 s3, s11, s7
2986 ; CHECK-MVE-NEXT: cmp r0, #0
2987 ; CHECK-MVE-NEXT: vseleq.f32 s2, s10, s6
2988 ; CHECK-MVE-NEXT: cmp r1, #0
2989 ; CHECK-MVE-NEXT: vseleq.f32 s1, s9, s5
2990 ; CHECK-MVE-NEXT: cmp r2, #0
2991 ; CHECK-MVE-NEXT: vseleq.f32 s0, s8, s4
2992 ; CHECK-MVE-NEXT: bx lr
2994 ; CHECK-MVEFP-LABEL: vcmp_r_uno_v4f32:
2995 ; CHECK-MVEFP: @ %bb.0: @ %entry
2996 ; CHECK-MVEFP-NEXT: vpt.f32 le, q0, zr
2997 ; CHECK-MVEFP-NEXT: vcmpt.f32 gt, q0, zr
2998 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2999 ; CHECK-MVEFP-NEXT: bx lr
3001 %c = fcmp uno <4 x float> zeroinitializer, %src
3002 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
3008 define arm_aapcs_vfpcc <8 x half> @vcmp_r_oeq_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
3009 ; CHECK-MVE-LABEL: vcmp_r_oeq_v8f16:
3010 ; CHECK-MVE: @ %bb.0: @ %entry
3011 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
3012 ; CHECK-MVE-NEXT: movs r1, #0
3013 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
3014 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
3015 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3016 ; CHECK-MVE-NEXT: it eq
3017 ; CHECK-MVE-NEXT: moveq r1, #1
3018 ; CHECK-MVE-NEXT: cmp r1, #0
3019 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
3020 ; CHECK-MVE-NEXT: cset r1, ne
3021 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
3022 ; CHECK-MVE-NEXT: cmp r1, #0
3023 ; CHECK-MVE-NEXT: mov.w r1, #0
3024 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
3025 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3026 ; CHECK-MVE-NEXT: it eq
3027 ; CHECK-MVE-NEXT: moveq r1, #1
3028 ; CHECK-MVE-NEXT: cmp r1, #0
3029 ; CHECK-MVE-NEXT: cset r1, ne
3030 ; CHECK-MVE-NEXT: movs r0, #0
3031 ; CHECK-MVE-NEXT: cmp r1, #0
3032 ; CHECK-MVE-NEXT: mov.w r1, #0
3033 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
3034 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
3035 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3036 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
3037 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3038 ; CHECK-MVE-NEXT: it eq
3039 ; CHECK-MVE-NEXT: moveq r1, #1
3040 ; CHECK-MVE-NEXT: cmp r1, #0
3041 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
3042 ; CHECK-MVE-NEXT: cset r1, ne
3043 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
3044 ; CHECK-MVE-NEXT: cmp r1, #0
3045 ; CHECK-MVE-NEXT: mov.w r1, #0
3046 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3047 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3048 ; CHECK-MVE-NEXT: it eq
3049 ; CHECK-MVE-NEXT: moveq r1, #1
3050 ; CHECK-MVE-NEXT: cmp r1, #0
3051 ; CHECK-MVE-NEXT: cset r1, ne
3052 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
3053 ; CHECK-MVE-NEXT: cmp r1, #0
3054 ; CHECK-MVE-NEXT: mov.w r1, #0
3055 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
3056 ; CHECK-MVE-NEXT: vins.f16 s0, s12
3057 ; CHECK-MVE-NEXT: vins.f16 s1, s4
3058 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
3059 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3060 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
3061 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3062 ; CHECK-MVE-NEXT: it eq
3063 ; CHECK-MVE-NEXT: moveq r1, #1
3064 ; CHECK-MVE-NEXT: cmp r1, #0
3065 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
3066 ; CHECK-MVE-NEXT: cset r1, ne
3067 ; CHECK-MVE-NEXT: cmp r1, #0
3068 ; CHECK-MVE-NEXT: mov.w r1, #0
3069 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3070 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3071 ; CHECK-MVE-NEXT: it eq
3072 ; CHECK-MVE-NEXT: moveq r1, #1
3073 ; CHECK-MVE-NEXT: cmp r1, #0
3074 ; CHECK-MVE-NEXT: cset r1, ne
3075 ; CHECK-MVE-NEXT: cmp r1, #0
3076 ; CHECK-MVE-NEXT: mov.w r1, #0
3077 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
3078 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
3079 ; CHECK-MVE-NEXT: vins.f16 s2, s4
3080 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
3081 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3082 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
3083 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3084 ; CHECK-MVE-NEXT: it eq
3085 ; CHECK-MVE-NEXT: moveq r1, #1
3086 ; CHECK-MVE-NEXT: cmp r1, #0
3087 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
3088 ; CHECK-MVE-NEXT: cset r1, ne
3089 ; CHECK-MVE-NEXT: cmp r1, #0
3090 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
3091 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3092 ; CHECK-MVE-NEXT: it eq
3093 ; CHECK-MVE-NEXT: moveq r0, #1
3094 ; CHECK-MVE-NEXT: cmp r0, #0
3095 ; CHECK-MVE-NEXT: cset r0, ne
3096 ; CHECK-MVE-NEXT: cmp r0, #0
3097 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
3098 ; CHECK-MVE-NEXT: vins.f16 s3, s4
3099 ; CHECK-MVE-NEXT: bx lr
3101 ; CHECK-MVEFP-LABEL: vcmp_r_oeq_v8f16:
3102 ; CHECK-MVEFP: @ %bb.0: @ %entry
3103 ; CHECK-MVEFP-NEXT: vcmp.f16 eq, q0, zr
3104 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
3105 ; CHECK-MVEFP-NEXT: bx lr
3107 %c = fcmp oeq <8 x half> zeroinitializer, %src
3108 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
3112 define arm_aapcs_vfpcc <8 x half> @vcmp_r_one_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
3113 ; CHECK-MVE-LABEL: vcmp_r_one_v8f16:
3114 ; CHECK-MVE: @ %bb.0: @ %entry
3115 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
3116 ; CHECK-MVE-NEXT: movs r1, #0
3117 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
3118 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
3119 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3120 ; CHECK-MVE-NEXT: it mi
3121 ; CHECK-MVE-NEXT: movmi r1, #1
3122 ; CHECK-MVE-NEXT: it gt
3123 ; CHECK-MVE-NEXT: movgt r1, #1
3124 ; CHECK-MVE-NEXT: cmp r1, #0
3125 ; CHECK-MVE-NEXT: cset r1, ne
3126 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
3127 ; CHECK-MVE-NEXT: cmp r1, #0
3128 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
3129 ; CHECK-MVE-NEXT: mov.w r1, #0
3130 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
3131 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3132 ; CHECK-MVE-NEXT: it mi
3133 ; CHECK-MVE-NEXT: movmi r1, #1
3134 ; CHECK-MVE-NEXT: it gt
3135 ; CHECK-MVE-NEXT: movgt r1, #1
3136 ; CHECK-MVE-NEXT: cmp r1, #0
3137 ; CHECK-MVE-NEXT: cset r1, ne
3138 ; CHECK-MVE-NEXT: movs r0, #0
3139 ; CHECK-MVE-NEXT: cmp r1, #0
3140 ; CHECK-MVE-NEXT: mov.w r1, #0
3141 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
3142 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
3143 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3144 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
3145 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3146 ; CHECK-MVE-NEXT: it mi
3147 ; CHECK-MVE-NEXT: movmi r1, #1
3148 ; CHECK-MVE-NEXT: it gt
3149 ; CHECK-MVE-NEXT: movgt r1, #1
3150 ; CHECK-MVE-NEXT: cmp r1, #0
3151 ; CHECK-MVE-NEXT: cset r1, ne
3152 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
3153 ; CHECK-MVE-NEXT: cmp r1, #0
3154 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
3155 ; CHECK-MVE-NEXT: mov.w r1, #0
3156 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3157 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3158 ; CHECK-MVE-NEXT: it mi
3159 ; CHECK-MVE-NEXT: movmi r1, #1
3160 ; CHECK-MVE-NEXT: it gt
3161 ; CHECK-MVE-NEXT: movgt r1, #1
3162 ; CHECK-MVE-NEXT: cmp r1, #0
3163 ; CHECK-MVE-NEXT: cset r1, ne
3164 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
3165 ; CHECK-MVE-NEXT: cmp r1, #0
3166 ; CHECK-MVE-NEXT: mov.w r1, #0
3167 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
3168 ; CHECK-MVE-NEXT: vins.f16 s0, s12
3169 ; CHECK-MVE-NEXT: vins.f16 s1, s4
3170 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
3171 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3172 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
3173 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3174 ; CHECK-MVE-NEXT: it mi
3175 ; CHECK-MVE-NEXT: movmi r1, #1
3176 ; CHECK-MVE-NEXT: it gt
3177 ; CHECK-MVE-NEXT: movgt r1, #1
3178 ; CHECK-MVE-NEXT: cmp r1, #0
3179 ; CHECK-MVE-NEXT: cset r1, ne
3180 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
3181 ; CHECK-MVE-NEXT: cmp r1, #0
3182 ; CHECK-MVE-NEXT: mov.w r1, #0
3183 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3184 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3185 ; CHECK-MVE-NEXT: it mi
3186 ; CHECK-MVE-NEXT: movmi r1, #1
3187 ; CHECK-MVE-NEXT: it gt
3188 ; CHECK-MVE-NEXT: movgt r1, #1
3189 ; CHECK-MVE-NEXT: cmp r1, #0
3190 ; CHECK-MVE-NEXT: cset r1, ne
3191 ; CHECK-MVE-NEXT: cmp r1, #0
3192 ; CHECK-MVE-NEXT: mov.w r1, #0
3193 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
3194 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
3195 ; CHECK-MVE-NEXT: vins.f16 s2, s4
3196 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
3197 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3198 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
3199 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3200 ; CHECK-MVE-NEXT: it mi
3201 ; CHECK-MVE-NEXT: movmi r1, #1
3202 ; CHECK-MVE-NEXT: it gt
3203 ; CHECK-MVE-NEXT: movgt r1, #1
3204 ; CHECK-MVE-NEXT: cmp r1, #0
3205 ; CHECK-MVE-NEXT: cset r1, ne
3206 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
3207 ; CHECK-MVE-NEXT: cmp r1, #0
3208 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
3209 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3210 ; CHECK-MVE-NEXT: it mi
3211 ; CHECK-MVE-NEXT: movmi r0, #1
3212 ; CHECK-MVE-NEXT: it gt
3213 ; CHECK-MVE-NEXT: movgt r0, #1
3214 ; CHECK-MVE-NEXT: cmp r0, #0
3215 ; CHECK-MVE-NEXT: cset r0, ne
3216 ; CHECK-MVE-NEXT: cmp r0, #0
3217 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
3218 ; CHECK-MVE-NEXT: vins.f16 s3, s4
3219 ; CHECK-MVE-NEXT: bx lr
3221 ; CHECK-MVEFP-LABEL: vcmp_r_one_v8f16:
3222 ; CHECK-MVEFP: @ %bb.0: @ %entry
3223 ; CHECK-MVEFP-NEXT: vpt.f16 le, q0, zr
3224 ; CHECK-MVEFP-NEXT: vcmpt.f16 ge, q0, zr
3225 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q1
3226 ; CHECK-MVEFP-NEXT: bx lr
3228 %c = fcmp one <8 x half> zeroinitializer, %src
3229 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
3233 define arm_aapcs_vfpcc <8 x half> @vcmp_r_ogt_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
3234 ; CHECK-MVE-LABEL: vcmp_r_ogt_v8f16:
3235 ; CHECK-MVE: @ %bb.0: @ %entry
3236 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
3237 ; CHECK-MVE-NEXT: movs r1, #0
3238 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
3239 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
3240 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3241 ; CHECK-MVE-NEXT: it mi
3242 ; CHECK-MVE-NEXT: movmi r1, #1
3243 ; CHECK-MVE-NEXT: cmp r1, #0
3244 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
3245 ; CHECK-MVE-NEXT: cset r1, ne
3246 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
3247 ; CHECK-MVE-NEXT: cmp r1, #0
3248 ; CHECK-MVE-NEXT: mov.w r1, #0
3249 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
3250 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3251 ; CHECK-MVE-NEXT: it mi
3252 ; CHECK-MVE-NEXT: movmi r1, #1
3253 ; CHECK-MVE-NEXT: cmp r1, #0
3254 ; CHECK-MVE-NEXT: cset r1, ne
3255 ; CHECK-MVE-NEXT: movs r0, #0
3256 ; CHECK-MVE-NEXT: cmp r1, #0
3257 ; CHECK-MVE-NEXT: mov.w r1, #0
3258 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
3259 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
3260 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3261 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
3262 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3263 ; CHECK-MVE-NEXT: it mi
3264 ; CHECK-MVE-NEXT: movmi r1, #1
3265 ; CHECK-MVE-NEXT: cmp r1, #0
3266 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
3267 ; CHECK-MVE-NEXT: cset r1, ne
3268 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
3269 ; CHECK-MVE-NEXT: cmp r1, #0
3270 ; CHECK-MVE-NEXT: mov.w r1, #0
3271 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3272 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3273 ; CHECK-MVE-NEXT: it mi
3274 ; CHECK-MVE-NEXT: movmi r1, #1
3275 ; CHECK-MVE-NEXT: cmp r1, #0
3276 ; CHECK-MVE-NEXT: cset r1, ne
3277 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
3278 ; CHECK-MVE-NEXT: cmp r1, #0
3279 ; CHECK-MVE-NEXT: mov.w r1, #0
3280 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
3281 ; CHECK-MVE-NEXT: vins.f16 s0, s12
3282 ; CHECK-MVE-NEXT: vins.f16 s1, s4
3283 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
3284 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3285 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
3286 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3287 ; CHECK-MVE-NEXT: it mi
3288 ; CHECK-MVE-NEXT: movmi r1, #1
3289 ; CHECK-MVE-NEXT: cmp r1, #0
3290 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
3291 ; CHECK-MVE-NEXT: cset r1, ne
3292 ; CHECK-MVE-NEXT: cmp r1, #0
3293 ; CHECK-MVE-NEXT: mov.w r1, #0
3294 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3295 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3296 ; CHECK-MVE-NEXT: it mi
3297 ; CHECK-MVE-NEXT: movmi r1, #1
3298 ; CHECK-MVE-NEXT: cmp r1, #0
3299 ; CHECK-MVE-NEXT: cset r1, ne
3300 ; CHECK-MVE-NEXT: cmp r1, #0
3301 ; CHECK-MVE-NEXT: mov.w r1, #0
3302 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
3303 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
3304 ; CHECK-MVE-NEXT: vins.f16 s2, s4
3305 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
3306 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3307 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
3308 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3309 ; CHECK-MVE-NEXT: it mi
3310 ; CHECK-MVE-NEXT: movmi r1, #1
3311 ; CHECK-MVE-NEXT: cmp r1, #0
3312 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
3313 ; CHECK-MVE-NEXT: cset r1, ne
3314 ; CHECK-MVE-NEXT: cmp r1, #0
3315 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
3316 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3317 ; CHECK-MVE-NEXT: it mi
3318 ; CHECK-MVE-NEXT: movmi r0, #1
3319 ; CHECK-MVE-NEXT: cmp r0, #0
3320 ; CHECK-MVE-NEXT: cset r0, ne
3321 ; CHECK-MVE-NEXT: cmp r0, #0
3322 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
3323 ; CHECK-MVE-NEXT: vins.f16 s3, s4
3324 ; CHECK-MVE-NEXT: bx lr
3326 ; CHECK-MVEFP-LABEL: vcmp_r_ogt_v8f16:
3327 ; CHECK-MVEFP: @ %bb.0: @ %entry
3328 ; CHECK-MVEFP-NEXT: vcmp.f16 lt, q0, zr
3329 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
3330 ; CHECK-MVEFP-NEXT: bx lr
3332 %c = fcmp ogt <8 x half> zeroinitializer, %src
3333 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
3337 define arm_aapcs_vfpcc <8 x half> @vcmp_r_oge_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
3338 ; CHECK-MVE-LABEL: vcmp_r_oge_v8f16:
3339 ; CHECK-MVE: @ %bb.0: @ %entry
3340 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
3341 ; CHECK-MVE-NEXT: movs r1, #0
3342 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
3343 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
3344 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3345 ; CHECK-MVE-NEXT: it ls
3346 ; CHECK-MVE-NEXT: movls r1, #1
3347 ; CHECK-MVE-NEXT: cmp r1, #0
3348 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
3349 ; CHECK-MVE-NEXT: cset r1, ne
3350 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
3351 ; CHECK-MVE-NEXT: cmp r1, #0
3352 ; CHECK-MVE-NEXT: mov.w r1, #0
3353 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
3354 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3355 ; CHECK-MVE-NEXT: it ls
3356 ; CHECK-MVE-NEXT: movls r1, #1
3357 ; CHECK-MVE-NEXT: cmp r1, #0
3358 ; CHECK-MVE-NEXT: cset r1, ne
3359 ; CHECK-MVE-NEXT: movs r0, #0
3360 ; CHECK-MVE-NEXT: cmp r1, #0
3361 ; CHECK-MVE-NEXT: mov.w r1, #0
3362 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
3363 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
3364 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3365 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
3366 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3367 ; CHECK-MVE-NEXT: it ls
3368 ; CHECK-MVE-NEXT: movls r1, #1
3369 ; CHECK-MVE-NEXT: cmp r1, #0
3370 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
3371 ; CHECK-MVE-NEXT: cset r1, ne
3372 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
3373 ; CHECK-MVE-NEXT: cmp r1, #0
3374 ; CHECK-MVE-NEXT: mov.w r1, #0
3375 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3376 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3377 ; CHECK-MVE-NEXT: it ls
3378 ; CHECK-MVE-NEXT: movls r1, #1
3379 ; CHECK-MVE-NEXT: cmp r1, #0
3380 ; CHECK-MVE-NEXT: cset r1, ne
3381 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
3382 ; CHECK-MVE-NEXT: cmp r1, #0
3383 ; CHECK-MVE-NEXT: mov.w r1, #0
3384 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
3385 ; CHECK-MVE-NEXT: vins.f16 s0, s12
3386 ; CHECK-MVE-NEXT: vins.f16 s1, s4
3387 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
3388 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3389 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
3390 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3391 ; CHECK-MVE-NEXT: it ls
3392 ; CHECK-MVE-NEXT: movls r1, #1
3393 ; CHECK-MVE-NEXT: cmp r1, #0
3394 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
3395 ; CHECK-MVE-NEXT: cset r1, ne
3396 ; CHECK-MVE-NEXT: cmp r1, #0
3397 ; CHECK-MVE-NEXT: mov.w r1, #0
3398 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3399 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3400 ; CHECK-MVE-NEXT: it ls
3401 ; CHECK-MVE-NEXT: movls r1, #1
3402 ; CHECK-MVE-NEXT: cmp r1, #0
3403 ; CHECK-MVE-NEXT: cset r1, ne
3404 ; CHECK-MVE-NEXT: cmp r1, #0
3405 ; CHECK-MVE-NEXT: mov.w r1, #0
3406 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
3407 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
3408 ; CHECK-MVE-NEXT: vins.f16 s2, s4
3409 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
3410 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3411 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
3412 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3413 ; CHECK-MVE-NEXT: it ls
3414 ; CHECK-MVE-NEXT: movls r1, #1
3415 ; CHECK-MVE-NEXT: cmp r1, #0
3416 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
3417 ; CHECK-MVE-NEXT: cset r1, ne
3418 ; CHECK-MVE-NEXT: cmp r1, #0
3419 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
3420 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3421 ; CHECK-MVE-NEXT: it ls
3422 ; CHECK-MVE-NEXT: movls r0, #1
3423 ; CHECK-MVE-NEXT: cmp r0, #0
3424 ; CHECK-MVE-NEXT: cset r0, ne
3425 ; CHECK-MVE-NEXT: cmp r0, #0
3426 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
3427 ; CHECK-MVE-NEXT: vins.f16 s3, s4
3428 ; CHECK-MVE-NEXT: bx lr
3430 ; CHECK-MVEFP-LABEL: vcmp_r_oge_v8f16:
3431 ; CHECK-MVEFP: @ %bb.0: @ %entry
3432 ; CHECK-MVEFP-NEXT: vcmp.f16 le, q0, zr
3433 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
3434 ; CHECK-MVEFP-NEXT: bx lr
3436 %c = fcmp oge <8 x half> zeroinitializer, %src
3437 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
3441 define arm_aapcs_vfpcc <8 x half> @vcmp_r_olt_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
3442 ; CHECK-MVE-LABEL: vcmp_r_olt_v8f16:
3443 ; CHECK-MVE: @ %bb.0: @ %entry
3444 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
3445 ; CHECK-MVE-NEXT: movs r1, #0
3446 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
3447 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
3448 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3449 ; CHECK-MVE-NEXT: it gt
3450 ; CHECK-MVE-NEXT: movgt r1, #1
3451 ; CHECK-MVE-NEXT: cmp r1, #0
3452 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
3453 ; CHECK-MVE-NEXT: cset r1, ne
3454 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
3455 ; CHECK-MVE-NEXT: cmp r1, #0
3456 ; CHECK-MVE-NEXT: mov.w r1, #0
3457 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
3458 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3459 ; CHECK-MVE-NEXT: it gt
3460 ; CHECK-MVE-NEXT: movgt r1, #1
3461 ; CHECK-MVE-NEXT: cmp r1, #0
3462 ; CHECK-MVE-NEXT: cset r1, ne
3463 ; CHECK-MVE-NEXT: movs r0, #0
3464 ; CHECK-MVE-NEXT: cmp r1, #0
3465 ; CHECK-MVE-NEXT: mov.w r1, #0
3466 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
3467 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
3468 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3469 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
3470 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3471 ; CHECK-MVE-NEXT: it gt
3472 ; CHECK-MVE-NEXT: movgt r1, #1
3473 ; CHECK-MVE-NEXT: cmp r1, #0
3474 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
3475 ; CHECK-MVE-NEXT: cset r1, ne
3476 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
3477 ; CHECK-MVE-NEXT: cmp r1, #0
3478 ; CHECK-MVE-NEXT: mov.w r1, #0
3479 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3480 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3481 ; CHECK-MVE-NEXT: it gt
3482 ; CHECK-MVE-NEXT: movgt r1, #1
3483 ; CHECK-MVE-NEXT: cmp r1, #0
3484 ; CHECK-MVE-NEXT: cset r1, ne
3485 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
3486 ; CHECK-MVE-NEXT: cmp r1, #0
3487 ; CHECK-MVE-NEXT: mov.w r1, #0
3488 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
3489 ; CHECK-MVE-NEXT: vins.f16 s0, s12
3490 ; CHECK-MVE-NEXT: vins.f16 s1, s4
3491 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
3492 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3493 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
3494 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3495 ; CHECK-MVE-NEXT: it gt
3496 ; CHECK-MVE-NEXT: movgt r1, #1
3497 ; CHECK-MVE-NEXT: cmp r1, #0
3498 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
3499 ; CHECK-MVE-NEXT: cset r1, ne
3500 ; CHECK-MVE-NEXT: cmp r1, #0
3501 ; CHECK-MVE-NEXT: mov.w r1, #0
3502 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3503 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3504 ; CHECK-MVE-NEXT: it gt
3505 ; CHECK-MVE-NEXT: movgt r1, #1
3506 ; CHECK-MVE-NEXT: cmp r1, #0
3507 ; CHECK-MVE-NEXT: cset r1, ne
3508 ; CHECK-MVE-NEXT: cmp r1, #0
3509 ; CHECK-MVE-NEXT: mov.w r1, #0
3510 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
3511 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
3512 ; CHECK-MVE-NEXT: vins.f16 s2, s4
3513 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
3514 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3515 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
3516 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3517 ; CHECK-MVE-NEXT: it gt
3518 ; CHECK-MVE-NEXT: movgt r1, #1
3519 ; CHECK-MVE-NEXT: cmp r1, #0
3520 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
3521 ; CHECK-MVE-NEXT: cset r1, ne
3522 ; CHECK-MVE-NEXT: cmp r1, #0
3523 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
3524 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3525 ; CHECK-MVE-NEXT: it gt
3526 ; CHECK-MVE-NEXT: movgt r0, #1
3527 ; CHECK-MVE-NEXT: cmp r0, #0
3528 ; CHECK-MVE-NEXT: cset r0, ne
3529 ; CHECK-MVE-NEXT: cmp r0, #0
3530 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
3531 ; CHECK-MVE-NEXT: vins.f16 s3, s4
3532 ; CHECK-MVE-NEXT: bx lr
3534 ; CHECK-MVEFP-LABEL: vcmp_r_olt_v8f16:
3535 ; CHECK-MVEFP: @ %bb.0: @ %entry
3536 ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q0, zr
3537 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
3538 ; CHECK-MVEFP-NEXT: bx lr
3540 %c = fcmp olt <8 x half> zeroinitializer, %src
3541 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
3545 define arm_aapcs_vfpcc <8 x half> @vcmp_r_ole_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
3546 ; CHECK-MVE-LABEL: vcmp_r_ole_v8f16:
3547 ; CHECK-MVE: @ %bb.0: @ %entry
3548 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
3549 ; CHECK-MVE-NEXT: movs r1, #0
3550 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
3551 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
3552 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3553 ; CHECK-MVE-NEXT: it ge
3554 ; CHECK-MVE-NEXT: movge r1, #1
3555 ; CHECK-MVE-NEXT: cmp r1, #0
3556 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
3557 ; CHECK-MVE-NEXT: cset r1, ne
3558 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
3559 ; CHECK-MVE-NEXT: cmp r1, #0
3560 ; CHECK-MVE-NEXT: mov.w r1, #0
3561 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
3562 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3563 ; CHECK-MVE-NEXT: it ge
3564 ; CHECK-MVE-NEXT: movge r1, #1
3565 ; CHECK-MVE-NEXT: cmp r1, #0
3566 ; CHECK-MVE-NEXT: cset r1, ne
3567 ; CHECK-MVE-NEXT: movs r0, #0
3568 ; CHECK-MVE-NEXT: cmp r1, #0
3569 ; CHECK-MVE-NEXT: mov.w r1, #0
3570 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
3571 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
3572 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3573 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
3574 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3575 ; CHECK-MVE-NEXT: it ge
3576 ; CHECK-MVE-NEXT: movge r1, #1
3577 ; CHECK-MVE-NEXT: cmp r1, #0
3578 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
3579 ; CHECK-MVE-NEXT: cset r1, ne
3580 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
3581 ; CHECK-MVE-NEXT: cmp r1, #0
3582 ; CHECK-MVE-NEXT: mov.w r1, #0
3583 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3584 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3585 ; CHECK-MVE-NEXT: it ge
3586 ; CHECK-MVE-NEXT: movge r1, #1
3587 ; CHECK-MVE-NEXT: cmp r1, #0
3588 ; CHECK-MVE-NEXT: cset r1, ne
3589 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
3590 ; CHECK-MVE-NEXT: cmp r1, #0
3591 ; CHECK-MVE-NEXT: mov.w r1, #0
3592 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
3593 ; CHECK-MVE-NEXT: vins.f16 s0, s12
3594 ; CHECK-MVE-NEXT: vins.f16 s1, s4
3595 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
3596 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3597 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
3598 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3599 ; CHECK-MVE-NEXT: it ge
3600 ; CHECK-MVE-NEXT: movge r1, #1
3601 ; CHECK-MVE-NEXT: cmp r1, #0
3602 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
3603 ; CHECK-MVE-NEXT: cset r1, ne
3604 ; CHECK-MVE-NEXT: cmp r1, #0
3605 ; CHECK-MVE-NEXT: mov.w r1, #0
3606 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3607 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3608 ; CHECK-MVE-NEXT: it ge
3609 ; CHECK-MVE-NEXT: movge r1, #1
3610 ; CHECK-MVE-NEXT: cmp r1, #0
3611 ; CHECK-MVE-NEXT: cset r1, ne
3612 ; CHECK-MVE-NEXT: cmp r1, #0
3613 ; CHECK-MVE-NEXT: mov.w r1, #0
3614 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
3615 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
3616 ; CHECK-MVE-NEXT: vins.f16 s2, s4
3617 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
3618 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3619 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
3620 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3621 ; CHECK-MVE-NEXT: it ge
3622 ; CHECK-MVE-NEXT: movge r1, #1
3623 ; CHECK-MVE-NEXT: cmp r1, #0
3624 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
3625 ; CHECK-MVE-NEXT: cset r1, ne
3626 ; CHECK-MVE-NEXT: cmp r1, #0
3627 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
3628 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3629 ; CHECK-MVE-NEXT: it ge
3630 ; CHECK-MVE-NEXT: movge r0, #1
3631 ; CHECK-MVE-NEXT: cmp r0, #0
3632 ; CHECK-MVE-NEXT: cset r0, ne
3633 ; CHECK-MVE-NEXT: cmp r0, #0
3634 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
3635 ; CHECK-MVE-NEXT: vins.f16 s3, s4
3636 ; CHECK-MVE-NEXT: bx lr
3638 ; CHECK-MVEFP-LABEL: vcmp_r_ole_v8f16:
3639 ; CHECK-MVEFP: @ %bb.0: @ %entry
3640 ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q0, zr
3641 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
3642 ; CHECK-MVEFP-NEXT: bx lr
3644 %c = fcmp ole <8 x half> zeroinitializer, %src
3645 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
3649 define arm_aapcs_vfpcc <8 x half> @vcmp_r_ueq_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
3650 ; CHECK-MVE-LABEL: vcmp_r_ueq_v8f16:
3651 ; CHECK-MVE: @ %bb.0: @ %entry
3652 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
3653 ; CHECK-MVE-NEXT: movs r1, #0
3654 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
3655 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
3656 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3657 ; CHECK-MVE-NEXT: it eq
3658 ; CHECK-MVE-NEXT: moveq r1, #1
3659 ; CHECK-MVE-NEXT: it vs
3660 ; CHECK-MVE-NEXT: movvs r1, #1
3661 ; CHECK-MVE-NEXT: cmp r1, #0
3662 ; CHECK-MVE-NEXT: cset r1, ne
3663 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
3664 ; CHECK-MVE-NEXT: cmp r1, #0
3665 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
3666 ; CHECK-MVE-NEXT: mov.w r1, #0
3667 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
3668 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3669 ; CHECK-MVE-NEXT: it eq
3670 ; CHECK-MVE-NEXT: moveq r1, #1
3671 ; CHECK-MVE-NEXT: it vs
3672 ; CHECK-MVE-NEXT: movvs r1, #1
3673 ; CHECK-MVE-NEXT: cmp r1, #0
3674 ; CHECK-MVE-NEXT: cset r1, ne
3675 ; CHECK-MVE-NEXT: movs r0, #0
3676 ; CHECK-MVE-NEXT: cmp r1, #0
3677 ; CHECK-MVE-NEXT: mov.w r1, #0
3678 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
3679 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
3680 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3681 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
3682 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3683 ; CHECK-MVE-NEXT: it eq
3684 ; CHECK-MVE-NEXT: moveq r1, #1
3685 ; CHECK-MVE-NEXT: it vs
3686 ; CHECK-MVE-NEXT: movvs r1, #1
3687 ; CHECK-MVE-NEXT: cmp r1, #0
3688 ; CHECK-MVE-NEXT: cset r1, ne
3689 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
3690 ; CHECK-MVE-NEXT: cmp r1, #0
3691 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
3692 ; CHECK-MVE-NEXT: mov.w r1, #0
3693 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3694 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3695 ; CHECK-MVE-NEXT: it eq
3696 ; CHECK-MVE-NEXT: moveq r1, #1
3697 ; CHECK-MVE-NEXT: it vs
3698 ; CHECK-MVE-NEXT: movvs r1, #1
3699 ; CHECK-MVE-NEXT: cmp r1, #0
3700 ; CHECK-MVE-NEXT: cset r1, ne
3701 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
3702 ; CHECK-MVE-NEXT: cmp r1, #0
3703 ; CHECK-MVE-NEXT: mov.w r1, #0
3704 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
3705 ; CHECK-MVE-NEXT: vins.f16 s0, s12
3706 ; CHECK-MVE-NEXT: vins.f16 s1, s4
3707 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
3708 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3709 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
3710 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3711 ; CHECK-MVE-NEXT: it eq
3712 ; CHECK-MVE-NEXT: moveq r1, #1
3713 ; CHECK-MVE-NEXT: it vs
3714 ; CHECK-MVE-NEXT: movvs r1, #1
3715 ; CHECK-MVE-NEXT: cmp r1, #0
3716 ; CHECK-MVE-NEXT: cset r1, ne
3717 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
3718 ; CHECK-MVE-NEXT: cmp r1, #0
3719 ; CHECK-MVE-NEXT: mov.w r1, #0
3720 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3721 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3722 ; CHECK-MVE-NEXT: it eq
3723 ; CHECK-MVE-NEXT: moveq r1, #1
3724 ; CHECK-MVE-NEXT: it vs
3725 ; CHECK-MVE-NEXT: movvs r1, #1
3726 ; CHECK-MVE-NEXT: cmp r1, #0
3727 ; CHECK-MVE-NEXT: cset r1, ne
3728 ; CHECK-MVE-NEXT: cmp r1, #0
3729 ; CHECK-MVE-NEXT: mov.w r1, #0
3730 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
3731 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
3732 ; CHECK-MVE-NEXT: vins.f16 s2, s4
3733 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
3734 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3735 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
3736 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3737 ; CHECK-MVE-NEXT: it eq
3738 ; CHECK-MVE-NEXT: moveq r1, #1
3739 ; CHECK-MVE-NEXT: it vs
3740 ; CHECK-MVE-NEXT: movvs r1, #1
3741 ; CHECK-MVE-NEXT: cmp r1, #0
3742 ; CHECK-MVE-NEXT: cset r1, ne
3743 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
3744 ; CHECK-MVE-NEXT: cmp r1, #0
3745 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
3746 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3747 ; CHECK-MVE-NEXT: it eq
3748 ; CHECK-MVE-NEXT: moveq r0, #1
3749 ; CHECK-MVE-NEXT: it vs
3750 ; CHECK-MVE-NEXT: movvs r0, #1
3751 ; CHECK-MVE-NEXT: cmp r0, #0
3752 ; CHECK-MVE-NEXT: cset r0, ne
3753 ; CHECK-MVE-NEXT: cmp r0, #0
3754 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
3755 ; CHECK-MVE-NEXT: vins.f16 s3, s4
3756 ; CHECK-MVE-NEXT: bx lr
3758 ; CHECK-MVEFP-LABEL: vcmp_r_ueq_v8f16:
3759 ; CHECK-MVEFP: @ %bb.0: @ %entry
3760 ; CHECK-MVEFP-NEXT: vpt.f16 le, q0, zr
3761 ; CHECK-MVEFP-NEXT: vcmpt.f16 ge, q0, zr
3762 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
3763 ; CHECK-MVEFP-NEXT: bx lr
3765 %c = fcmp ueq <8 x half> zeroinitializer, %src
3766 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
3770 define arm_aapcs_vfpcc <8 x half> @vcmp_r_une_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
3771 ; CHECK-MVE-LABEL: vcmp_r_une_v8f16:
3772 ; CHECK-MVE: @ %bb.0: @ %entry
3773 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
3774 ; CHECK-MVE-NEXT: movs r1, #0
3775 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
3776 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
3777 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3778 ; CHECK-MVE-NEXT: it ne
3779 ; CHECK-MVE-NEXT: movne r1, #1
3780 ; CHECK-MVE-NEXT: cmp r1, #0
3781 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
3782 ; CHECK-MVE-NEXT: cset r1, ne
3783 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
3784 ; CHECK-MVE-NEXT: cmp r1, #0
3785 ; CHECK-MVE-NEXT: mov.w r1, #0
3786 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
3787 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3788 ; CHECK-MVE-NEXT: it ne
3789 ; CHECK-MVE-NEXT: movne r1, #1
3790 ; CHECK-MVE-NEXT: cmp r1, #0
3791 ; CHECK-MVE-NEXT: cset r1, ne
3792 ; CHECK-MVE-NEXT: movs r0, #0
3793 ; CHECK-MVE-NEXT: cmp r1, #0
3794 ; CHECK-MVE-NEXT: mov.w r1, #0
3795 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
3796 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
3797 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3798 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
3799 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3800 ; CHECK-MVE-NEXT: it ne
3801 ; CHECK-MVE-NEXT: movne r1, #1
3802 ; CHECK-MVE-NEXT: cmp r1, #0
3803 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
3804 ; CHECK-MVE-NEXT: cset r1, ne
3805 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
3806 ; CHECK-MVE-NEXT: cmp r1, #0
3807 ; CHECK-MVE-NEXT: mov.w r1, #0
3808 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3809 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3810 ; CHECK-MVE-NEXT: it ne
3811 ; CHECK-MVE-NEXT: movne r1, #1
3812 ; CHECK-MVE-NEXT: cmp r1, #0
3813 ; CHECK-MVE-NEXT: cset r1, ne
3814 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
3815 ; CHECK-MVE-NEXT: cmp r1, #0
3816 ; CHECK-MVE-NEXT: mov.w r1, #0
3817 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
3818 ; CHECK-MVE-NEXT: vins.f16 s0, s12
3819 ; CHECK-MVE-NEXT: vins.f16 s1, s4
3820 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
3821 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3822 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
3823 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3824 ; CHECK-MVE-NEXT: it ne
3825 ; CHECK-MVE-NEXT: movne r1, #1
3826 ; CHECK-MVE-NEXT: cmp r1, #0
3827 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
3828 ; CHECK-MVE-NEXT: cset r1, ne
3829 ; CHECK-MVE-NEXT: cmp r1, #0
3830 ; CHECK-MVE-NEXT: mov.w r1, #0
3831 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3832 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3833 ; CHECK-MVE-NEXT: it ne
3834 ; CHECK-MVE-NEXT: movne r1, #1
3835 ; CHECK-MVE-NEXT: cmp r1, #0
3836 ; CHECK-MVE-NEXT: cset r1, ne
3837 ; CHECK-MVE-NEXT: cmp r1, #0
3838 ; CHECK-MVE-NEXT: mov.w r1, #0
3839 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
3840 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
3841 ; CHECK-MVE-NEXT: vins.f16 s2, s4
3842 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
3843 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3844 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
3845 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3846 ; CHECK-MVE-NEXT: it ne
3847 ; CHECK-MVE-NEXT: movne r1, #1
3848 ; CHECK-MVE-NEXT: cmp r1, #0
3849 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
3850 ; CHECK-MVE-NEXT: cset r1, ne
3851 ; CHECK-MVE-NEXT: cmp r1, #0
3852 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
3853 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3854 ; CHECK-MVE-NEXT: it ne
3855 ; CHECK-MVE-NEXT: movne r0, #1
3856 ; CHECK-MVE-NEXT: cmp r0, #0
3857 ; CHECK-MVE-NEXT: cset r0, ne
3858 ; CHECK-MVE-NEXT: cmp r0, #0
3859 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
3860 ; CHECK-MVE-NEXT: vins.f16 s3, s4
3861 ; CHECK-MVE-NEXT: bx lr
3863 ; CHECK-MVEFP-LABEL: vcmp_r_une_v8f16:
3864 ; CHECK-MVEFP: @ %bb.0: @ %entry
3865 ; CHECK-MVEFP-NEXT: vcmp.f16 ne, q0, zr
3866 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
3867 ; CHECK-MVEFP-NEXT: bx lr
3869 %c = fcmp une <8 x half> zeroinitializer, %src
3870 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
3874 define arm_aapcs_vfpcc <8 x half> @vcmp_r_ugt_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
3875 ; CHECK-MVE-LABEL: vcmp_r_ugt_v8f16:
3876 ; CHECK-MVE: @ %bb.0: @ %entry
3877 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
3878 ; CHECK-MVE-NEXT: movs r1, #0
3879 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
3880 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
3881 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3882 ; CHECK-MVE-NEXT: it lt
3883 ; CHECK-MVE-NEXT: movlt r1, #1
3884 ; CHECK-MVE-NEXT: cmp r1, #0
3885 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
3886 ; CHECK-MVE-NEXT: cset r1, ne
3887 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
3888 ; CHECK-MVE-NEXT: cmp r1, #0
3889 ; CHECK-MVE-NEXT: mov.w r1, #0
3890 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
3891 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3892 ; CHECK-MVE-NEXT: it lt
3893 ; CHECK-MVE-NEXT: movlt r1, #1
3894 ; CHECK-MVE-NEXT: cmp r1, #0
3895 ; CHECK-MVE-NEXT: cset r1, ne
3896 ; CHECK-MVE-NEXT: movs r0, #0
3897 ; CHECK-MVE-NEXT: cmp r1, #0
3898 ; CHECK-MVE-NEXT: mov.w r1, #0
3899 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
3900 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
3901 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3902 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
3903 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3904 ; CHECK-MVE-NEXT: it lt
3905 ; CHECK-MVE-NEXT: movlt r1, #1
3906 ; CHECK-MVE-NEXT: cmp r1, #0
3907 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
3908 ; CHECK-MVE-NEXT: cset r1, ne
3909 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
3910 ; CHECK-MVE-NEXT: cmp r1, #0
3911 ; CHECK-MVE-NEXT: mov.w r1, #0
3912 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3913 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3914 ; CHECK-MVE-NEXT: it lt
3915 ; CHECK-MVE-NEXT: movlt r1, #1
3916 ; CHECK-MVE-NEXT: cmp r1, #0
3917 ; CHECK-MVE-NEXT: cset r1, ne
3918 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
3919 ; CHECK-MVE-NEXT: cmp r1, #0
3920 ; CHECK-MVE-NEXT: mov.w r1, #0
3921 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
3922 ; CHECK-MVE-NEXT: vins.f16 s0, s12
3923 ; CHECK-MVE-NEXT: vins.f16 s1, s4
3924 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
3925 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3926 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
3927 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3928 ; CHECK-MVE-NEXT: it lt
3929 ; CHECK-MVE-NEXT: movlt r1, #1
3930 ; CHECK-MVE-NEXT: cmp r1, #0
3931 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
3932 ; CHECK-MVE-NEXT: cset r1, ne
3933 ; CHECK-MVE-NEXT: cmp r1, #0
3934 ; CHECK-MVE-NEXT: mov.w r1, #0
3935 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
3936 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3937 ; CHECK-MVE-NEXT: it lt
3938 ; CHECK-MVE-NEXT: movlt r1, #1
3939 ; CHECK-MVE-NEXT: cmp r1, #0
3940 ; CHECK-MVE-NEXT: cset r1, ne
3941 ; CHECK-MVE-NEXT: cmp r1, #0
3942 ; CHECK-MVE-NEXT: mov.w r1, #0
3943 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
3944 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
3945 ; CHECK-MVE-NEXT: vins.f16 s2, s4
3946 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
3947 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
3948 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
3949 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3950 ; CHECK-MVE-NEXT: it lt
3951 ; CHECK-MVE-NEXT: movlt r1, #1
3952 ; CHECK-MVE-NEXT: cmp r1, #0
3953 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
3954 ; CHECK-MVE-NEXT: cset r1, ne
3955 ; CHECK-MVE-NEXT: cmp r1, #0
3956 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
3957 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3958 ; CHECK-MVE-NEXT: it lt
3959 ; CHECK-MVE-NEXT: movlt r0, #1
3960 ; CHECK-MVE-NEXT: cmp r0, #0
3961 ; CHECK-MVE-NEXT: cset r0, ne
3962 ; CHECK-MVE-NEXT: cmp r0, #0
3963 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
3964 ; CHECK-MVE-NEXT: vins.f16 s3, s4
3965 ; CHECK-MVE-NEXT: bx lr
3967 ; CHECK-MVEFP-LABEL: vcmp_r_ugt_v8f16:
3968 ; CHECK-MVEFP: @ %bb.0: @ %entry
3969 ; CHECK-MVEFP-NEXT: vcmp.f16 lt, q0, zr
3970 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
3971 ; CHECK-MVEFP-NEXT: bx lr
3973 %c = fcmp ugt <8 x half> zeroinitializer, %src
3974 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
3978 define arm_aapcs_vfpcc <8 x half> @vcmp_r_uge_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
3979 ; CHECK-MVE-LABEL: vcmp_r_uge_v8f16:
3980 ; CHECK-MVE: @ %bb.0: @ %entry
3981 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
3982 ; CHECK-MVE-NEXT: movs r1, #0
3983 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
3984 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
3985 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3986 ; CHECK-MVE-NEXT: it le
3987 ; CHECK-MVE-NEXT: movle r1, #1
3988 ; CHECK-MVE-NEXT: cmp r1, #0
3989 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
3990 ; CHECK-MVE-NEXT: cset r1, ne
3991 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
3992 ; CHECK-MVE-NEXT: cmp r1, #0
3993 ; CHECK-MVE-NEXT: mov.w r1, #0
3994 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
3995 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
3996 ; CHECK-MVE-NEXT: it le
3997 ; CHECK-MVE-NEXT: movle r1, #1
3998 ; CHECK-MVE-NEXT: cmp r1, #0
3999 ; CHECK-MVE-NEXT: cset r1, ne
4000 ; CHECK-MVE-NEXT: movs r0, #0
4001 ; CHECK-MVE-NEXT: cmp r1, #0
4002 ; CHECK-MVE-NEXT: mov.w r1, #0
4003 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
4004 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
4005 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
4006 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
4007 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4008 ; CHECK-MVE-NEXT: it le
4009 ; CHECK-MVE-NEXT: movle r1, #1
4010 ; CHECK-MVE-NEXT: cmp r1, #0
4011 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
4012 ; CHECK-MVE-NEXT: cset r1, ne
4013 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
4014 ; CHECK-MVE-NEXT: cmp r1, #0
4015 ; CHECK-MVE-NEXT: mov.w r1, #0
4016 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
4017 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4018 ; CHECK-MVE-NEXT: it le
4019 ; CHECK-MVE-NEXT: movle r1, #1
4020 ; CHECK-MVE-NEXT: cmp r1, #0
4021 ; CHECK-MVE-NEXT: cset r1, ne
4022 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
4023 ; CHECK-MVE-NEXT: cmp r1, #0
4024 ; CHECK-MVE-NEXT: mov.w r1, #0
4025 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
4026 ; CHECK-MVE-NEXT: vins.f16 s0, s12
4027 ; CHECK-MVE-NEXT: vins.f16 s1, s4
4028 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
4029 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
4030 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
4031 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4032 ; CHECK-MVE-NEXT: it le
4033 ; CHECK-MVE-NEXT: movle r1, #1
4034 ; CHECK-MVE-NEXT: cmp r1, #0
4035 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
4036 ; CHECK-MVE-NEXT: cset r1, ne
4037 ; CHECK-MVE-NEXT: cmp r1, #0
4038 ; CHECK-MVE-NEXT: mov.w r1, #0
4039 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
4040 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4041 ; CHECK-MVE-NEXT: it le
4042 ; CHECK-MVE-NEXT: movle r1, #1
4043 ; CHECK-MVE-NEXT: cmp r1, #0
4044 ; CHECK-MVE-NEXT: cset r1, ne
4045 ; CHECK-MVE-NEXT: cmp r1, #0
4046 ; CHECK-MVE-NEXT: mov.w r1, #0
4047 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
4048 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
4049 ; CHECK-MVE-NEXT: vins.f16 s2, s4
4050 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
4051 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
4052 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
4053 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4054 ; CHECK-MVE-NEXT: it le
4055 ; CHECK-MVE-NEXT: movle r1, #1
4056 ; CHECK-MVE-NEXT: cmp r1, #0
4057 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
4058 ; CHECK-MVE-NEXT: cset r1, ne
4059 ; CHECK-MVE-NEXT: cmp r1, #0
4060 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
4061 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4062 ; CHECK-MVE-NEXT: it le
4063 ; CHECK-MVE-NEXT: movle r0, #1
4064 ; CHECK-MVE-NEXT: cmp r0, #0
4065 ; CHECK-MVE-NEXT: cset r0, ne
4066 ; CHECK-MVE-NEXT: cmp r0, #0
4067 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
4068 ; CHECK-MVE-NEXT: vins.f16 s3, s4
4069 ; CHECK-MVE-NEXT: bx lr
4071 ; CHECK-MVEFP-LABEL: vcmp_r_uge_v8f16:
4072 ; CHECK-MVEFP: @ %bb.0: @ %entry
4073 ; CHECK-MVEFP-NEXT: vcmp.f16 le, q0, zr
4074 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
4075 ; CHECK-MVEFP-NEXT: bx lr
4077 %c = fcmp uge <8 x half> zeroinitializer, %src
4078 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
4082 define arm_aapcs_vfpcc <8 x half> @vcmp_r_ult_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
4083 ; CHECK-MVE-LABEL: vcmp_r_ult_v8f16:
4084 ; CHECK-MVE: @ %bb.0: @ %entry
4085 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
4086 ; CHECK-MVE-NEXT: movs r1, #0
4087 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
4088 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
4089 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4090 ; CHECK-MVE-NEXT: it hi
4091 ; CHECK-MVE-NEXT: movhi r1, #1
4092 ; CHECK-MVE-NEXT: cmp r1, #0
4093 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
4094 ; CHECK-MVE-NEXT: cset r1, ne
4095 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
4096 ; CHECK-MVE-NEXT: cmp r1, #0
4097 ; CHECK-MVE-NEXT: mov.w r1, #0
4098 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
4099 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4100 ; CHECK-MVE-NEXT: it hi
4101 ; CHECK-MVE-NEXT: movhi r1, #1
4102 ; CHECK-MVE-NEXT: cmp r1, #0
4103 ; CHECK-MVE-NEXT: cset r1, ne
4104 ; CHECK-MVE-NEXT: movs r0, #0
4105 ; CHECK-MVE-NEXT: cmp r1, #0
4106 ; CHECK-MVE-NEXT: mov.w r1, #0
4107 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
4108 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
4109 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
4110 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
4111 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4112 ; CHECK-MVE-NEXT: it hi
4113 ; CHECK-MVE-NEXT: movhi r1, #1
4114 ; CHECK-MVE-NEXT: cmp r1, #0
4115 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
4116 ; CHECK-MVE-NEXT: cset r1, ne
4117 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
4118 ; CHECK-MVE-NEXT: cmp r1, #0
4119 ; CHECK-MVE-NEXT: mov.w r1, #0
4120 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
4121 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4122 ; CHECK-MVE-NEXT: it hi
4123 ; CHECK-MVE-NEXT: movhi r1, #1
4124 ; CHECK-MVE-NEXT: cmp r1, #0
4125 ; CHECK-MVE-NEXT: cset r1, ne
4126 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
4127 ; CHECK-MVE-NEXT: cmp r1, #0
4128 ; CHECK-MVE-NEXT: mov.w r1, #0
4129 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
4130 ; CHECK-MVE-NEXT: vins.f16 s0, s12
4131 ; CHECK-MVE-NEXT: vins.f16 s1, s4
4132 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
4133 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
4134 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
4135 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4136 ; CHECK-MVE-NEXT: it hi
4137 ; CHECK-MVE-NEXT: movhi r1, #1
4138 ; CHECK-MVE-NEXT: cmp r1, #0
4139 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
4140 ; CHECK-MVE-NEXT: cset r1, ne
4141 ; CHECK-MVE-NEXT: cmp r1, #0
4142 ; CHECK-MVE-NEXT: mov.w r1, #0
4143 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
4144 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4145 ; CHECK-MVE-NEXT: it hi
4146 ; CHECK-MVE-NEXT: movhi r1, #1
4147 ; CHECK-MVE-NEXT: cmp r1, #0
4148 ; CHECK-MVE-NEXT: cset r1, ne
4149 ; CHECK-MVE-NEXT: cmp r1, #0
4150 ; CHECK-MVE-NEXT: mov.w r1, #0
4151 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
4152 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
4153 ; CHECK-MVE-NEXT: vins.f16 s2, s4
4154 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
4155 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
4156 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
4157 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4158 ; CHECK-MVE-NEXT: it hi
4159 ; CHECK-MVE-NEXT: movhi r1, #1
4160 ; CHECK-MVE-NEXT: cmp r1, #0
4161 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
4162 ; CHECK-MVE-NEXT: cset r1, ne
4163 ; CHECK-MVE-NEXT: cmp r1, #0
4164 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
4165 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4166 ; CHECK-MVE-NEXT: it hi
4167 ; CHECK-MVE-NEXT: movhi r0, #1
4168 ; CHECK-MVE-NEXT: cmp r0, #0
4169 ; CHECK-MVE-NEXT: cset r0, ne
4170 ; CHECK-MVE-NEXT: cmp r0, #0
4171 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
4172 ; CHECK-MVE-NEXT: vins.f16 s3, s4
4173 ; CHECK-MVE-NEXT: bx lr
4175 ; CHECK-MVEFP-LABEL: vcmp_r_ult_v8f16:
4176 ; CHECK-MVEFP: @ %bb.0: @ %entry
4177 ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q0, zr
4178 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
4179 ; CHECK-MVEFP-NEXT: bx lr
4181 %c = fcmp ult <8 x half> zeroinitializer, %src
4182 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
4186 define arm_aapcs_vfpcc <8 x half> @vcmp_r_ule_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
4187 ; CHECK-MVE-LABEL: vcmp_r_ule_v8f16:
4188 ; CHECK-MVE: @ %bb.0: @ %entry
4189 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
4190 ; CHECK-MVE-NEXT: movs r1, #0
4191 ; CHECK-MVE-NEXT: vcmp.f16 s12, #0
4192 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
4193 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4194 ; CHECK-MVE-NEXT: it pl
4195 ; CHECK-MVE-NEXT: movpl r1, #1
4196 ; CHECK-MVE-NEXT: cmp r1, #0
4197 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
4198 ; CHECK-MVE-NEXT: cset r1, ne
4199 ; CHECK-MVE-NEXT: vcmp.f16 s0, #0
4200 ; CHECK-MVE-NEXT: cmp r1, #0
4201 ; CHECK-MVE-NEXT: mov.w r1, #0
4202 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
4203 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4204 ; CHECK-MVE-NEXT: it pl
4205 ; CHECK-MVE-NEXT: movpl r1, #1
4206 ; CHECK-MVE-NEXT: cmp r1, #0
4207 ; CHECK-MVE-NEXT: cset r1, ne
4208 ; CHECK-MVE-NEXT: movs r0, #0
4209 ; CHECK-MVE-NEXT: cmp r1, #0
4210 ; CHECK-MVE-NEXT: mov.w r1, #0
4211 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
4212 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
4213 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
4214 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
4215 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4216 ; CHECK-MVE-NEXT: it pl
4217 ; CHECK-MVE-NEXT: movpl r1, #1
4218 ; CHECK-MVE-NEXT: cmp r1, #0
4219 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
4220 ; CHECK-MVE-NEXT: cset r1, ne
4221 ; CHECK-MVE-NEXT: vcmp.f16 s1, #0
4222 ; CHECK-MVE-NEXT: cmp r1, #0
4223 ; CHECK-MVE-NEXT: mov.w r1, #0
4224 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
4225 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4226 ; CHECK-MVE-NEXT: it pl
4227 ; CHECK-MVE-NEXT: movpl r1, #1
4228 ; CHECK-MVE-NEXT: cmp r1, #0
4229 ; CHECK-MVE-NEXT: cset r1, ne
4230 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
4231 ; CHECK-MVE-NEXT: cmp r1, #0
4232 ; CHECK-MVE-NEXT: mov.w r1, #0
4233 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
4234 ; CHECK-MVE-NEXT: vins.f16 s0, s12
4235 ; CHECK-MVE-NEXT: vins.f16 s1, s4
4236 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
4237 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
4238 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
4239 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4240 ; CHECK-MVE-NEXT: it pl
4241 ; CHECK-MVE-NEXT: movpl r1, #1
4242 ; CHECK-MVE-NEXT: cmp r1, #0
4243 ; CHECK-MVE-NEXT: vcmp.f16 s2, #0
4244 ; CHECK-MVE-NEXT: cset r1, ne
4245 ; CHECK-MVE-NEXT: cmp r1, #0
4246 ; CHECK-MVE-NEXT: mov.w r1, #0
4247 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
4248 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4249 ; CHECK-MVE-NEXT: it pl
4250 ; CHECK-MVE-NEXT: movpl r1, #1
4251 ; CHECK-MVE-NEXT: cmp r1, #0
4252 ; CHECK-MVE-NEXT: cset r1, ne
4253 ; CHECK-MVE-NEXT: cmp r1, #0
4254 ; CHECK-MVE-NEXT: mov.w r1, #0
4255 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
4256 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
4257 ; CHECK-MVE-NEXT: vins.f16 s2, s4
4258 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
4259 ; CHECK-MVE-NEXT: vcmp.f16 s4, #0
4260 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
4261 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4262 ; CHECK-MVE-NEXT: it pl
4263 ; CHECK-MVE-NEXT: movpl r1, #1
4264 ; CHECK-MVE-NEXT: cmp r1, #0
4265 ; CHECK-MVE-NEXT: vcmp.f16 s3, #0
4266 ; CHECK-MVE-NEXT: cset r1, ne
4267 ; CHECK-MVE-NEXT: cmp r1, #0
4268 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
4269 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4270 ; CHECK-MVE-NEXT: it pl
4271 ; CHECK-MVE-NEXT: movpl r0, #1
4272 ; CHECK-MVE-NEXT: cmp r0, #0
4273 ; CHECK-MVE-NEXT: cset r0, ne
4274 ; CHECK-MVE-NEXT: cmp r0, #0
4275 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
4276 ; CHECK-MVE-NEXT: vins.f16 s3, s4
4277 ; CHECK-MVE-NEXT: bx lr
4279 ; CHECK-MVEFP-LABEL: vcmp_r_ule_v8f16:
4280 ; CHECK-MVEFP: @ %bb.0: @ %entry
4281 ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q0, zr
4282 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
4283 ; CHECK-MVEFP-NEXT: bx lr
4285 %c = fcmp ule <8 x half> zeroinitializer, %src
4286 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
4290 define arm_aapcs_vfpcc <8 x half> @vcmp_r_ord_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
4291 ; CHECK-MVE-LABEL: vcmp_r_ord_v8f16:
4292 ; CHECK-MVE: @ %bb.0: @ %entry
4293 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
4294 ; CHECK-MVE-NEXT: movs r1, #0
4295 ; CHECK-MVE-NEXT: vcmp.f16 s12, s12
4296 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
4297 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4298 ; CHECK-MVE-NEXT: it vc
4299 ; CHECK-MVE-NEXT: movvc r1, #1
4300 ; CHECK-MVE-NEXT: cmp r1, #0
4301 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
4302 ; CHECK-MVE-NEXT: cset r1, ne
4303 ; CHECK-MVE-NEXT: vcmp.f16 s0, s0
4304 ; CHECK-MVE-NEXT: cmp r1, #0
4305 ; CHECK-MVE-NEXT: mov.w r1, #0
4306 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
4307 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4308 ; CHECK-MVE-NEXT: it vc
4309 ; CHECK-MVE-NEXT: movvc r1, #1
4310 ; CHECK-MVE-NEXT: cmp r1, #0
4311 ; CHECK-MVE-NEXT: cset r1, ne
4312 ; CHECK-MVE-NEXT: movs r0, #0
4313 ; CHECK-MVE-NEXT: cmp r1, #0
4314 ; CHECK-MVE-NEXT: mov.w r1, #0
4315 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
4316 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
4317 ; CHECK-MVE-NEXT: vcmp.f16 s4, s4
4318 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
4319 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4320 ; CHECK-MVE-NEXT: it vc
4321 ; CHECK-MVE-NEXT: movvc r1, #1
4322 ; CHECK-MVE-NEXT: cmp r1, #0
4323 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
4324 ; CHECK-MVE-NEXT: cset r1, ne
4325 ; CHECK-MVE-NEXT: vcmp.f16 s1, s1
4326 ; CHECK-MVE-NEXT: cmp r1, #0
4327 ; CHECK-MVE-NEXT: mov.w r1, #0
4328 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
4329 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4330 ; CHECK-MVE-NEXT: it vc
4331 ; CHECK-MVE-NEXT: movvc r1, #1
4332 ; CHECK-MVE-NEXT: cmp r1, #0
4333 ; CHECK-MVE-NEXT: cset r1, ne
4334 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
4335 ; CHECK-MVE-NEXT: cmp r1, #0
4336 ; CHECK-MVE-NEXT: mov.w r1, #0
4337 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
4338 ; CHECK-MVE-NEXT: vins.f16 s0, s12
4339 ; CHECK-MVE-NEXT: vins.f16 s1, s4
4340 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
4341 ; CHECK-MVE-NEXT: vcmp.f16 s4, s4
4342 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
4343 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4344 ; CHECK-MVE-NEXT: it vc
4345 ; CHECK-MVE-NEXT: movvc r1, #1
4346 ; CHECK-MVE-NEXT: cmp r1, #0
4347 ; CHECK-MVE-NEXT: vcmp.f16 s2, s2
4348 ; CHECK-MVE-NEXT: cset r1, ne
4349 ; CHECK-MVE-NEXT: cmp r1, #0
4350 ; CHECK-MVE-NEXT: mov.w r1, #0
4351 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
4352 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4353 ; CHECK-MVE-NEXT: it vc
4354 ; CHECK-MVE-NEXT: movvc r1, #1
4355 ; CHECK-MVE-NEXT: cmp r1, #0
4356 ; CHECK-MVE-NEXT: cset r1, ne
4357 ; CHECK-MVE-NEXT: cmp r1, #0
4358 ; CHECK-MVE-NEXT: mov.w r1, #0
4359 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
4360 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
4361 ; CHECK-MVE-NEXT: vins.f16 s2, s4
4362 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
4363 ; CHECK-MVE-NEXT: vcmp.f16 s4, s4
4364 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
4365 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4366 ; CHECK-MVE-NEXT: it vc
4367 ; CHECK-MVE-NEXT: movvc r1, #1
4368 ; CHECK-MVE-NEXT: cmp r1, #0
4369 ; CHECK-MVE-NEXT: vcmp.f16 s3, s3
4370 ; CHECK-MVE-NEXT: cset r1, ne
4371 ; CHECK-MVE-NEXT: cmp r1, #0
4372 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
4373 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4374 ; CHECK-MVE-NEXT: it vc
4375 ; CHECK-MVE-NEXT: movvc r0, #1
4376 ; CHECK-MVE-NEXT: cmp r0, #0
4377 ; CHECK-MVE-NEXT: cset r0, ne
4378 ; CHECK-MVE-NEXT: cmp r0, #0
4379 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
4380 ; CHECK-MVE-NEXT: vins.f16 s3, s4
4381 ; CHECK-MVE-NEXT: bx lr
4383 ; CHECK-MVEFP-LABEL: vcmp_r_ord_v8f16:
4384 ; CHECK-MVEFP: @ %bb.0: @ %entry
4385 ; CHECK-MVEFP-NEXT: vpt.f16 le, q0, zr
4386 ; CHECK-MVEFP-NEXT: vcmpt.f16 gt, q0, zr
4387 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q1
4388 ; CHECK-MVEFP-NEXT: bx lr
4390 %c = fcmp ord <8 x half> zeroinitializer, %src
4391 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
4395 define arm_aapcs_vfpcc <8 x half> @vcmp_r_uno_v8f16(<8 x half> %src, <8 x half> %a, <8 x half> %b) {
4396 ; CHECK-MVE-LABEL: vcmp_r_uno_v8f16:
4397 ; CHECK-MVE: @ %bb.0: @ %entry
4398 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
4399 ; CHECK-MVE-NEXT: movs r1, #0
4400 ; CHECK-MVE-NEXT: vcmp.f16 s12, s12
4401 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
4402 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4403 ; CHECK-MVE-NEXT: it vs
4404 ; CHECK-MVE-NEXT: movvs r1, #1
4405 ; CHECK-MVE-NEXT: cmp r1, #0
4406 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
4407 ; CHECK-MVE-NEXT: cset r1, ne
4408 ; CHECK-MVE-NEXT: vcmp.f16 s0, s0
4409 ; CHECK-MVE-NEXT: cmp r1, #0
4410 ; CHECK-MVE-NEXT: mov.w r1, #0
4411 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
4412 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4413 ; CHECK-MVE-NEXT: it vs
4414 ; CHECK-MVE-NEXT: movvs r1, #1
4415 ; CHECK-MVE-NEXT: cmp r1, #0
4416 ; CHECK-MVE-NEXT: cset r1, ne
4417 ; CHECK-MVE-NEXT: movs r0, #0
4418 ; CHECK-MVE-NEXT: cmp r1, #0
4419 ; CHECK-MVE-NEXT: mov.w r1, #0
4420 ; CHECK-MVE-NEXT: vseleq.f16 s0, s8, s4
4421 ; CHECK-MVE-NEXT: vmovx.f16 s4, s1
4422 ; CHECK-MVE-NEXT: vcmp.f16 s4, s4
4423 ; CHECK-MVE-NEXT: vmovx.f16 s4, s5
4424 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4425 ; CHECK-MVE-NEXT: it vs
4426 ; CHECK-MVE-NEXT: movvs r1, #1
4427 ; CHECK-MVE-NEXT: cmp r1, #0
4428 ; CHECK-MVE-NEXT: vmovx.f16 s8, s9
4429 ; CHECK-MVE-NEXT: cset r1, ne
4430 ; CHECK-MVE-NEXT: vcmp.f16 s1, s1
4431 ; CHECK-MVE-NEXT: cmp r1, #0
4432 ; CHECK-MVE-NEXT: mov.w r1, #0
4433 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
4434 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4435 ; CHECK-MVE-NEXT: it vs
4436 ; CHECK-MVE-NEXT: movvs r1, #1
4437 ; CHECK-MVE-NEXT: cmp r1, #0
4438 ; CHECK-MVE-NEXT: cset r1, ne
4439 ; CHECK-MVE-NEXT: vmovx.f16 s8, s10
4440 ; CHECK-MVE-NEXT: cmp r1, #0
4441 ; CHECK-MVE-NEXT: mov.w r1, #0
4442 ; CHECK-MVE-NEXT: vseleq.f16 s1, s9, s5
4443 ; CHECK-MVE-NEXT: vins.f16 s0, s12
4444 ; CHECK-MVE-NEXT: vins.f16 s1, s4
4445 ; CHECK-MVE-NEXT: vmovx.f16 s4, s2
4446 ; CHECK-MVE-NEXT: vcmp.f16 s4, s4
4447 ; CHECK-MVE-NEXT: vmovx.f16 s4, s6
4448 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4449 ; CHECK-MVE-NEXT: it vs
4450 ; CHECK-MVE-NEXT: movvs r1, #1
4451 ; CHECK-MVE-NEXT: cmp r1, #0
4452 ; CHECK-MVE-NEXT: vcmp.f16 s2, s2
4453 ; CHECK-MVE-NEXT: cset r1, ne
4454 ; CHECK-MVE-NEXT: cmp r1, #0
4455 ; CHECK-MVE-NEXT: mov.w r1, #0
4456 ; CHECK-MVE-NEXT: vseleq.f16 s4, s8, s4
4457 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4458 ; CHECK-MVE-NEXT: it vs
4459 ; CHECK-MVE-NEXT: movvs r1, #1
4460 ; CHECK-MVE-NEXT: cmp r1, #0
4461 ; CHECK-MVE-NEXT: cset r1, ne
4462 ; CHECK-MVE-NEXT: cmp r1, #0
4463 ; CHECK-MVE-NEXT: mov.w r1, #0
4464 ; CHECK-MVE-NEXT: vseleq.f16 s2, s10, s6
4465 ; CHECK-MVE-NEXT: vmovx.f16 s6, s11
4466 ; CHECK-MVE-NEXT: vins.f16 s2, s4
4467 ; CHECK-MVE-NEXT: vmovx.f16 s4, s3
4468 ; CHECK-MVE-NEXT: vcmp.f16 s4, s4
4469 ; CHECK-MVE-NEXT: vmovx.f16 s4, s7
4470 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4471 ; CHECK-MVE-NEXT: it vs
4472 ; CHECK-MVE-NEXT: movvs r1, #1
4473 ; CHECK-MVE-NEXT: cmp r1, #0
4474 ; CHECK-MVE-NEXT: vcmp.f16 s3, s3
4475 ; CHECK-MVE-NEXT: cset r1, ne
4476 ; CHECK-MVE-NEXT: cmp r1, #0
4477 ; CHECK-MVE-NEXT: vseleq.f16 s4, s6, s4
4478 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4479 ; CHECK-MVE-NEXT: it vs
4480 ; CHECK-MVE-NEXT: movvs r0, #1
4481 ; CHECK-MVE-NEXT: cmp r0, #0
4482 ; CHECK-MVE-NEXT: cset r0, ne
4483 ; CHECK-MVE-NEXT: cmp r0, #0
4484 ; CHECK-MVE-NEXT: vseleq.f16 s3, s11, s7
4485 ; CHECK-MVE-NEXT: vins.f16 s3, s4
4486 ; CHECK-MVE-NEXT: bx lr
4488 ; CHECK-MVEFP-LABEL: vcmp_r_uno_v8f16:
4489 ; CHECK-MVEFP: @ %bb.0: @ %entry
4490 ; CHECK-MVEFP-NEXT: vpt.f16 le, q0, zr
4491 ; CHECK-MVEFP-NEXT: vcmpt.f16 gt, q0, zr
4492 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
4493 ; CHECK-MVEFP-NEXT: bx lr
4495 %c = fcmp uno <8 x half> zeroinitializer, %src
4496 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b