1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-arm-none-eabi -mattr=+mve,+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MVE
3 ; RUN: llc -mtriple=thumbv8.1m.main-arm-none-eabi -mattr=+mve.fp -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MVEFP
5 define arm_aapcs_vfpcc <4 x float> @vcmp_oeq_v4f32(<4 x float> %src, float %src2, <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, s4
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, s4
15 ; CHECK-MVE-NEXT: it ne
16 ; CHECK-MVE-NEXT: movne r1, #1
17 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
18 ; CHECK-MVE-NEXT: mov.w r2, #0
19 ; CHECK-MVE-NEXT: vcmp.f32 s3, s4
20 ; CHECK-MVE-NEXT: it eq
21 ; CHECK-MVE-NEXT: moveq r2, #1
22 ; CHECK-MVE-NEXT: cmp r2, #0
23 ; CHECK-MVE-NEXT: it ne
24 ; CHECK-MVE-NEXT: movne r2, #1
25 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
26 ; CHECK-MVE-NEXT: mov.w r3, #0
27 ; CHECK-MVE-NEXT: vcmp.f32 s2, s4
28 ; CHECK-MVE-NEXT: it eq
29 ; CHECK-MVE-NEXT: moveq r3, #1
30 ; CHECK-MVE-NEXT: cmp r3, #0
31 ; CHECK-MVE-NEXT: it ne
32 ; CHECK-MVE-NEXT: movne r3, #1
33 ; CHECK-MVE-NEXT: movs r0, #0
34 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
35 ; CHECK-MVE-NEXT: it eq
36 ; CHECK-MVE-NEXT: moveq r0, #1
37 ; CHECK-MVE-NEXT: cmp r0, #0
38 ; CHECK-MVE-NEXT: it ne
39 ; CHECK-MVE-NEXT: movne r0, #1
40 ; CHECK-MVE-NEXT: cmp r3, #0
41 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
42 ; CHECK-MVE-NEXT: cmp r0, #0
43 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
44 ; CHECK-MVE-NEXT: cmp r1, #0
45 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
46 ; CHECK-MVE-NEXT: cmp r2, #0
47 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
48 ; CHECK-MVE-NEXT: bx lr
50 ; CHECK-MVEFP-LABEL: vcmp_oeq_v4f32:
51 ; CHECK-MVEFP: @ %bb.0: @ %entry
52 ; CHECK-MVEFP-NEXT: vmov r0, s4
53 ; CHECK-MVEFP-NEXT: vcmp.f32 eq, q0, r0
54 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
55 ; CHECK-MVEFP-NEXT: bx lr
57 %i = insertelement <4 x float> undef, float %src2, i32 0
58 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
59 %c = fcmp oeq <4 x float> %src, %sp
60 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
64 define arm_aapcs_vfpcc <4 x float> @vcmp_one_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
65 ; CHECK-MVE-LABEL: vcmp_one_v4f32:
66 ; CHECK-MVE: @ %bb.0: @ %entry
67 ; CHECK-MVE-NEXT: vcmp.f32 s1, s4
68 ; CHECK-MVE-NEXT: movs r1, #0
69 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
70 ; CHECK-MVE-NEXT: vcmp.f32 s1, s4
71 ; CHECK-MVE-NEXT: it mi
72 ; CHECK-MVE-NEXT: movmi r1, #1
73 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
74 ; CHECK-MVE-NEXT: it gt
75 ; CHECK-MVE-NEXT: movgt r1, #1
76 ; CHECK-MVE-NEXT: cmp r1, #0
77 ; CHECK-MVE-NEXT: vcmp.f32 s0, s4
78 ; CHECK-MVE-NEXT: mov.w r2, #0
79 ; CHECK-MVE-NEXT: it ne
80 ; CHECK-MVE-NEXT: movne r1, #1
81 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
82 ; CHECK-MVE-NEXT: it mi
83 ; CHECK-MVE-NEXT: movmi r2, #1
84 ; CHECK-MVE-NEXT: vcmp.f32 s3, s4
85 ; CHECK-MVE-NEXT: it gt
86 ; CHECK-MVE-NEXT: movgt r2, #1
87 ; CHECK-MVE-NEXT: cmp r2, #0
88 ; CHECK-MVE-NEXT: mov.w r3, #0
89 ; CHECK-MVE-NEXT: it ne
90 ; CHECK-MVE-NEXT: movne r2, #1
91 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
92 ; CHECK-MVE-NEXT: it mi
93 ; CHECK-MVE-NEXT: movmi r3, #1
94 ; CHECK-MVE-NEXT: it gt
95 ; CHECK-MVE-NEXT: movgt r3, #1
96 ; CHECK-MVE-NEXT: cmp r3, #0
97 ; CHECK-MVE-NEXT: mov.w r0, #0
98 ; CHECK-MVE-NEXT: vcmp.f32 s2, s4
99 ; CHECK-MVE-NEXT: it ne
100 ; CHECK-MVE-NEXT: movne r3, #1
101 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
102 ; CHECK-MVE-NEXT: it mi
103 ; CHECK-MVE-NEXT: movmi r0, #1
104 ; CHECK-MVE-NEXT: it gt
105 ; CHECK-MVE-NEXT: movgt r0, #1
106 ; CHECK-MVE-NEXT: cmp r0, #0
107 ; CHECK-MVE-NEXT: it ne
108 ; CHECK-MVE-NEXT: movne r0, #1
109 ; CHECK-MVE-NEXT: cmp r3, #0
110 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
111 ; CHECK-MVE-NEXT: cmp r0, #0
112 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
113 ; CHECK-MVE-NEXT: cmp r1, #0
114 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
115 ; CHECK-MVE-NEXT: cmp r2, #0
116 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
117 ; CHECK-MVE-NEXT: bx lr
119 ; CHECK-MVEFP-LABEL: vcmp_one_v4f32:
120 ; CHECK-MVEFP: @ %bb.0: @ %entry
121 ; CHECK-MVEFP-NEXT: vmov r0, s4
122 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0
123 ; CHECK-MVEFP-NEXT: vcmp.f32 le, q1, q0
124 ; CHECK-MVEFP-NEXT: vpst
125 ; CHECK-MVEFP-NEXT: vcmpt.f32 le, q0, r0
126 ; CHECK-MVEFP-NEXT: vpnot
127 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
128 ; CHECK-MVEFP-NEXT: bx lr
130 %i = insertelement <4 x float> undef, float %src2, i32 0
131 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
132 %c = fcmp one <4 x float> %src, %sp
133 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
137 define arm_aapcs_vfpcc <4 x float> @vcmp_ogt_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
138 ; CHECK-MVE-LABEL: vcmp_ogt_v4f32:
139 ; CHECK-MVE: @ %bb.0: @ %entry
140 ; CHECK-MVE-NEXT: vcmpe.f32 s1, s4
141 ; CHECK-MVE-NEXT: movs r1, #0
142 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
143 ; CHECK-MVE-NEXT: it gt
144 ; CHECK-MVE-NEXT: movgt r1, #1
145 ; CHECK-MVE-NEXT: cmp r1, #0
146 ; CHECK-MVE-NEXT: vcmpe.f32 s0, s4
147 ; CHECK-MVE-NEXT: it ne
148 ; CHECK-MVE-NEXT: movne r1, #1
149 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
150 ; CHECK-MVE-NEXT: mov.w r2, #0
151 ; CHECK-MVE-NEXT: vcmpe.f32 s3, s4
152 ; CHECK-MVE-NEXT: it gt
153 ; CHECK-MVE-NEXT: movgt r2, #1
154 ; CHECK-MVE-NEXT: cmp r2, #0
155 ; CHECK-MVE-NEXT: it ne
156 ; CHECK-MVE-NEXT: movne r2, #1
157 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
158 ; CHECK-MVE-NEXT: mov.w r3, #0
159 ; CHECK-MVE-NEXT: vcmpe.f32 s2, s4
160 ; CHECK-MVE-NEXT: it gt
161 ; CHECK-MVE-NEXT: movgt r3, #1
162 ; CHECK-MVE-NEXT: cmp r3, #0
163 ; CHECK-MVE-NEXT: it ne
164 ; CHECK-MVE-NEXT: movne r3, #1
165 ; CHECK-MVE-NEXT: movs r0, #0
166 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
167 ; CHECK-MVE-NEXT: it gt
168 ; CHECK-MVE-NEXT: movgt r0, #1
169 ; CHECK-MVE-NEXT: cmp r0, #0
170 ; CHECK-MVE-NEXT: it ne
171 ; CHECK-MVE-NEXT: movne r0, #1
172 ; CHECK-MVE-NEXT: cmp r3, #0
173 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
174 ; CHECK-MVE-NEXT: cmp r0, #0
175 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
176 ; CHECK-MVE-NEXT: cmp r1, #0
177 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
178 ; CHECK-MVE-NEXT: cmp r2, #0
179 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
180 ; CHECK-MVE-NEXT: bx lr
182 ; CHECK-MVEFP-LABEL: vcmp_ogt_v4f32:
183 ; CHECK-MVEFP: @ %bb.0: @ %entry
184 ; CHECK-MVEFP-NEXT: vmov r0, s4
185 ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q0, r0
186 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
187 ; CHECK-MVEFP-NEXT: bx lr
189 %i = insertelement <4 x float> undef, float %src2, i32 0
190 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
191 %c = fcmp ogt <4 x float> %src, %sp
192 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
196 define arm_aapcs_vfpcc <4 x float> @vcmp_oge_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
197 ; CHECK-MVE-LABEL: vcmp_oge_v4f32:
198 ; CHECK-MVE: @ %bb.0: @ %entry
199 ; CHECK-MVE-NEXT: vcmpe.f32 s1, s4
200 ; CHECK-MVE-NEXT: movs r1, #0
201 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
202 ; CHECK-MVE-NEXT: it ge
203 ; CHECK-MVE-NEXT: movge r1, #1
204 ; CHECK-MVE-NEXT: cmp r1, #0
205 ; CHECK-MVE-NEXT: vcmpe.f32 s0, s4
206 ; CHECK-MVE-NEXT: it ne
207 ; CHECK-MVE-NEXT: movne r1, #1
208 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
209 ; CHECK-MVE-NEXT: mov.w r2, #0
210 ; CHECK-MVE-NEXT: vcmpe.f32 s3, s4
211 ; CHECK-MVE-NEXT: it ge
212 ; CHECK-MVE-NEXT: movge r2, #1
213 ; CHECK-MVE-NEXT: cmp r2, #0
214 ; CHECK-MVE-NEXT: it ne
215 ; CHECK-MVE-NEXT: movne r2, #1
216 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
217 ; CHECK-MVE-NEXT: mov.w r3, #0
218 ; CHECK-MVE-NEXT: vcmpe.f32 s2, s4
219 ; CHECK-MVE-NEXT: it ge
220 ; CHECK-MVE-NEXT: movge r3, #1
221 ; CHECK-MVE-NEXT: cmp r3, #0
222 ; CHECK-MVE-NEXT: it ne
223 ; CHECK-MVE-NEXT: movne r3, #1
224 ; CHECK-MVE-NEXT: movs r0, #0
225 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
226 ; CHECK-MVE-NEXT: it ge
227 ; CHECK-MVE-NEXT: movge r0, #1
228 ; CHECK-MVE-NEXT: cmp r0, #0
229 ; CHECK-MVE-NEXT: it ne
230 ; CHECK-MVE-NEXT: movne r0, #1
231 ; CHECK-MVE-NEXT: cmp r3, #0
232 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
233 ; CHECK-MVE-NEXT: cmp r0, #0
234 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
235 ; CHECK-MVE-NEXT: cmp r1, #0
236 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
237 ; CHECK-MVE-NEXT: cmp r2, #0
238 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
239 ; CHECK-MVE-NEXT: bx lr
241 ; CHECK-MVEFP-LABEL: vcmp_oge_v4f32:
242 ; CHECK-MVEFP: @ %bb.0: @ %entry
243 ; CHECK-MVEFP-NEXT: vmov r0, s4
244 ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q0, r0
245 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
246 ; CHECK-MVEFP-NEXT: bx lr
248 %i = insertelement <4 x float> undef, float %src2, i32 0
249 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
250 %c = fcmp oge <4 x float> %src, %sp
251 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
255 define arm_aapcs_vfpcc <4 x float> @vcmp_olt_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
256 ; CHECK-MVE-LABEL: vcmp_olt_v4f32:
257 ; CHECK-MVE: @ %bb.0: @ %entry
258 ; CHECK-MVE-NEXT: vcmpe.f32 s1, s4
259 ; CHECK-MVE-NEXT: movs r1, #0
260 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
261 ; CHECK-MVE-NEXT: it mi
262 ; CHECK-MVE-NEXT: movmi r1, #1
263 ; CHECK-MVE-NEXT: cmp r1, #0
264 ; CHECK-MVE-NEXT: vcmpe.f32 s0, s4
265 ; CHECK-MVE-NEXT: it ne
266 ; CHECK-MVE-NEXT: movne r1, #1
267 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
268 ; CHECK-MVE-NEXT: mov.w r2, #0
269 ; CHECK-MVE-NEXT: vcmpe.f32 s3, s4
270 ; CHECK-MVE-NEXT: it mi
271 ; CHECK-MVE-NEXT: movmi r2, #1
272 ; CHECK-MVE-NEXT: cmp r2, #0
273 ; CHECK-MVE-NEXT: it ne
274 ; CHECK-MVE-NEXT: movne r2, #1
275 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
276 ; CHECK-MVE-NEXT: mov.w r3, #0
277 ; CHECK-MVE-NEXT: vcmpe.f32 s2, s4
278 ; CHECK-MVE-NEXT: it mi
279 ; CHECK-MVE-NEXT: movmi r3, #1
280 ; CHECK-MVE-NEXT: cmp r3, #0
281 ; CHECK-MVE-NEXT: it ne
282 ; CHECK-MVE-NEXT: movne r3, #1
283 ; CHECK-MVE-NEXT: movs r0, #0
284 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
285 ; CHECK-MVE-NEXT: it mi
286 ; CHECK-MVE-NEXT: movmi r0, #1
287 ; CHECK-MVE-NEXT: cmp r0, #0
288 ; CHECK-MVE-NEXT: it ne
289 ; CHECK-MVE-NEXT: movne r0, #1
290 ; CHECK-MVE-NEXT: cmp r3, #0
291 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
292 ; CHECK-MVE-NEXT: cmp r0, #0
293 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
294 ; CHECK-MVE-NEXT: cmp r1, #0
295 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
296 ; CHECK-MVE-NEXT: cmp r2, #0
297 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
298 ; CHECK-MVE-NEXT: bx lr
300 ; CHECK-MVEFP-LABEL: vcmp_olt_v4f32:
301 ; CHECK-MVEFP: @ %bb.0: @ %entry
302 ; CHECK-MVEFP-NEXT: vmov r0, s4
303 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0
304 ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q1, q0
305 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
306 ; CHECK-MVEFP-NEXT: bx lr
308 %i = insertelement <4 x float> undef, float %src2, i32 0
309 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
310 %c = fcmp olt <4 x float> %src, %sp
311 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
315 define arm_aapcs_vfpcc <4 x float> @vcmp_ole_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
316 ; CHECK-MVE-LABEL: vcmp_ole_v4f32:
317 ; CHECK-MVE: @ %bb.0: @ %entry
318 ; CHECK-MVE-NEXT: vcmpe.f32 s1, s4
319 ; CHECK-MVE-NEXT: movs r1, #0
320 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
321 ; CHECK-MVE-NEXT: it ls
322 ; CHECK-MVE-NEXT: movls r1, #1
323 ; CHECK-MVE-NEXT: cmp r1, #0
324 ; CHECK-MVE-NEXT: vcmpe.f32 s0, s4
325 ; CHECK-MVE-NEXT: it ne
326 ; CHECK-MVE-NEXT: movne r1, #1
327 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
328 ; CHECK-MVE-NEXT: mov.w r2, #0
329 ; CHECK-MVE-NEXT: vcmpe.f32 s3, s4
330 ; CHECK-MVE-NEXT: it ls
331 ; CHECK-MVE-NEXT: movls r2, #1
332 ; CHECK-MVE-NEXT: cmp r2, #0
333 ; CHECK-MVE-NEXT: it ne
334 ; CHECK-MVE-NEXT: movne r2, #1
335 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
336 ; CHECK-MVE-NEXT: mov.w r3, #0
337 ; CHECK-MVE-NEXT: vcmpe.f32 s2, s4
338 ; CHECK-MVE-NEXT: it ls
339 ; CHECK-MVE-NEXT: movls r3, #1
340 ; CHECK-MVE-NEXT: cmp r3, #0
341 ; CHECK-MVE-NEXT: it ne
342 ; CHECK-MVE-NEXT: movne r3, #1
343 ; CHECK-MVE-NEXT: movs r0, #0
344 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
345 ; CHECK-MVE-NEXT: it ls
346 ; CHECK-MVE-NEXT: movls r0, #1
347 ; CHECK-MVE-NEXT: cmp r0, #0
348 ; CHECK-MVE-NEXT: it ne
349 ; CHECK-MVE-NEXT: movne r0, #1
350 ; CHECK-MVE-NEXT: cmp r3, #0
351 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
352 ; CHECK-MVE-NEXT: cmp r0, #0
353 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
354 ; CHECK-MVE-NEXT: cmp r1, #0
355 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
356 ; CHECK-MVE-NEXT: cmp r2, #0
357 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
358 ; CHECK-MVE-NEXT: bx lr
360 ; CHECK-MVEFP-LABEL: vcmp_ole_v4f32:
361 ; CHECK-MVEFP: @ %bb.0: @ %entry
362 ; CHECK-MVEFP-NEXT: vmov r0, s4
363 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0
364 ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q1, q0
365 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
366 ; CHECK-MVEFP-NEXT: bx lr
368 %i = insertelement <4 x float> undef, float %src2, i32 0
369 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
370 %c = fcmp ole <4 x float> %src, %sp
371 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
375 define arm_aapcs_vfpcc <4 x float> @vcmp_ueq_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
376 ; CHECK-MVE-LABEL: vcmp_ueq_v4f32:
377 ; CHECK-MVE: @ %bb.0: @ %entry
378 ; CHECK-MVE-NEXT: vcmp.f32 s1, s4
379 ; CHECK-MVE-NEXT: movs r1, #0
380 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
381 ; CHECK-MVE-NEXT: vcmp.f32 s1, s4
382 ; CHECK-MVE-NEXT: it eq
383 ; CHECK-MVE-NEXT: moveq r1, #1
384 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
385 ; CHECK-MVE-NEXT: it vs
386 ; CHECK-MVE-NEXT: movvs r1, #1
387 ; CHECK-MVE-NEXT: cmp r1, #0
388 ; CHECK-MVE-NEXT: vcmp.f32 s0, s4
389 ; CHECK-MVE-NEXT: mov.w r2, #0
390 ; CHECK-MVE-NEXT: it ne
391 ; CHECK-MVE-NEXT: movne r1, #1
392 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
393 ; CHECK-MVE-NEXT: it eq
394 ; CHECK-MVE-NEXT: moveq r2, #1
395 ; CHECK-MVE-NEXT: vcmp.f32 s3, s4
396 ; CHECK-MVE-NEXT: it vs
397 ; CHECK-MVE-NEXT: movvs r2, #1
398 ; CHECK-MVE-NEXT: cmp r2, #0
399 ; CHECK-MVE-NEXT: mov.w r3, #0
400 ; CHECK-MVE-NEXT: it ne
401 ; CHECK-MVE-NEXT: movne r2, #1
402 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
403 ; CHECK-MVE-NEXT: it eq
404 ; CHECK-MVE-NEXT: moveq r3, #1
405 ; CHECK-MVE-NEXT: it vs
406 ; CHECK-MVE-NEXT: movvs r3, #1
407 ; CHECK-MVE-NEXT: cmp r3, #0
408 ; CHECK-MVE-NEXT: mov.w r0, #0
409 ; CHECK-MVE-NEXT: vcmp.f32 s2, s4
410 ; CHECK-MVE-NEXT: it ne
411 ; CHECK-MVE-NEXT: movne r3, #1
412 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
413 ; CHECK-MVE-NEXT: it eq
414 ; CHECK-MVE-NEXT: moveq r0, #1
415 ; CHECK-MVE-NEXT: it vs
416 ; CHECK-MVE-NEXT: movvs r0, #1
417 ; CHECK-MVE-NEXT: cmp r0, #0
418 ; CHECK-MVE-NEXT: it ne
419 ; CHECK-MVE-NEXT: movne r0, #1
420 ; CHECK-MVE-NEXT: cmp r3, #0
421 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
422 ; CHECK-MVE-NEXT: cmp r0, #0
423 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
424 ; CHECK-MVE-NEXT: cmp r1, #0
425 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
426 ; CHECK-MVE-NEXT: cmp r2, #0
427 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
428 ; CHECK-MVE-NEXT: bx lr
430 ; CHECK-MVEFP-LABEL: vcmp_ueq_v4f32:
431 ; CHECK-MVEFP: @ %bb.0: @ %entry
432 ; CHECK-MVEFP-NEXT: vmov r0, s4
433 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0
434 ; CHECK-MVEFP-NEXT: vcmp.f32 le, q1, q0
435 ; CHECK-MVEFP-NEXT: vpst
436 ; CHECK-MVEFP-NEXT: vcmpt.f32 le, q0, r0
437 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
438 ; CHECK-MVEFP-NEXT: bx lr
440 %i = insertelement <4 x float> undef, float %src2, i32 0
441 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
442 %c = fcmp ueq <4 x float> %src, %sp
443 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
447 define arm_aapcs_vfpcc <4 x float> @vcmp_une_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
448 ; CHECK-MVE-LABEL: vcmp_une_v4f32:
449 ; CHECK-MVE: @ %bb.0: @ %entry
450 ; CHECK-MVE-NEXT: vcmp.f32 s1, s4
451 ; CHECK-MVE-NEXT: movs r1, #0
452 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
453 ; CHECK-MVE-NEXT: it ne
454 ; CHECK-MVE-NEXT: movne r1, #1
455 ; CHECK-MVE-NEXT: cmp r1, #0
456 ; CHECK-MVE-NEXT: vcmp.f32 s0, s4
457 ; CHECK-MVE-NEXT: it ne
458 ; CHECK-MVE-NEXT: movne r1, #1
459 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
460 ; CHECK-MVE-NEXT: mov.w r2, #0
461 ; CHECK-MVE-NEXT: vcmp.f32 s3, s4
462 ; CHECK-MVE-NEXT: it ne
463 ; CHECK-MVE-NEXT: movne r2, #1
464 ; CHECK-MVE-NEXT: cmp r2, #0
465 ; CHECK-MVE-NEXT: it ne
466 ; CHECK-MVE-NEXT: movne r2, #1
467 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
468 ; CHECK-MVE-NEXT: mov.w r3, #0
469 ; CHECK-MVE-NEXT: vcmp.f32 s2, s4
470 ; CHECK-MVE-NEXT: it ne
471 ; CHECK-MVE-NEXT: movne r3, #1
472 ; CHECK-MVE-NEXT: cmp r3, #0
473 ; CHECK-MVE-NEXT: it ne
474 ; CHECK-MVE-NEXT: movne r3, #1
475 ; CHECK-MVE-NEXT: movs r0, #0
476 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
477 ; CHECK-MVE-NEXT: it ne
478 ; CHECK-MVE-NEXT: movne r0, #1
479 ; CHECK-MVE-NEXT: cmp r0, #0
480 ; CHECK-MVE-NEXT: it ne
481 ; CHECK-MVE-NEXT: movne r0, #1
482 ; CHECK-MVE-NEXT: cmp r3, #0
483 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
484 ; CHECK-MVE-NEXT: cmp r0, #0
485 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
486 ; CHECK-MVE-NEXT: cmp r1, #0
487 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
488 ; CHECK-MVE-NEXT: cmp r2, #0
489 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
490 ; CHECK-MVE-NEXT: bx lr
492 ; CHECK-MVEFP-LABEL: vcmp_une_v4f32:
493 ; CHECK-MVEFP: @ %bb.0: @ %entry
494 ; CHECK-MVEFP-NEXT: vmov r0, s4
495 ; CHECK-MVEFP-NEXT: vcmp.f32 ne, q0, r0
496 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
497 ; CHECK-MVEFP-NEXT: bx lr
499 %i = insertelement <4 x float> undef, float %src2, i32 0
500 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
501 %c = fcmp une <4 x float> %src, %sp
502 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
506 define arm_aapcs_vfpcc <4 x float> @vcmp_ugt_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
507 ; CHECK-MVE-LABEL: vcmp_ugt_v4f32:
508 ; CHECK-MVE: @ %bb.0: @ %entry
509 ; CHECK-MVE-NEXT: vcmpe.f32 s1, s4
510 ; CHECK-MVE-NEXT: movs r1, #0
511 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
512 ; CHECK-MVE-NEXT: it hi
513 ; CHECK-MVE-NEXT: movhi r1, #1
514 ; CHECK-MVE-NEXT: cmp r1, #0
515 ; CHECK-MVE-NEXT: vcmpe.f32 s0, s4
516 ; CHECK-MVE-NEXT: it ne
517 ; CHECK-MVE-NEXT: movne r1, #1
518 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
519 ; CHECK-MVE-NEXT: mov.w r2, #0
520 ; CHECK-MVE-NEXT: vcmpe.f32 s3, s4
521 ; CHECK-MVE-NEXT: it hi
522 ; CHECK-MVE-NEXT: movhi r2, #1
523 ; CHECK-MVE-NEXT: cmp r2, #0
524 ; CHECK-MVE-NEXT: it ne
525 ; CHECK-MVE-NEXT: movne r2, #1
526 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
527 ; CHECK-MVE-NEXT: mov.w r3, #0
528 ; CHECK-MVE-NEXT: vcmpe.f32 s2, s4
529 ; CHECK-MVE-NEXT: it hi
530 ; CHECK-MVE-NEXT: movhi r3, #1
531 ; CHECK-MVE-NEXT: cmp r3, #0
532 ; CHECK-MVE-NEXT: it ne
533 ; CHECK-MVE-NEXT: movne r3, #1
534 ; CHECK-MVE-NEXT: movs r0, #0
535 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
536 ; CHECK-MVE-NEXT: it hi
537 ; CHECK-MVE-NEXT: movhi r0, #1
538 ; CHECK-MVE-NEXT: cmp r0, #0
539 ; CHECK-MVE-NEXT: it ne
540 ; CHECK-MVE-NEXT: movne r0, #1
541 ; CHECK-MVE-NEXT: cmp r3, #0
542 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
543 ; CHECK-MVE-NEXT: cmp r0, #0
544 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
545 ; CHECK-MVE-NEXT: cmp r1, #0
546 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
547 ; CHECK-MVE-NEXT: cmp r2, #0
548 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
549 ; CHECK-MVE-NEXT: bx lr
551 ; CHECK-MVEFP-LABEL: vcmp_ugt_v4f32:
552 ; CHECK-MVEFP: @ %bb.0: @ %entry
553 ; CHECK-MVEFP-NEXT: vmov r0, s4
554 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0
555 ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q1, q0
556 ; CHECK-MVEFP-NEXT: vpnot
557 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
558 ; CHECK-MVEFP-NEXT: bx lr
560 %i = insertelement <4 x float> undef, float %src2, i32 0
561 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
562 %c = fcmp ugt <4 x float> %src, %sp
563 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
567 define arm_aapcs_vfpcc <4 x float> @vcmp_uge_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
568 ; CHECK-MVE-LABEL: vcmp_uge_v4f32:
569 ; CHECK-MVE: @ %bb.0: @ %entry
570 ; CHECK-MVE-NEXT: vcmpe.f32 s1, s4
571 ; CHECK-MVE-NEXT: movs r1, #0
572 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
573 ; CHECK-MVE-NEXT: it pl
574 ; CHECK-MVE-NEXT: movpl r1, #1
575 ; CHECK-MVE-NEXT: cmp r1, #0
576 ; CHECK-MVE-NEXT: vcmpe.f32 s0, s4
577 ; CHECK-MVE-NEXT: it ne
578 ; CHECK-MVE-NEXT: movne r1, #1
579 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
580 ; CHECK-MVE-NEXT: mov.w r2, #0
581 ; CHECK-MVE-NEXT: vcmpe.f32 s3, s4
582 ; CHECK-MVE-NEXT: it pl
583 ; CHECK-MVE-NEXT: movpl r2, #1
584 ; CHECK-MVE-NEXT: cmp r2, #0
585 ; CHECK-MVE-NEXT: it ne
586 ; CHECK-MVE-NEXT: movne r2, #1
587 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
588 ; CHECK-MVE-NEXT: mov.w r3, #0
589 ; CHECK-MVE-NEXT: vcmpe.f32 s2, s4
590 ; CHECK-MVE-NEXT: it pl
591 ; CHECK-MVE-NEXT: movpl r3, #1
592 ; CHECK-MVE-NEXT: cmp r3, #0
593 ; CHECK-MVE-NEXT: it ne
594 ; CHECK-MVE-NEXT: movne r3, #1
595 ; CHECK-MVE-NEXT: movs r0, #0
596 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
597 ; CHECK-MVE-NEXT: it pl
598 ; CHECK-MVE-NEXT: movpl r0, #1
599 ; CHECK-MVE-NEXT: cmp r0, #0
600 ; CHECK-MVE-NEXT: it ne
601 ; CHECK-MVE-NEXT: movne r0, #1
602 ; CHECK-MVE-NEXT: cmp r3, #0
603 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
604 ; CHECK-MVE-NEXT: cmp r0, #0
605 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
606 ; CHECK-MVE-NEXT: cmp r1, #0
607 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
608 ; CHECK-MVE-NEXT: cmp r2, #0
609 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
610 ; CHECK-MVE-NEXT: bx lr
612 ; CHECK-MVEFP-LABEL: vcmp_uge_v4f32:
613 ; CHECK-MVEFP: @ %bb.0: @ %entry
614 ; CHECK-MVEFP-NEXT: vmov r0, s4
615 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0
616 ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q1, q0
617 ; CHECK-MVEFP-NEXT: vpnot
618 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
619 ; CHECK-MVEFP-NEXT: bx lr
621 %i = insertelement <4 x float> undef, float %src2, i32 0
622 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
623 %c = fcmp uge <4 x float> %src, %sp
624 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
628 define arm_aapcs_vfpcc <4 x float> @vcmp_ult_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
629 ; CHECK-MVE-LABEL: vcmp_ult_v4f32:
630 ; CHECK-MVE: @ %bb.0: @ %entry
631 ; CHECK-MVE-NEXT: vcmpe.f32 s1, s4
632 ; CHECK-MVE-NEXT: movs r1, #0
633 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
634 ; CHECK-MVE-NEXT: it lt
635 ; CHECK-MVE-NEXT: movlt r1, #1
636 ; CHECK-MVE-NEXT: cmp r1, #0
637 ; CHECK-MVE-NEXT: vcmpe.f32 s0, s4
638 ; CHECK-MVE-NEXT: it ne
639 ; CHECK-MVE-NEXT: movne r1, #1
640 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
641 ; CHECK-MVE-NEXT: mov.w r2, #0
642 ; CHECK-MVE-NEXT: vcmpe.f32 s3, s4
643 ; CHECK-MVE-NEXT: it lt
644 ; CHECK-MVE-NEXT: movlt r2, #1
645 ; CHECK-MVE-NEXT: cmp r2, #0
646 ; CHECK-MVE-NEXT: it ne
647 ; CHECK-MVE-NEXT: movne r2, #1
648 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
649 ; CHECK-MVE-NEXT: mov.w r3, #0
650 ; CHECK-MVE-NEXT: vcmpe.f32 s2, s4
651 ; CHECK-MVE-NEXT: it lt
652 ; CHECK-MVE-NEXT: movlt r3, #1
653 ; CHECK-MVE-NEXT: cmp r3, #0
654 ; CHECK-MVE-NEXT: it ne
655 ; CHECK-MVE-NEXT: movne r3, #1
656 ; CHECK-MVE-NEXT: movs r0, #0
657 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
658 ; CHECK-MVE-NEXT: it lt
659 ; CHECK-MVE-NEXT: movlt r0, #1
660 ; CHECK-MVE-NEXT: cmp r0, #0
661 ; CHECK-MVE-NEXT: it ne
662 ; CHECK-MVE-NEXT: movne r0, #1
663 ; CHECK-MVE-NEXT: cmp r3, #0
664 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
665 ; CHECK-MVE-NEXT: cmp r0, #0
666 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
667 ; CHECK-MVE-NEXT: cmp r1, #0
668 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
669 ; CHECK-MVE-NEXT: cmp r2, #0
670 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
671 ; CHECK-MVE-NEXT: bx lr
673 ; CHECK-MVEFP-LABEL: vcmp_ult_v4f32:
674 ; CHECK-MVEFP: @ %bb.0: @ %entry
675 ; CHECK-MVEFP-NEXT: vmov r0, s4
676 ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q0, r0
677 ; CHECK-MVEFP-NEXT: vpnot
678 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
679 ; CHECK-MVEFP-NEXT: bx lr
681 %i = insertelement <4 x float> undef, float %src2, i32 0
682 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
683 %c = fcmp ult <4 x float> %src, %sp
684 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
688 define arm_aapcs_vfpcc <4 x float> @vcmp_ule_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
689 ; CHECK-MVE-LABEL: vcmp_ule_v4f32:
690 ; CHECK-MVE: @ %bb.0: @ %entry
691 ; CHECK-MVE-NEXT: vcmpe.f32 s1, s4
692 ; CHECK-MVE-NEXT: movs r1, #0
693 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
694 ; CHECK-MVE-NEXT: it le
695 ; CHECK-MVE-NEXT: movle r1, #1
696 ; CHECK-MVE-NEXT: cmp r1, #0
697 ; CHECK-MVE-NEXT: vcmpe.f32 s0, s4
698 ; CHECK-MVE-NEXT: it ne
699 ; CHECK-MVE-NEXT: movne r1, #1
700 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
701 ; CHECK-MVE-NEXT: mov.w r2, #0
702 ; CHECK-MVE-NEXT: vcmpe.f32 s3, s4
703 ; CHECK-MVE-NEXT: it le
704 ; CHECK-MVE-NEXT: movle r2, #1
705 ; CHECK-MVE-NEXT: cmp r2, #0
706 ; CHECK-MVE-NEXT: it ne
707 ; CHECK-MVE-NEXT: movne r2, #1
708 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
709 ; CHECK-MVE-NEXT: mov.w r3, #0
710 ; CHECK-MVE-NEXT: vcmpe.f32 s2, s4
711 ; CHECK-MVE-NEXT: it le
712 ; CHECK-MVE-NEXT: movle r3, #1
713 ; CHECK-MVE-NEXT: cmp r3, #0
714 ; CHECK-MVE-NEXT: it ne
715 ; CHECK-MVE-NEXT: movne r3, #1
716 ; CHECK-MVE-NEXT: movs r0, #0
717 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
718 ; CHECK-MVE-NEXT: it le
719 ; CHECK-MVE-NEXT: movle r0, #1
720 ; CHECK-MVE-NEXT: cmp r0, #0
721 ; CHECK-MVE-NEXT: it ne
722 ; CHECK-MVE-NEXT: movne r0, #1
723 ; CHECK-MVE-NEXT: cmp r3, #0
724 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
725 ; CHECK-MVE-NEXT: cmp r0, #0
726 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
727 ; CHECK-MVE-NEXT: cmp r1, #0
728 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
729 ; CHECK-MVE-NEXT: cmp r2, #0
730 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
731 ; CHECK-MVE-NEXT: bx lr
733 ; CHECK-MVEFP-LABEL: vcmp_ule_v4f32:
734 ; CHECK-MVEFP: @ %bb.0: @ %entry
735 ; CHECK-MVEFP-NEXT: vmov r0, s4
736 ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q0, r0
737 ; CHECK-MVEFP-NEXT: vpnot
738 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
739 ; CHECK-MVEFP-NEXT: bx lr
741 %i = insertelement <4 x float> undef, float %src2, i32 0
742 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
743 %c = fcmp ule <4 x float> %src, %sp
744 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
748 define arm_aapcs_vfpcc <4 x float> @vcmp_ord_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
749 ; CHECK-MVE-LABEL: vcmp_ord_v4f32:
750 ; CHECK-MVE: @ %bb.0: @ %entry
751 ; CHECK-MVE-NEXT: vcmpe.f32 s1, s4
752 ; CHECK-MVE-NEXT: movs r1, #0
753 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
754 ; CHECK-MVE-NEXT: it vc
755 ; CHECK-MVE-NEXT: movvc r1, #1
756 ; CHECK-MVE-NEXT: cmp r1, #0
757 ; CHECK-MVE-NEXT: vcmpe.f32 s0, s4
758 ; CHECK-MVE-NEXT: it ne
759 ; CHECK-MVE-NEXT: movne r1, #1
760 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
761 ; CHECK-MVE-NEXT: mov.w r2, #0
762 ; CHECK-MVE-NEXT: vcmpe.f32 s3, s4
763 ; CHECK-MVE-NEXT: it vc
764 ; CHECK-MVE-NEXT: movvc r2, #1
765 ; CHECK-MVE-NEXT: cmp r2, #0
766 ; CHECK-MVE-NEXT: it ne
767 ; CHECK-MVE-NEXT: movne r2, #1
768 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
769 ; CHECK-MVE-NEXT: mov.w r3, #0
770 ; CHECK-MVE-NEXT: vcmpe.f32 s2, s4
771 ; CHECK-MVE-NEXT: it vc
772 ; CHECK-MVE-NEXT: movvc r3, #1
773 ; CHECK-MVE-NEXT: cmp r3, #0
774 ; CHECK-MVE-NEXT: it ne
775 ; CHECK-MVE-NEXT: movne r3, #1
776 ; CHECK-MVE-NEXT: movs r0, #0
777 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
778 ; CHECK-MVE-NEXT: it vc
779 ; CHECK-MVE-NEXT: movvc r0, #1
780 ; CHECK-MVE-NEXT: cmp r0, #0
781 ; CHECK-MVE-NEXT: it ne
782 ; CHECK-MVE-NEXT: movne r0, #1
783 ; CHECK-MVE-NEXT: cmp r3, #0
784 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
785 ; CHECK-MVE-NEXT: cmp r0, #0
786 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
787 ; CHECK-MVE-NEXT: cmp r1, #0
788 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
789 ; CHECK-MVE-NEXT: cmp r2, #0
790 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
791 ; CHECK-MVE-NEXT: bx lr
793 ; CHECK-MVEFP-LABEL: vcmp_ord_v4f32:
794 ; CHECK-MVEFP: @ %bb.0: @ %entry
795 ; CHECK-MVEFP-NEXT: vmov r0, s4
796 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0
797 ; CHECK-MVEFP-NEXT: vcmp.f32 le, q1, q0
798 ; CHECK-MVEFP-NEXT: vpst
799 ; CHECK-MVEFP-NEXT: vcmpt.f32 lt, q0, r0
800 ; CHECK-MVEFP-NEXT: vpnot
801 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
802 ; CHECK-MVEFP-NEXT: bx lr
804 %i = insertelement <4 x float> undef, float %src2, i32 0
805 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
806 %c = fcmp ord <4 x float> %src, %sp
807 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
811 define arm_aapcs_vfpcc <4 x float> @vcmp_uno_v4f32(<4 x float> %src, float %src2, <4 x float> %a, <4 x float> %b) {
812 ; CHECK-MVE-LABEL: vcmp_uno_v4f32:
813 ; CHECK-MVE: @ %bb.0: @ %entry
814 ; CHECK-MVE-NEXT: vcmpe.f32 s1, s4
815 ; CHECK-MVE-NEXT: movs r1, #0
816 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
817 ; CHECK-MVE-NEXT: it vs
818 ; CHECK-MVE-NEXT: movvs r1, #1
819 ; CHECK-MVE-NEXT: cmp r1, #0
820 ; CHECK-MVE-NEXT: vcmpe.f32 s0, s4
821 ; CHECK-MVE-NEXT: it ne
822 ; CHECK-MVE-NEXT: movne r1, #1
823 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
824 ; CHECK-MVE-NEXT: mov.w r2, #0
825 ; CHECK-MVE-NEXT: vcmpe.f32 s3, s4
826 ; CHECK-MVE-NEXT: it vs
827 ; CHECK-MVE-NEXT: movvs r2, #1
828 ; CHECK-MVE-NEXT: cmp r2, #0
829 ; CHECK-MVE-NEXT: it ne
830 ; CHECK-MVE-NEXT: movne r2, #1
831 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
832 ; CHECK-MVE-NEXT: mov.w r3, #0
833 ; CHECK-MVE-NEXT: vcmpe.f32 s2, s4
834 ; CHECK-MVE-NEXT: it vs
835 ; CHECK-MVE-NEXT: movvs r3, #1
836 ; CHECK-MVE-NEXT: cmp r3, #0
837 ; CHECK-MVE-NEXT: it ne
838 ; CHECK-MVE-NEXT: movne r3, #1
839 ; CHECK-MVE-NEXT: movs r0, #0
840 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
841 ; CHECK-MVE-NEXT: it vs
842 ; CHECK-MVE-NEXT: movvs r0, #1
843 ; CHECK-MVE-NEXT: cmp r0, #0
844 ; CHECK-MVE-NEXT: it ne
845 ; CHECK-MVE-NEXT: movne r0, #1
846 ; CHECK-MVE-NEXT: cmp r3, #0
847 ; CHECK-MVE-NEXT: vseleq.f32 s3, s15, s11
848 ; CHECK-MVE-NEXT: cmp r0, #0
849 ; CHECK-MVE-NEXT: vseleq.f32 s2, s14, s10
850 ; CHECK-MVE-NEXT: cmp r1, #0
851 ; CHECK-MVE-NEXT: vseleq.f32 s1, s13, s9
852 ; CHECK-MVE-NEXT: cmp r2, #0
853 ; CHECK-MVE-NEXT: vseleq.f32 s0, s12, s8
854 ; CHECK-MVE-NEXT: bx lr
856 ; CHECK-MVEFP-LABEL: vcmp_uno_v4f32:
857 ; CHECK-MVEFP: @ %bb.0: @ %entry
858 ; CHECK-MVEFP-NEXT: vmov r0, s4
859 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0
860 ; CHECK-MVEFP-NEXT: vcmp.f32 le, q1, q0
861 ; CHECK-MVEFP-NEXT: vpst
862 ; CHECK-MVEFP-NEXT: vcmpt.f32 lt, q0, r0
863 ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3
864 ; CHECK-MVEFP-NEXT: bx lr
866 %i = insertelement <4 x float> undef, float %src2, i32 0
867 %sp = shufflevector <4 x float> %i, <4 x float> undef, <4 x i32> zeroinitializer
868 %c = fcmp uno <4 x float> %src, %sp
869 %s = select <4 x i1> %c, <4 x float> %a, <4 x float> %b
875 define arm_aapcs_vfpcc <8 x half> @vcmp_oeq_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
876 ; CHECK-MVE-LABEL: vcmp_oeq_v8f16:
877 ; CHECK-MVE: @ %bb.0: @ %entry
878 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
879 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
880 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
881 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
882 ; CHECK-MVE-NEXT: movs r0, #0
883 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
884 ; CHECK-MVE-NEXT: vcmp.f16 s12, s16
885 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
886 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
887 ; CHECK-MVE-NEXT: it eq
888 ; CHECK-MVE-NEXT: moveq r0, #1
889 ; CHECK-MVE-NEXT: cmp r0, #0
890 ; CHECK-MVE-NEXT: it ne
891 ; CHECK-MVE-NEXT: movne r0, #1
892 ; CHECK-MVE-NEXT: cmp r0, #0
893 ; CHECK-MVE-NEXT: vcmp.f16 s0, s16
894 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
895 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
896 ; CHECK-MVE-NEXT: mov.w r2, #0
897 ; CHECK-MVE-NEXT: vmov r0, s12
898 ; CHECK-MVE-NEXT: it eq
899 ; CHECK-MVE-NEXT: moveq r2, #1
900 ; CHECK-MVE-NEXT: cmp r2, #0
901 ; CHECK-MVE-NEXT: it ne
902 ; CHECK-MVE-NEXT: movne r2, #1
903 ; CHECK-MVE-NEXT: cmp r2, #0
904 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
905 ; CHECK-MVE-NEXT: vcmp.f16 s1, s16
906 ; CHECK-MVE-NEXT: vmov r2, s12
907 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
908 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
909 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
910 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
911 ; CHECK-MVE-NEXT: mov.w r0, #0
912 ; CHECK-MVE-NEXT: it eq
913 ; CHECK-MVE-NEXT: moveq r0, #1
914 ; CHECK-MVE-NEXT: cmp r0, #0
915 ; CHECK-MVE-NEXT: it ne
916 ; CHECK-MVE-NEXT: movne r0, #1
917 ; CHECK-MVE-NEXT: cmp r0, #0
918 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
919 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
920 ; CHECK-MVE-NEXT: vmov r0, s18
921 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
922 ; CHECK-MVE-NEXT: vcmp.f16 s18, s16
923 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
924 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
925 ; CHECK-MVE-NEXT: mov.w r0, #0
926 ; CHECK-MVE-NEXT: it eq
927 ; CHECK-MVE-NEXT: moveq r0, #1
928 ; CHECK-MVE-NEXT: cmp r0, #0
929 ; CHECK-MVE-NEXT: it ne
930 ; CHECK-MVE-NEXT: movne r0, #1
931 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
932 ; CHECK-MVE-NEXT: cmp r0, #0
933 ; CHECK-MVE-NEXT: vcmp.f16 s2, s16
934 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
935 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
936 ; CHECK-MVE-NEXT: vmov r0, s18
937 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
938 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
939 ; CHECK-MVE-NEXT: mov.w r0, #0
940 ; CHECK-MVE-NEXT: it eq
941 ; CHECK-MVE-NEXT: moveq r0, #1
942 ; CHECK-MVE-NEXT: cmp r0, #0
943 ; CHECK-MVE-NEXT: it ne
944 ; CHECK-MVE-NEXT: movne r0, #1
945 ; CHECK-MVE-NEXT: cmp r0, #0
946 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
947 ; CHECK-MVE-NEXT: movs r1, #0
948 ; CHECK-MVE-NEXT: vmov r0, s18
949 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
950 ; CHECK-MVE-NEXT: vcmp.f16 s18, s16
951 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
952 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
953 ; CHECK-MVE-NEXT: mov.w r0, #0
954 ; CHECK-MVE-NEXT: it eq
955 ; CHECK-MVE-NEXT: moveq r0, #1
956 ; CHECK-MVE-NEXT: cmp r0, #0
957 ; CHECK-MVE-NEXT: it ne
958 ; CHECK-MVE-NEXT: movne r0, #1
959 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
960 ; CHECK-MVE-NEXT: cmp r0, #0
961 ; CHECK-MVE-NEXT: vcmp.f16 s3, s16
962 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
963 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
964 ; CHECK-MVE-NEXT: vmov r0, s18
965 ; CHECK-MVE-NEXT: vcmp.f16 s0, s16
966 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
967 ; CHECK-MVE-NEXT: mov.w r0, #0
968 ; CHECK-MVE-NEXT: it eq
969 ; CHECK-MVE-NEXT: moveq r0, #1
970 ; CHECK-MVE-NEXT: cmp r0, #0
971 ; CHECK-MVE-NEXT: it ne
972 ; CHECK-MVE-NEXT: movne r0, #1
973 ; CHECK-MVE-NEXT: cmp r0, #0
974 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
975 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
976 ; CHECK-MVE-NEXT: it eq
977 ; CHECK-MVE-NEXT: moveq r1, #1
978 ; CHECK-MVE-NEXT: cmp r1, #0
979 ; CHECK-MVE-NEXT: it ne
980 ; CHECK-MVE-NEXT: movne r1, #1
981 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
982 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
983 ; CHECK-MVE-NEXT: cmp r1, #0
984 ; CHECK-MVE-NEXT: vmov r0, s18
985 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
986 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
987 ; CHECK-MVE-NEXT: vmov r0, s0
988 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
989 ; CHECK-MVE-NEXT: vmov q0, q3
990 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
991 ; CHECK-MVE-NEXT: bx lr
993 ; CHECK-MVEFP-LABEL: vcmp_oeq_v8f16:
994 ; CHECK-MVEFP: @ %bb.0: @ %entry
995 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
996 ; CHECK-MVEFP-NEXT: vmov r0, s12
997 ; CHECK-MVEFP-NEXT: vcmp.f16 eq, q0, r0
998 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
999 ; CHECK-MVEFP-NEXT: bx lr
1001 %src2 = load half, half* %src2p
1002 %i = insertelement <8 x half> undef, half %src2, i32 0
1003 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
1004 %c = fcmp oeq <8 x half> %src, %sp
1005 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1009 define arm_aapcs_vfpcc <8 x half> @vcmp_one_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
1010 ; CHECK-MVE-LABEL: vcmp_one_v8f16:
1011 ; CHECK-MVE: @ %bb.0: @ %entry
1012 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
1013 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
1014 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
1015 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1016 ; CHECK-MVE-NEXT: movs r0, #0
1017 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1018 ; CHECK-MVE-NEXT: vcmp.f16 s12, s16
1019 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1020 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1021 ; CHECK-MVE-NEXT: it mi
1022 ; CHECK-MVE-NEXT: movmi r0, #1
1023 ; CHECK-MVE-NEXT: it gt
1024 ; CHECK-MVE-NEXT: movgt r0, #1
1025 ; CHECK-MVE-NEXT: cmp r0, #0
1026 ; CHECK-MVE-NEXT: it ne
1027 ; CHECK-MVE-NEXT: movne r0, #1
1028 ; CHECK-MVE-NEXT: cmp r0, #0
1029 ; CHECK-MVE-NEXT: vcmp.f16 s0, s16
1030 ; CHECK-MVE-NEXT: mov.w r2, #0
1031 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1032 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1033 ; CHECK-MVE-NEXT: it mi
1034 ; CHECK-MVE-NEXT: movmi r2, #1
1035 ; CHECK-MVE-NEXT: vmov r0, s12
1036 ; CHECK-MVE-NEXT: it gt
1037 ; CHECK-MVE-NEXT: movgt r2, #1
1038 ; CHECK-MVE-NEXT: cmp r2, #0
1039 ; CHECK-MVE-NEXT: it ne
1040 ; CHECK-MVE-NEXT: movne r2, #1
1041 ; CHECK-MVE-NEXT: cmp r2, #0
1042 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
1043 ; CHECK-MVE-NEXT: vcmp.f16 s1, s16
1044 ; CHECK-MVE-NEXT: vmov r2, s12
1045 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1046 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
1047 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
1048 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
1049 ; CHECK-MVE-NEXT: mov.w r0, #0
1050 ; CHECK-MVE-NEXT: it mi
1051 ; CHECK-MVE-NEXT: movmi r0, #1
1052 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
1053 ; CHECK-MVE-NEXT: it gt
1054 ; CHECK-MVE-NEXT: movgt r0, #1
1055 ; CHECK-MVE-NEXT: cmp r0, #0
1056 ; CHECK-MVE-NEXT: it ne
1057 ; CHECK-MVE-NEXT: movne r0, #1
1058 ; CHECK-MVE-NEXT: cmp r0, #0
1059 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
1060 ; CHECK-MVE-NEXT: movs r1, #0
1061 ; CHECK-MVE-NEXT: vmov r0, s18
1062 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
1063 ; CHECK-MVE-NEXT: vcmp.f16 s18, s16
1064 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
1065 ; CHECK-MVE-NEXT: movs r0, #0
1066 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1067 ; CHECK-MVE-NEXT: it mi
1068 ; CHECK-MVE-NEXT: movmi r0, #1
1069 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
1070 ; CHECK-MVE-NEXT: it gt
1071 ; CHECK-MVE-NEXT: movgt r0, #1
1072 ; CHECK-MVE-NEXT: cmp r0, #0
1073 ; CHECK-MVE-NEXT: it ne
1074 ; CHECK-MVE-NEXT: movne r0, #1
1075 ; CHECK-MVE-NEXT: cmp r0, #0
1076 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1077 ; CHECK-MVE-NEXT: vcmp.f16 s2, s16
1078 ; CHECK-MVE-NEXT: vmov r0, s18
1079 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1080 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
1081 ; CHECK-MVE-NEXT: mov.w r0, #0
1082 ; CHECK-MVE-NEXT: it mi
1083 ; CHECK-MVE-NEXT: movmi r0, #1
1084 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
1085 ; CHECK-MVE-NEXT: it gt
1086 ; CHECK-MVE-NEXT: movgt r0, #1
1087 ; CHECK-MVE-NEXT: cmp r0, #0
1088 ; CHECK-MVE-NEXT: it ne
1089 ; CHECK-MVE-NEXT: movne r0, #1
1090 ; CHECK-MVE-NEXT: cmp r0, #0
1091 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
1092 ; CHECK-MVE-NEXT: vmov r0, s18
1093 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
1094 ; CHECK-MVE-NEXT: vcmp.f16 s18, s16
1095 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
1096 ; CHECK-MVE-NEXT: movs r0, #0
1097 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1098 ; CHECK-MVE-NEXT: it mi
1099 ; CHECK-MVE-NEXT: movmi r0, #1
1100 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
1101 ; CHECK-MVE-NEXT: it gt
1102 ; CHECK-MVE-NEXT: movgt r0, #1
1103 ; CHECK-MVE-NEXT: cmp r0, #0
1104 ; CHECK-MVE-NEXT: it ne
1105 ; CHECK-MVE-NEXT: movne r0, #1
1106 ; CHECK-MVE-NEXT: cmp r0, #0
1107 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1108 ; CHECK-MVE-NEXT: vcmp.f16 s3, s16
1109 ; CHECK-MVE-NEXT: vmov r0, s18
1110 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1111 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
1112 ; CHECK-MVE-NEXT: mov.w r0, #0
1113 ; CHECK-MVE-NEXT: it mi
1114 ; CHECK-MVE-NEXT: movmi r0, #1
1115 ; CHECK-MVE-NEXT: vcmp.f16 s0, s16
1116 ; CHECK-MVE-NEXT: it gt
1117 ; CHECK-MVE-NEXT: movgt r0, #1
1118 ; CHECK-MVE-NEXT: cmp r0, #0
1119 ; CHECK-MVE-NEXT: it ne
1120 ; CHECK-MVE-NEXT: movne r0, #1
1121 ; CHECK-MVE-NEXT: cmp r0, #0
1122 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
1123 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1124 ; CHECK-MVE-NEXT: it mi
1125 ; CHECK-MVE-NEXT: movmi r1, #1
1126 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
1127 ; CHECK-MVE-NEXT: it gt
1128 ; CHECK-MVE-NEXT: movgt r1, #1
1129 ; CHECK-MVE-NEXT: cmp r1, #0
1130 ; CHECK-MVE-NEXT: it ne
1131 ; CHECK-MVE-NEXT: movne r1, #1
1132 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
1133 ; CHECK-MVE-NEXT: cmp r1, #0
1134 ; CHECK-MVE-NEXT: vmov r0, s18
1135 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
1136 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
1137 ; CHECK-MVE-NEXT: vmov r0, s0
1138 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
1139 ; CHECK-MVE-NEXT: vmov q0, q3
1140 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
1141 ; CHECK-MVE-NEXT: bx lr
1143 ; CHECK-MVEFP-LABEL: vcmp_one_v8f16:
1144 ; CHECK-MVEFP: @ %bb.0: @ %entry
1145 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
1146 ; CHECK-MVEFP-NEXT: vmov r0, s12
1147 ; CHECK-MVEFP-NEXT: vdup.16 q3, r0
1148 ; CHECK-MVEFP-NEXT: vcmp.f16 le, q3, q0
1149 ; CHECK-MVEFP-NEXT: vpst
1150 ; CHECK-MVEFP-NEXT: vcmpt.f16 le, q0, r0
1151 ; CHECK-MVEFP-NEXT: vpnot
1152 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1153 ; CHECK-MVEFP-NEXT: bx lr
1155 %src2 = load half, half* %src2p
1156 %i = insertelement <8 x half> undef, half %src2, i32 0
1157 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
1158 %c = fcmp one <8 x half> %src, %sp
1159 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1163 define arm_aapcs_vfpcc <8 x half> @vcmp_ogt_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
1164 ; CHECK-MVE-LABEL: vcmp_ogt_v8f16:
1165 ; CHECK-MVE: @ %bb.0: @ %entry
1166 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
1167 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
1168 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
1169 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1170 ; CHECK-MVE-NEXT: movs r0, #0
1171 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1172 ; CHECK-MVE-NEXT: vcmpe.f16 s12, s16
1173 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1174 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1175 ; CHECK-MVE-NEXT: it gt
1176 ; CHECK-MVE-NEXT: movgt r0, #1
1177 ; CHECK-MVE-NEXT: cmp r0, #0
1178 ; CHECK-MVE-NEXT: it ne
1179 ; CHECK-MVE-NEXT: movne r0, #1
1180 ; CHECK-MVE-NEXT: cmp r0, #0
1181 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
1182 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1183 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1184 ; CHECK-MVE-NEXT: mov.w r2, #0
1185 ; CHECK-MVE-NEXT: vmov r0, s12
1186 ; CHECK-MVE-NEXT: it gt
1187 ; CHECK-MVE-NEXT: movgt r2, #1
1188 ; CHECK-MVE-NEXT: cmp r2, #0
1189 ; CHECK-MVE-NEXT: it ne
1190 ; CHECK-MVE-NEXT: movne r2, #1
1191 ; CHECK-MVE-NEXT: cmp r2, #0
1192 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
1193 ; CHECK-MVE-NEXT: vcmpe.f16 s1, s16
1194 ; CHECK-MVE-NEXT: vmov r2, s12
1195 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1196 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
1197 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
1198 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
1199 ; CHECK-MVE-NEXT: mov.w r0, #0
1200 ; CHECK-MVE-NEXT: it gt
1201 ; CHECK-MVE-NEXT: movgt r0, #1
1202 ; CHECK-MVE-NEXT: cmp r0, #0
1203 ; CHECK-MVE-NEXT: it ne
1204 ; CHECK-MVE-NEXT: movne r0, #1
1205 ; CHECK-MVE-NEXT: cmp r0, #0
1206 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
1207 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
1208 ; CHECK-MVE-NEXT: vmov r0, s18
1209 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
1210 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
1211 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
1212 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1213 ; CHECK-MVE-NEXT: mov.w r0, #0
1214 ; CHECK-MVE-NEXT: it gt
1215 ; CHECK-MVE-NEXT: movgt r0, #1
1216 ; CHECK-MVE-NEXT: cmp r0, #0
1217 ; CHECK-MVE-NEXT: it ne
1218 ; CHECK-MVE-NEXT: movne r0, #1
1219 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
1220 ; CHECK-MVE-NEXT: cmp r0, #0
1221 ; CHECK-MVE-NEXT: vcmpe.f16 s2, s16
1222 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1223 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1224 ; CHECK-MVE-NEXT: vmov r0, s18
1225 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
1226 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
1227 ; CHECK-MVE-NEXT: mov.w r0, #0
1228 ; CHECK-MVE-NEXT: it gt
1229 ; CHECK-MVE-NEXT: movgt r0, #1
1230 ; CHECK-MVE-NEXT: cmp r0, #0
1231 ; CHECK-MVE-NEXT: it ne
1232 ; CHECK-MVE-NEXT: movne r0, #1
1233 ; CHECK-MVE-NEXT: cmp r0, #0
1234 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
1235 ; CHECK-MVE-NEXT: movs r1, #0
1236 ; CHECK-MVE-NEXT: vmov r0, s18
1237 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
1238 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
1239 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
1240 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1241 ; CHECK-MVE-NEXT: mov.w r0, #0
1242 ; CHECK-MVE-NEXT: it gt
1243 ; CHECK-MVE-NEXT: movgt r0, #1
1244 ; CHECK-MVE-NEXT: cmp r0, #0
1245 ; CHECK-MVE-NEXT: it ne
1246 ; CHECK-MVE-NEXT: movne r0, #1
1247 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
1248 ; CHECK-MVE-NEXT: cmp r0, #0
1249 ; CHECK-MVE-NEXT: vcmpe.f16 s3, s16
1250 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1251 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1252 ; CHECK-MVE-NEXT: vmov r0, s18
1253 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
1254 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
1255 ; CHECK-MVE-NEXT: mov.w r0, #0
1256 ; CHECK-MVE-NEXT: it gt
1257 ; CHECK-MVE-NEXT: movgt r0, #1
1258 ; CHECK-MVE-NEXT: cmp r0, #0
1259 ; CHECK-MVE-NEXT: it ne
1260 ; CHECK-MVE-NEXT: movne r0, #1
1261 ; CHECK-MVE-NEXT: cmp r0, #0
1262 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
1263 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1264 ; CHECK-MVE-NEXT: it gt
1265 ; CHECK-MVE-NEXT: movgt r1, #1
1266 ; CHECK-MVE-NEXT: cmp r1, #0
1267 ; CHECK-MVE-NEXT: it ne
1268 ; CHECK-MVE-NEXT: movne r1, #1
1269 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
1270 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
1271 ; CHECK-MVE-NEXT: cmp r1, #0
1272 ; CHECK-MVE-NEXT: vmov r0, s18
1273 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
1274 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
1275 ; CHECK-MVE-NEXT: vmov r0, s0
1276 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
1277 ; CHECK-MVE-NEXT: vmov q0, q3
1278 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
1279 ; CHECK-MVE-NEXT: bx lr
1281 ; CHECK-MVEFP-LABEL: vcmp_ogt_v8f16:
1282 ; CHECK-MVEFP: @ %bb.0: @ %entry
1283 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
1284 ; CHECK-MVEFP-NEXT: vmov r0, s12
1285 ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q0, r0
1286 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1287 ; CHECK-MVEFP-NEXT: bx lr
1289 %src2 = load half, half* %src2p
1290 %i = insertelement <8 x half> undef, half %src2, i32 0
1291 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
1292 %c = fcmp ogt <8 x half> %src, %sp
1293 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1297 define arm_aapcs_vfpcc <8 x half> @vcmp_oge_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
1298 ; CHECK-MVE-LABEL: vcmp_oge_v8f16:
1299 ; CHECK-MVE: @ %bb.0: @ %entry
1300 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
1301 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
1302 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
1303 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1304 ; CHECK-MVE-NEXT: movs r0, #0
1305 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1306 ; CHECK-MVE-NEXT: vcmpe.f16 s12, s16
1307 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1308 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1309 ; CHECK-MVE-NEXT: it ge
1310 ; CHECK-MVE-NEXT: movge r0, #1
1311 ; CHECK-MVE-NEXT: cmp r0, #0
1312 ; CHECK-MVE-NEXT: it ne
1313 ; CHECK-MVE-NEXT: movne r0, #1
1314 ; CHECK-MVE-NEXT: cmp r0, #0
1315 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
1316 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1317 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1318 ; CHECK-MVE-NEXT: mov.w r2, #0
1319 ; CHECK-MVE-NEXT: vmov r0, s12
1320 ; CHECK-MVE-NEXT: it ge
1321 ; CHECK-MVE-NEXT: movge r2, #1
1322 ; CHECK-MVE-NEXT: cmp r2, #0
1323 ; CHECK-MVE-NEXT: it ne
1324 ; CHECK-MVE-NEXT: movne r2, #1
1325 ; CHECK-MVE-NEXT: cmp r2, #0
1326 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
1327 ; CHECK-MVE-NEXT: vcmpe.f16 s1, s16
1328 ; CHECK-MVE-NEXT: vmov r2, s12
1329 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1330 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
1331 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
1332 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
1333 ; CHECK-MVE-NEXT: mov.w r0, #0
1334 ; CHECK-MVE-NEXT: it ge
1335 ; CHECK-MVE-NEXT: movge r0, #1
1336 ; CHECK-MVE-NEXT: cmp r0, #0
1337 ; CHECK-MVE-NEXT: it ne
1338 ; CHECK-MVE-NEXT: movne r0, #1
1339 ; CHECK-MVE-NEXT: cmp r0, #0
1340 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
1341 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
1342 ; CHECK-MVE-NEXT: vmov r0, s18
1343 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
1344 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
1345 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
1346 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1347 ; CHECK-MVE-NEXT: mov.w r0, #0
1348 ; CHECK-MVE-NEXT: it ge
1349 ; CHECK-MVE-NEXT: movge r0, #1
1350 ; CHECK-MVE-NEXT: cmp r0, #0
1351 ; CHECK-MVE-NEXT: it ne
1352 ; CHECK-MVE-NEXT: movne r0, #1
1353 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
1354 ; CHECK-MVE-NEXT: cmp r0, #0
1355 ; CHECK-MVE-NEXT: vcmpe.f16 s2, s16
1356 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1357 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1358 ; CHECK-MVE-NEXT: vmov r0, s18
1359 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
1360 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
1361 ; CHECK-MVE-NEXT: mov.w r0, #0
1362 ; CHECK-MVE-NEXT: it ge
1363 ; CHECK-MVE-NEXT: movge r0, #1
1364 ; CHECK-MVE-NEXT: cmp r0, #0
1365 ; CHECK-MVE-NEXT: it ne
1366 ; CHECK-MVE-NEXT: movne r0, #1
1367 ; CHECK-MVE-NEXT: cmp r0, #0
1368 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
1369 ; CHECK-MVE-NEXT: movs r1, #0
1370 ; CHECK-MVE-NEXT: vmov r0, s18
1371 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
1372 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
1373 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
1374 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1375 ; CHECK-MVE-NEXT: mov.w r0, #0
1376 ; CHECK-MVE-NEXT: it ge
1377 ; CHECK-MVE-NEXT: movge r0, #1
1378 ; CHECK-MVE-NEXT: cmp r0, #0
1379 ; CHECK-MVE-NEXT: it ne
1380 ; CHECK-MVE-NEXT: movne r0, #1
1381 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
1382 ; CHECK-MVE-NEXT: cmp r0, #0
1383 ; CHECK-MVE-NEXT: vcmpe.f16 s3, s16
1384 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1385 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1386 ; CHECK-MVE-NEXT: vmov r0, s18
1387 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
1388 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
1389 ; CHECK-MVE-NEXT: mov.w r0, #0
1390 ; CHECK-MVE-NEXT: it ge
1391 ; CHECK-MVE-NEXT: movge r0, #1
1392 ; CHECK-MVE-NEXT: cmp r0, #0
1393 ; CHECK-MVE-NEXT: it ne
1394 ; CHECK-MVE-NEXT: movne r0, #1
1395 ; CHECK-MVE-NEXT: cmp r0, #0
1396 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
1397 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1398 ; CHECK-MVE-NEXT: it ge
1399 ; CHECK-MVE-NEXT: movge r1, #1
1400 ; CHECK-MVE-NEXT: cmp r1, #0
1401 ; CHECK-MVE-NEXT: it ne
1402 ; CHECK-MVE-NEXT: movne r1, #1
1403 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
1404 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
1405 ; CHECK-MVE-NEXT: cmp r1, #0
1406 ; CHECK-MVE-NEXT: vmov r0, s18
1407 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
1408 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
1409 ; CHECK-MVE-NEXT: vmov r0, s0
1410 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
1411 ; CHECK-MVE-NEXT: vmov q0, q3
1412 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
1413 ; CHECK-MVE-NEXT: bx lr
1415 ; CHECK-MVEFP-LABEL: vcmp_oge_v8f16:
1416 ; CHECK-MVEFP: @ %bb.0: @ %entry
1417 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
1418 ; CHECK-MVEFP-NEXT: vmov r0, s12
1419 ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q0, r0
1420 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1421 ; CHECK-MVEFP-NEXT: bx lr
1423 %src2 = load half, half* %src2p
1424 %i = insertelement <8 x half> undef, half %src2, i32 0
1425 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
1426 %c = fcmp oge <8 x half> %src, %sp
1427 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1431 define arm_aapcs_vfpcc <8 x half> @vcmp_olt_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
1432 ; CHECK-MVE-LABEL: vcmp_olt_v8f16:
1433 ; CHECK-MVE: @ %bb.0: @ %entry
1434 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
1435 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
1436 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
1437 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1438 ; CHECK-MVE-NEXT: movs r0, #0
1439 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1440 ; CHECK-MVE-NEXT: vcmpe.f16 s12, s16
1441 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1442 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1443 ; CHECK-MVE-NEXT: it mi
1444 ; CHECK-MVE-NEXT: movmi r0, #1
1445 ; CHECK-MVE-NEXT: cmp r0, #0
1446 ; CHECK-MVE-NEXT: it ne
1447 ; CHECK-MVE-NEXT: movne r0, #1
1448 ; CHECK-MVE-NEXT: cmp r0, #0
1449 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
1450 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1451 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1452 ; CHECK-MVE-NEXT: mov.w r2, #0
1453 ; CHECK-MVE-NEXT: vmov r0, s12
1454 ; CHECK-MVE-NEXT: it mi
1455 ; CHECK-MVE-NEXT: movmi r2, #1
1456 ; CHECK-MVE-NEXT: cmp r2, #0
1457 ; CHECK-MVE-NEXT: it ne
1458 ; CHECK-MVE-NEXT: movne r2, #1
1459 ; CHECK-MVE-NEXT: cmp r2, #0
1460 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
1461 ; CHECK-MVE-NEXT: vcmpe.f16 s1, s16
1462 ; CHECK-MVE-NEXT: vmov r2, s12
1463 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1464 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
1465 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
1466 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
1467 ; CHECK-MVE-NEXT: mov.w r0, #0
1468 ; CHECK-MVE-NEXT: it mi
1469 ; CHECK-MVE-NEXT: movmi r0, #1
1470 ; CHECK-MVE-NEXT: cmp r0, #0
1471 ; CHECK-MVE-NEXT: it ne
1472 ; CHECK-MVE-NEXT: movne r0, #1
1473 ; CHECK-MVE-NEXT: cmp r0, #0
1474 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
1475 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
1476 ; CHECK-MVE-NEXT: vmov r0, s18
1477 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
1478 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
1479 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
1480 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1481 ; CHECK-MVE-NEXT: mov.w r0, #0
1482 ; CHECK-MVE-NEXT: it mi
1483 ; CHECK-MVE-NEXT: movmi r0, #1
1484 ; CHECK-MVE-NEXT: cmp r0, #0
1485 ; CHECK-MVE-NEXT: it ne
1486 ; CHECK-MVE-NEXT: movne r0, #1
1487 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
1488 ; CHECK-MVE-NEXT: cmp r0, #0
1489 ; CHECK-MVE-NEXT: vcmpe.f16 s2, s16
1490 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1491 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1492 ; CHECK-MVE-NEXT: vmov r0, s18
1493 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
1494 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
1495 ; CHECK-MVE-NEXT: mov.w r0, #0
1496 ; CHECK-MVE-NEXT: it mi
1497 ; CHECK-MVE-NEXT: movmi r0, #1
1498 ; CHECK-MVE-NEXT: cmp r0, #0
1499 ; CHECK-MVE-NEXT: it ne
1500 ; CHECK-MVE-NEXT: movne r0, #1
1501 ; CHECK-MVE-NEXT: cmp r0, #0
1502 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
1503 ; CHECK-MVE-NEXT: movs r1, #0
1504 ; CHECK-MVE-NEXT: vmov r0, s18
1505 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
1506 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
1507 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
1508 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1509 ; CHECK-MVE-NEXT: mov.w r0, #0
1510 ; CHECK-MVE-NEXT: it mi
1511 ; CHECK-MVE-NEXT: movmi r0, #1
1512 ; CHECK-MVE-NEXT: cmp r0, #0
1513 ; CHECK-MVE-NEXT: it ne
1514 ; CHECK-MVE-NEXT: movne r0, #1
1515 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
1516 ; CHECK-MVE-NEXT: cmp r0, #0
1517 ; CHECK-MVE-NEXT: vcmpe.f16 s3, s16
1518 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1519 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1520 ; CHECK-MVE-NEXT: vmov r0, s18
1521 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
1522 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
1523 ; CHECK-MVE-NEXT: mov.w r0, #0
1524 ; CHECK-MVE-NEXT: it mi
1525 ; CHECK-MVE-NEXT: movmi r0, #1
1526 ; CHECK-MVE-NEXT: cmp r0, #0
1527 ; CHECK-MVE-NEXT: it ne
1528 ; CHECK-MVE-NEXT: movne r0, #1
1529 ; CHECK-MVE-NEXT: cmp r0, #0
1530 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
1531 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1532 ; CHECK-MVE-NEXT: it mi
1533 ; CHECK-MVE-NEXT: movmi r1, #1
1534 ; CHECK-MVE-NEXT: cmp r1, #0
1535 ; CHECK-MVE-NEXT: it ne
1536 ; CHECK-MVE-NEXT: movne r1, #1
1537 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
1538 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
1539 ; CHECK-MVE-NEXT: cmp r1, #0
1540 ; CHECK-MVE-NEXT: vmov r0, s18
1541 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
1542 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
1543 ; CHECK-MVE-NEXT: vmov r0, s0
1544 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
1545 ; CHECK-MVE-NEXT: vmov q0, q3
1546 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
1547 ; CHECK-MVE-NEXT: bx lr
1549 ; CHECK-MVEFP-LABEL: vcmp_olt_v8f16:
1550 ; CHECK-MVEFP: @ %bb.0: @ %entry
1551 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
1552 ; CHECK-MVEFP-NEXT: vmov r0, s12
1553 ; CHECK-MVEFP-NEXT: vdup.16 q3, r0
1554 ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q3, q0
1555 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1556 ; CHECK-MVEFP-NEXT: bx lr
1558 %src2 = load half, half* %src2p
1559 %i = insertelement <8 x half> undef, half %src2, i32 0
1560 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
1561 %c = fcmp olt <8 x half> %src, %sp
1562 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1566 define arm_aapcs_vfpcc <8 x half> @vcmp_ole_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
1567 ; CHECK-MVE-LABEL: vcmp_ole_v8f16:
1568 ; CHECK-MVE: @ %bb.0: @ %entry
1569 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
1570 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
1571 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
1572 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1573 ; CHECK-MVE-NEXT: movs r0, #0
1574 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1575 ; CHECK-MVE-NEXT: vcmpe.f16 s12, s16
1576 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1577 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1578 ; CHECK-MVE-NEXT: it ls
1579 ; CHECK-MVE-NEXT: movls r0, #1
1580 ; CHECK-MVE-NEXT: cmp r0, #0
1581 ; CHECK-MVE-NEXT: it ne
1582 ; CHECK-MVE-NEXT: movne r0, #1
1583 ; CHECK-MVE-NEXT: cmp r0, #0
1584 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
1585 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1586 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1587 ; CHECK-MVE-NEXT: mov.w r2, #0
1588 ; CHECK-MVE-NEXT: vmov r0, s12
1589 ; CHECK-MVE-NEXT: it ls
1590 ; CHECK-MVE-NEXT: movls r2, #1
1591 ; CHECK-MVE-NEXT: cmp r2, #0
1592 ; CHECK-MVE-NEXT: it ne
1593 ; CHECK-MVE-NEXT: movne r2, #1
1594 ; CHECK-MVE-NEXT: cmp r2, #0
1595 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
1596 ; CHECK-MVE-NEXT: vcmpe.f16 s1, s16
1597 ; CHECK-MVE-NEXT: vmov r2, s12
1598 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1599 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
1600 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
1601 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
1602 ; CHECK-MVE-NEXT: mov.w r0, #0
1603 ; CHECK-MVE-NEXT: it ls
1604 ; CHECK-MVE-NEXT: movls r0, #1
1605 ; CHECK-MVE-NEXT: cmp r0, #0
1606 ; CHECK-MVE-NEXT: it ne
1607 ; CHECK-MVE-NEXT: movne r0, #1
1608 ; CHECK-MVE-NEXT: cmp r0, #0
1609 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
1610 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
1611 ; CHECK-MVE-NEXT: vmov r0, s18
1612 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
1613 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
1614 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
1615 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1616 ; CHECK-MVE-NEXT: mov.w r0, #0
1617 ; CHECK-MVE-NEXT: it ls
1618 ; CHECK-MVE-NEXT: movls r0, #1
1619 ; CHECK-MVE-NEXT: cmp r0, #0
1620 ; CHECK-MVE-NEXT: it ne
1621 ; CHECK-MVE-NEXT: movne r0, #1
1622 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
1623 ; CHECK-MVE-NEXT: cmp r0, #0
1624 ; CHECK-MVE-NEXT: vcmpe.f16 s2, s16
1625 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1626 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1627 ; CHECK-MVE-NEXT: vmov r0, s18
1628 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
1629 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
1630 ; CHECK-MVE-NEXT: mov.w r0, #0
1631 ; CHECK-MVE-NEXT: it ls
1632 ; CHECK-MVE-NEXT: movls r0, #1
1633 ; CHECK-MVE-NEXT: cmp r0, #0
1634 ; CHECK-MVE-NEXT: it ne
1635 ; CHECK-MVE-NEXT: movne r0, #1
1636 ; CHECK-MVE-NEXT: cmp r0, #0
1637 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
1638 ; CHECK-MVE-NEXT: movs r1, #0
1639 ; CHECK-MVE-NEXT: vmov r0, s18
1640 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
1641 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
1642 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
1643 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1644 ; CHECK-MVE-NEXT: mov.w r0, #0
1645 ; CHECK-MVE-NEXT: it ls
1646 ; CHECK-MVE-NEXT: movls r0, #1
1647 ; CHECK-MVE-NEXT: cmp r0, #0
1648 ; CHECK-MVE-NEXT: it ne
1649 ; CHECK-MVE-NEXT: movne r0, #1
1650 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
1651 ; CHECK-MVE-NEXT: cmp r0, #0
1652 ; CHECK-MVE-NEXT: vcmpe.f16 s3, s16
1653 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1654 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1655 ; CHECK-MVE-NEXT: vmov r0, s18
1656 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
1657 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
1658 ; CHECK-MVE-NEXT: mov.w r0, #0
1659 ; CHECK-MVE-NEXT: it ls
1660 ; CHECK-MVE-NEXT: movls r0, #1
1661 ; CHECK-MVE-NEXT: cmp r0, #0
1662 ; CHECK-MVE-NEXT: it ne
1663 ; CHECK-MVE-NEXT: movne r0, #1
1664 ; CHECK-MVE-NEXT: cmp r0, #0
1665 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
1666 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1667 ; CHECK-MVE-NEXT: it ls
1668 ; CHECK-MVE-NEXT: movls r1, #1
1669 ; CHECK-MVE-NEXT: cmp r1, #0
1670 ; CHECK-MVE-NEXT: it ne
1671 ; CHECK-MVE-NEXT: movne r1, #1
1672 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
1673 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
1674 ; CHECK-MVE-NEXT: cmp r1, #0
1675 ; CHECK-MVE-NEXT: vmov r0, s18
1676 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
1677 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
1678 ; CHECK-MVE-NEXT: vmov r0, s0
1679 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
1680 ; CHECK-MVE-NEXT: vmov q0, q3
1681 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
1682 ; CHECK-MVE-NEXT: bx lr
1684 ; CHECK-MVEFP-LABEL: vcmp_ole_v8f16:
1685 ; CHECK-MVEFP: @ %bb.0: @ %entry
1686 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
1687 ; CHECK-MVEFP-NEXT: vmov r0, s12
1688 ; CHECK-MVEFP-NEXT: vdup.16 q3, r0
1689 ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q3, q0
1690 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1691 ; CHECK-MVEFP-NEXT: bx lr
1693 %src2 = load half, half* %src2p
1694 %i = insertelement <8 x half> undef, half %src2, i32 0
1695 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
1696 %c = fcmp ole <8 x half> %src, %sp
1697 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1701 define arm_aapcs_vfpcc <8 x half> @vcmp_ueq_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
1702 ; CHECK-MVE-LABEL: vcmp_ueq_v8f16:
1703 ; CHECK-MVE: @ %bb.0: @ %entry
1704 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
1705 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
1706 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
1707 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1708 ; CHECK-MVE-NEXT: movs r0, #0
1709 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1710 ; CHECK-MVE-NEXT: vcmp.f16 s12, s16
1711 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1712 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1713 ; CHECK-MVE-NEXT: it eq
1714 ; CHECK-MVE-NEXT: moveq r0, #1
1715 ; CHECK-MVE-NEXT: it vs
1716 ; CHECK-MVE-NEXT: movvs r0, #1
1717 ; CHECK-MVE-NEXT: cmp r0, #0
1718 ; CHECK-MVE-NEXT: it ne
1719 ; CHECK-MVE-NEXT: movne r0, #1
1720 ; CHECK-MVE-NEXT: cmp r0, #0
1721 ; CHECK-MVE-NEXT: vcmp.f16 s0, s16
1722 ; CHECK-MVE-NEXT: mov.w r2, #0
1723 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1724 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1725 ; CHECK-MVE-NEXT: it eq
1726 ; CHECK-MVE-NEXT: moveq r2, #1
1727 ; CHECK-MVE-NEXT: vmov r0, s12
1728 ; CHECK-MVE-NEXT: it vs
1729 ; CHECK-MVE-NEXT: movvs r2, #1
1730 ; CHECK-MVE-NEXT: cmp r2, #0
1731 ; CHECK-MVE-NEXT: it ne
1732 ; CHECK-MVE-NEXT: movne r2, #1
1733 ; CHECK-MVE-NEXT: cmp r2, #0
1734 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
1735 ; CHECK-MVE-NEXT: vcmp.f16 s1, s16
1736 ; CHECK-MVE-NEXT: vmov r2, s12
1737 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1738 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
1739 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
1740 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
1741 ; CHECK-MVE-NEXT: mov.w r0, #0
1742 ; CHECK-MVE-NEXT: it eq
1743 ; CHECK-MVE-NEXT: moveq r0, #1
1744 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
1745 ; CHECK-MVE-NEXT: it vs
1746 ; CHECK-MVE-NEXT: movvs r0, #1
1747 ; CHECK-MVE-NEXT: cmp r0, #0
1748 ; CHECK-MVE-NEXT: it ne
1749 ; CHECK-MVE-NEXT: movne r0, #1
1750 ; CHECK-MVE-NEXT: cmp r0, #0
1751 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
1752 ; CHECK-MVE-NEXT: movs r1, #0
1753 ; CHECK-MVE-NEXT: vmov r0, s18
1754 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
1755 ; CHECK-MVE-NEXT: vcmp.f16 s18, s16
1756 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
1757 ; CHECK-MVE-NEXT: movs r0, #0
1758 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1759 ; CHECK-MVE-NEXT: it eq
1760 ; CHECK-MVE-NEXT: moveq r0, #1
1761 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
1762 ; CHECK-MVE-NEXT: it vs
1763 ; CHECK-MVE-NEXT: movvs r0, #1
1764 ; CHECK-MVE-NEXT: cmp r0, #0
1765 ; CHECK-MVE-NEXT: it ne
1766 ; CHECK-MVE-NEXT: movne r0, #1
1767 ; CHECK-MVE-NEXT: cmp r0, #0
1768 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1769 ; CHECK-MVE-NEXT: vcmp.f16 s2, s16
1770 ; CHECK-MVE-NEXT: vmov r0, s18
1771 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1772 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
1773 ; CHECK-MVE-NEXT: mov.w r0, #0
1774 ; CHECK-MVE-NEXT: it eq
1775 ; CHECK-MVE-NEXT: moveq r0, #1
1776 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
1777 ; CHECK-MVE-NEXT: it vs
1778 ; CHECK-MVE-NEXT: movvs r0, #1
1779 ; CHECK-MVE-NEXT: cmp r0, #0
1780 ; CHECK-MVE-NEXT: it ne
1781 ; CHECK-MVE-NEXT: movne r0, #1
1782 ; CHECK-MVE-NEXT: cmp r0, #0
1783 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
1784 ; CHECK-MVE-NEXT: vmov r0, s18
1785 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
1786 ; CHECK-MVE-NEXT: vcmp.f16 s18, s16
1787 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
1788 ; CHECK-MVE-NEXT: movs r0, #0
1789 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1790 ; CHECK-MVE-NEXT: it eq
1791 ; CHECK-MVE-NEXT: moveq r0, #1
1792 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
1793 ; CHECK-MVE-NEXT: it vs
1794 ; CHECK-MVE-NEXT: movvs r0, #1
1795 ; CHECK-MVE-NEXT: cmp r0, #0
1796 ; CHECK-MVE-NEXT: it ne
1797 ; CHECK-MVE-NEXT: movne r0, #1
1798 ; CHECK-MVE-NEXT: cmp r0, #0
1799 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1800 ; CHECK-MVE-NEXT: vcmp.f16 s3, s16
1801 ; CHECK-MVE-NEXT: vmov r0, s18
1802 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1803 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
1804 ; CHECK-MVE-NEXT: mov.w r0, #0
1805 ; CHECK-MVE-NEXT: it eq
1806 ; CHECK-MVE-NEXT: moveq r0, #1
1807 ; CHECK-MVE-NEXT: vcmp.f16 s0, s16
1808 ; CHECK-MVE-NEXT: it vs
1809 ; CHECK-MVE-NEXT: movvs r0, #1
1810 ; CHECK-MVE-NEXT: cmp r0, #0
1811 ; CHECK-MVE-NEXT: it ne
1812 ; CHECK-MVE-NEXT: movne r0, #1
1813 ; CHECK-MVE-NEXT: cmp r0, #0
1814 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
1815 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1816 ; CHECK-MVE-NEXT: it eq
1817 ; CHECK-MVE-NEXT: moveq r1, #1
1818 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
1819 ; CHECK-MVE-NEXT: it vs
1820 ; CHECK-MVE-NEXT: movvs r1, #1
1821 ; CHECK-MVE-NEXT: cmp r1, #0
1822 ; CHECK-MVE-NEXT: it ne
1823 ; CHECK-MVE-NEXT: movne r1, #1
1824 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
1825 ; CHECK-MVE-NEXT: cmp r1, #0
1826 ; CHECK-MVE-NEXT: vmov r0, s18
1827 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
1828 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
1829 ; CHECK-MVE-NEXT: vmov r0, s0
1830 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
1831 ; CHECK-MVE-NEXT: vmov q0, q3
1832 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
1833 ; CHECK-MVE-NEXT: bx lr
1835 ; CHECK-MVEFP-LABEL: vcmp_ueq_v8f16:
1836 ; CHECK-MVEFP: @ %bb.0: @ %entry
1837 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
1838 ; CHECK-MVEFP-NEXT: vmov r0, s12
1839 ; CHECK-MVEFP-NEXT: vdup.16 q3, r0
1840 ; CHECK-MVEFP-NEXT: vcmp.f16 le, q3, q0
1841 ; CHECK-MVEFP-NEXT: vpst
1842 ; CHECK-MVEFP-NEXT: vcmpt.f16 le, q0, r0
1843 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1844 ; CHECK-MVEFP-NEXT: bx lr
1846 %src2 = load half, half* %src2p
1847 %i = insertelement <8 x half> undef, half %src2, i32 0
1848 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
1849 %c = fcmp ueq <8 x half> %src, %sp
1850 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1854 define arm_aapcs_vfpcc <8 x half> @vcmp_une_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
1855 ; CHECK-MVE-LABEL: vcmp_une_v8f16:
1856 ; CHECK-MVE: @ %bb.0: @ %entry
1857 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
1858 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
1859 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
1860 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1861 ; CHECK-MVE-NEXT: movs r0, #0
1862 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1863 ; CHECK-MVE-NEXT: vcmp.f16 s12, s16
1864 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1865 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1866 ; CHECK-MVE-NEXT: it ne
1867 ; CHECK-MVE-NEXT: movne r0, #1
1868 ; CHECK-MVE-NEXT: cmp r0, #0
1869 ; CHECK-MVE-NEXT: it ne
1870 ; CHECK-MVE-NEXT: movne r0, #1
1871 ; CHECK-MVE-NEXT: cmp r0, #0
1872 ; CHECK-MVE-NEXT: vcmp.f16 s0, s16
1873 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
1874 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1875 ; CHECK-MVE-NEXT: mov.w r2, #0
1876 ; CHECK-MVE-NEXT: vmov r0, s12
1877 ; CHECK-MVE-NEXT: it ne
1878 ; CHECK-MVE-NEXT: movne r2, #1
1879 ; CHECK-MVE-NEXT: cmp r2, #0
1880 ; CHECK-MVE-NEXT: it ne
1881 ; CHECK-MVE-NEXT: movne r2, #1
1882 ; CHECK-MVE-NEXT: cmp r2, #0
1883 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
1884 ; CHECK-MVE-NEXT: vcmp.f16 s1, s16
1885 ; CHECK-MVE-NEXT: vmov r2, s12
1886 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1887 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
1888 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
1889 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
1890 ; CHECK-MVE-NEXT: mov.w r0, #0
1891 ; CHECK-MVE-NEXT: it ne
1892 ; CHECK-MVE-NEXT: movne r0, #1
1893 ; CHECK-MVE-NEXT: cmp r0, #0
1894 ; CHECK-MVE-NEXT: it ne
1895 ; CHECK-MVE-NEXT: movne r0, #1
1896 ; CHECK-MVE-NEXT: cmp r0, #0
1897 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
1898 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
1899 ; CHECK-MVE-NEXT: vmov r0, s18
1900 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
1901 ; CHECK-MVE-NEXT: vcmp.f16 s18, s16
1902 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
1903 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1904 ; CHECK-MVE-NEXT: mov.w r0, #0
1905 ; CHECK-MVE-NEXT: it ne
1906 ; CHECK-MVE-NEXT: movne r0, #1
1907 ; CHECK-MVE-NEXT: cmp r0, #0
1908 ; CHECK-MVE-NEXT: it ne
1909 ; CHECK-MVE-NEXT: movne r0, #1
1910 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
1911 ; CHECK-MVE-NEXT: cmp r0, #0
1912 ; CHECK-MVE-NEXT: vcmp.f16 s2, s16
1913 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1914 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1915 ; CHECK-MVE-NEXT: vmov r0, s18
1916 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
1917 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
1918 ; CHECK-MVE-NEXT: mov.w r0, #0
1919 ; CHECK-MVE-NEXT: it ne
1920 ; CHECK-MVE-NEXT: movne r0, #1
1921 ; CHECK-MVE-NEXT: cmp r0, #0
1922 ; CHECK-MVE-NEXT: it ne
1923 ; CHECK-MVE-NEXT: movne r0, #1
1924 ; CHECK-MVE-NEXT: cmp r0, #0
1925 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
1926 ; CHECK-MVE-NEXT: movs r1, #0
1927 ; CHECK-MVE-NEXT: vmov r0, s18
1928 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
1929 ; CHECK-MVE-NEXT: vcmp.f16 s18, s16
1930 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
1931 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1932 ; CHECK-MVE-NEXT: mov.w r0, #0
1933 ; CHECK-MVE-NEXT: it ne
1934 ; CHECK-MVE-NEXT: movne r0, #1
1935 ; CHECK-MVE-NEXT: cmp r0, #0
1936 ; CHECK-MVE-NEXT: it ne
1937 ; CHECK-MVE-NEXT: movne r0, #1
1938 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
1939 ; CHECK-MVE-NEXT: cmp r0, #0
1940 ; CHECK-MVE-NEXT: vcmp.f16 s3, s16
1941 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
1942 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1943 ; CHECK-MVE-NEXT: vmov r0, s18
1944 ; CHECK-MVE-NEXT: vcmp.f16 s0, s16
1945 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
1946 ; CHECK-MVE-NEXT: mov.w r0, #0
1947 ; CHECK-MVE-NEXT: it ne
1948 ; CHECK-MVE-NEXT: movne r0, #1
1949 ; CHECK-MVE-NEXT: cmp r0, #0
1950 ; CHECK-MVE-NEXT: it ne
1951 ; CHECK-MVE-NEXT: movne r0, #1
1952 ; CHECK-MVE-NEXT: cmp r0, #0
1953 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
1954 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1955 ; CHECK-MVE-NEXT: it ne
1956 ; CHECK-MVE-NEXT: movne r1, #1
1957 ; CHECK-MVE-NEXT: cmp r1, #0
1958 ; CHECK-MVE-NEXT: it ne
1959 ; CHECK-MVE-NEXT: movne r1, #1
1960 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
1961 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
1962 ; CHECK-MVE-NEXT: cmp r1, #0
1963 ; CHECK-MVE-NEXT: vmov r0, s18
1964 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
1965 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
1966 ; CHECK-MVE-NEXT: vmov r0, s0
1967 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
1968 ; CHECK-MVE-NEXT: vmov q0, q3
1969 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
1970 ; CHECK-MVE-NEXT: bx lr
1972 ; CHECK-MVEFP-LABEL: vcmp_une_v8f16:
1973 ; CHECK-MVEFP: @ %bb.0: @ %entry
1974 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
1975 ; CHECK-MVEFP-NEXT: vmov r0, s12
1976 ; CHECK-MVEFP-NEXT: vcmp.f16 ne, q0, r0
1977 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
1978 ; CHECK-MVEFP-NEXT: bx lr
1980 %src2 = load half, half* %src2p
1981 %i = insertelement <8 x half> undef, half %src2, i32 0
1982 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
1983 %c = fcmp une <8 x half> %src, %sp
1984 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
1988 define arm_aapcs_vfpcc <8 x half> @vcmp_ugt_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
1989 ; CHECK-MVE-LABEL: vcmp_ugt_v8f16:
1990 ; CHECK-MVE: @ %bb.0: @ %entry
1991 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
1992 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
1993 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
1994 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
1995 ; CHECK-MVE-NEXT: movs r0, #0
1996 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
1997 ; CHECK-MVE-NEXT: vcmpe.f16 s12, s16
1998 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
1999 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2000 ; CHECK-MVE-NEXT: it hi
2001 ; CHECK-MVE-NEXT: movhi r0, #1
2002 ; CHECK-MVE-NEXT: cmp r0, #0
2003 ; CHECK-MVE-NEXT: it ne
2004 ; CHECK-MVE-NEXT: movne r0, #1
2005 ; CHECK-MVE-NEXT: cmp r0, #0
2006 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
2007 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
2008 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2009 ; CHECK-MVE-NEXT: mov.w r2, #0
2010 ; CHECK-MVE-NEXT: vmov r0, s12
2011 ; CHECK-MVE-NEXT: it hi
2012 ; CHECK-MVE-NEXT: movhi r2, #1
2013 ; CHECK-MVE-NEXT: cmp r2, #0
2014 ; CHECK-MVE-NEXT: it ne
2015 ; CHECK-MVE-NEXT: movne r2, #1
2016 ; CHECK-MVE-NEXT: cmp r2, #0
2017 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
2018 ; CHECK-MVE-NEXT: vcmpe.f16 s1, s16
2019 ; CHECK-MVE-NEXT: vmov r2, s12
2020 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2021 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
2022 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
2023 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
2024 ; CHECK-MVE-NEXT: mov.w r0, #0
2025 ; CHECK-MVE-NEXT: it hi
2026 ; CHECK-MVE-NEXT: movhi r0, #1
2027 ; CHECK-MVE-NEXT: cmp r0, #0
2028 ; CHECK-MVE-NEXT: it ne
2029 ; CHECK-MVE-NEXT: movne r0, #1
2030 ; CHECK-MVE-NEXT: cmp r0, #0
2031 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
2032 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
2033 ; CHECK-MVE-NEXT: vmov r0, s18
2034 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
2035 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
2036 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
2037 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2038 ; CHECK-MVE-NEXT: mov.w r0, #0
2039 ; CHECK-MVE-NEXT: it hi
2040 ; CHECK-MVE-NEXT: movhi r0, #1
2041 ; CHECK-MVE-NEXT: cmp r0, #0
2042 ; CHECK-MVE-NEXT: it ne
2043 ; CHECK-MVE-NEXT: movne r0, #1
2044 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
2045 ; CHECK-MVE-NEXT: cmp r0, #0
2046 ; CHECK-MVE-NEXT: vcmpe.f16 s2, s16
2047 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
2048 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2049 ; CHECK-MVE-NEXT: vmov r0, s18
2050 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
2051 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
2052 ; CHECK-MVE-NEXT: mov.w r0, #0
2053 ; CHECK-MVE-NEXT: it hi
2054 ; CHECK-MVE-NEXT: movhi r0, #1
2055 ; CHECK-MVE-NEXT: cmp r0, #0
2056 ; CHECK-MVE-NEXT: it ne
2057 ; CHECK-MVE-NEXT: movne r0, #1
2058 ; CHECK-MVE-NEXT: cmp r0, #0
2059 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
2060 ; CHECK-MVE-NEXT: movs r1, #0
2061 ; CHECK-MVE-NEXT: vmov r0, s18
2062 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
2063 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
2064 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
2065 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2066 ; CHECK-MVE-NEXT: mov.w r0, #0
2067 ; CHECK-MVE-NEXT: it hi
2068 ; CHECK-MVE-NEXT: movhi r0, #1
2069 ; CHECK-MVE-NEXT: cmp r0, #0
2070 ; CHECK-MVE-NEXT: it ne
2071 ; CHECK-MVE-NEXT: movne r0, #1
2072 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
2073 ; CHECK-MVE-NEXT: cmp r0, #0
2074 ; CHECK-MVE-NEXT: vcmpe.f16 s3, s16
2075 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
2076 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2077 ; CHECK-MVE-NEXT: vmov r0, s18
2078 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
2079 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
2080 ; CHECK-MVE-NEXT: mov.w r0, #0
2081 ; CHECK-MVE-NEXT: it hi
2082 ; CHECK-MVE-NEXT: movhi r0, #1
2083 ; CHECK-MVE-NEXT: cmp r0, #0
2084 ; CHECK-MVE-NEXT: it ne
2085 ; CHECK-MVE-NEXT: movne r0, #1
2086 ; CHECK-MVE-NEXT: cmp r0, #0
2087 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
2088 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2089 ; CHECK-MVE-NEXT: it hi
2090 ; CHECK-MVE-NEXT: movhi r1, #1
2091 ; CHECK-MVE-NEXT: cmp r1, #0
2092 ; CHECK-MVE-NEXT: it ne
2093 ; CHECK-MVE-NEXT: movne r1, #1
2094 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
2095 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
2096 ; CHECK-MVE-NEXT: cmp r1, #0
2097 ; CHECK-MVE-NEXT: vmov r0, s18
2098 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
2099 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
2100 ; CHECK-MVE-NEXT: vmov r0, s0
2101 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
2102 ; CHECK-MVE-NEXT: vmov q0, q3
2103 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
2104 ; CHECK-MVE-NEXT: bx lr
2106 ; CHECK-MVEFP-LABEL: vcmp_ugt_v8f16:
2107 ; CHECK-MVEFP: @ %bb.0: @ %entry
2108 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
2109 ; CHECK-MVEFP-NEXT: vmov r0, s12
2110 ; CHECK-MVEFP-NEXT: vdup.16 q3, r0
2111 ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q3, q0
2112 ; CHECK-MVEFP-NEXT: vpnot
2113 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2114 ; CHECK-MVEFP-NEXT: bx lr
2116 %src2 = load half, half* %src2p
2117 %i = insertelement <8 x half> undef, half %src2, i32 0
2118 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
2119 %c = fcmp ugt <8 x half> %src, %sp
2120 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
2124 define arm_aapcs_vfpcc <8 x half> @vcmp_uge_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
2125 ; CHECK-MVE-LABEL: vcmp_uge_v8f16:
2126 ; CHECK-MVE: @ %bb.0: @ %entry
2127 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
2128 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
2129 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
2130 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
2131 ; CHECK-MVE-NEXT: movs r0, #0
2132 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
2133 ; CHECK-MVE-NEXT: vcmpe.f16 s12, s16
2134 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
2135 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2136 ; CHECK-MVE-NEXT: it pl
2137 ; CHECK-MVE-NEXT: movpl r0, #1
2138 ; CHECK-MVE-NEXT: cmp r0, #0
2139 ; CHECK-MVE-NEXT: it ne
2140 ; CHECK-MVE-NEXT: movne r0, #1
2141 ; CHECK-MVE-NEXT: cmp r0, #0
2142 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
2143 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
2144 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2145 ; CHECK-MVE-NEXT: mov.w r2, #0
2146 ; CHECK-MVE-NEXT: vmov r0, s12
2147 ; CHECK-MVE-NEXT: it pl
2148 ; CHECK-MVE-NEXT: movpl r2, #1
2149 ; CHECK-MVE-NEXT: cmp r2, #0
2150 ; CHECK-MVE-NEXT: it ne
2151 ; CHECK-MVE-NEXT: movne r2, #1
2152 ; CHECK-MVE-NEXT: cmp r2, #0
2153 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
2154 ; CHECK-MVE-NEXT: vcmpe.f16 s1, s16
2155 ; CHECK-MVE-NEXT: vmov r2, s12
2156 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2157 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
2158 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
2159 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
2160 ; CHECK-MVE-NEXT: mov.w r0, #0
2161 ; CHECK-MVE-NEXT: it pl
2162 ; CHECK-MVE-NEXT: movpl r0, #1
2163 ; CHECK-MVE-NEXT: cmp r0, #0
2164 ; CHECK-MVE-NEXT: it ne
2165 ; CHECK-MVE-NEXT: movne r0, #1
2166 ; CHECK-MVE-NEXT: cmp r0, #0
2167 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
2168 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
2169 ; CHECK-MVE-NEXT: vmov r0, s18
2170 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
2171 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
2172 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
2173 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2174 ; CHECK-MVE-NEXT: mov.w r0, #0
2175 ; CHECK-MVE-NEXT: it pl
2176 ; CHECK-MVE-NEXT: movpl r0, #1
2177 ; CHECK-MVE-NEXT: cmp r0, #0
2178 ; CHECK-MVE-NEXT: it ne
2179 ; CHECK-MVE-NEXT: movne r0, #1
2180 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
2181 ; CHECK-MVE-NEXT: cmp r0, #0
2182 ; CHECK-MVE-NEXT: vcmpe.f16 s2, s16
2183 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
2184 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2185 ; CHECK-MVE-NEXT: vmov r0, s18
2186 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
2187 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
2188 ; CHECK-MVE-NEXT: mov.w r0, #0
2189 ; CHECK-MVE-NEXT: it pl
2190 ; CHECK-MVE-NEXT: movpl r0, #1
2191 ; CHECK-MVE-NEXT: cmp r0, #0
2192 ; CHECK-MVE-NEXT: it ne
2193 ; CHECK-MVE-NEXT: movne r0, #1
2194 ; CHECK-MVE-NEXT: cmp r0, #0
2195 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
2196 ; CHECK-MVE-NEXT: movs r1, #0
2197 ; CHECK-MVE-NEXT: vmov r0, s18
2198 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
2199 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
2200 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
2201 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2202 ; CHECK-MVE-NEXT: mov.w r0, #0
2203 ; CHECK-MVE-NEXT: it pl
2204 ; CHECK-MVE-NEXT: movpl r0, #1
2205 ; CHECK-MVE-NEXT: cmp r0, #0
2206 ; CHECK-MVE-NEXT: it ne
2207 ; CHECK-MVE-NEXT: movne r0, #1
2208 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
2209 ; CHECK-MVE-NEXT: cmp r0, #0
2210 ; CHECK-MVE-NEXT: vcmpe.f16 s3, s16
2211 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
2212 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2213 ; CHECK-MVE-NEXT: vmov r0, s18
2214 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
2215 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
2216 ; CHECK-MVE-NEXT: mov.w r0, #0
2217 ; CHECK-MVE-NEXT: it pl
2218 ; CHECK-MVE-NEXT: movpl r0, #1
2219 ; CHECK-MVE-NEXT: cmp r0, #0
2220 ; CHECK-MVE-NEXT: it ne
2221 ; CHECK-MVE-NEXT: movne r0, #1
2222 ; CHECK-MVE-NEXT: cmp r0, #0
2223 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
2224 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2225 ; CHECK-MVE-NEXT: it pl
2226 ; CHECK-MVE-NEXT: movpl r1, #1
2227 ; CHECK-MVE-NEXT: cmp r1, #0
2228 ; CHECK-MVE-NEXT: it ne
2229 ; CHECK-MVE-NEXT: movne r1, #1
2230 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
2231 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
2232 ; CHECK-MVE-NEXT: cmp r1, #0
2233 ; CHECK-MVE-NEXT: vmov r0, s18
2234 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
2235 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
2236 ; CHECK-MVE-NEXT: vmov r0, s0
2237 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
2238 ; CHECK-MVE-NEXT: vmov q0, q3
2239 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
2240 ; CHECK-MVE-NEXT: bx lr
2242 ; CHECK-MVEFP-LABEL: vcmp_uge_v8f16:
2243 ; CHECK-MVEFP: @ %bb.0: @ %entry
2244 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
2245 ; CHECK-MVEFP-NEXT: vmov r0, s12
2246 ; CHECK-MVEFP-NEXT: vdup.16 q3, r0
2247 ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q3, q0
2248 ; CHECK-MVEFP-NEXT: vpnot
2249 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2250 ; CHECK-MVEFP-NEXT: bx lr
2252 %src2 = load half, half* %src2p
2253 %i = insertelement <8 x half> undef, half %src2, i32 0
2254 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
2255 %c = fcmp uge <8 x half> %src, %sp
2256 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
2260 define arm_aapcs_vfpcc <8 x half> @vcmp_ult_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
2261 ; CHECK-MVE-LABEL: vcmp_ult_v8f16:
2262 ; CHECK-MVE: @ %bb.0: @ %entry
2263 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
2264 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
2265 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
2266 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
2267 ; CHECK-MVE-NEXT: movs r0, #0
2268 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
2269 ; CHECK-MVE-NEXT: vcmpe.f16 s12, s16
2270 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
2271 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2272 ; CHECK-MVE-NEXT: it lt
2273 ; CHECK-MVE-NEXT: movlt r0, #1
2274 ; CHECK-MVE-NEXT: cmp r0, #0
2275 ; CHECK-MVE-NEXT: it ne
2276 ; CHECK-MVE-NEXT: movne r0, #1
2277 ; CHECK-MVE-NEXT: cmp r0, #0
2278 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
2279 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
2280 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2281 ; CHECK-MVE-NEXT: mov.w r2, #0
2282 ; CHECK-MVE-NEXT: vmov r0, s12
2283 ; CHECK-MVE-NEXT: it lt
2284 ; CHECK-MVE-NEXT: movlt r2, #1
2285 ; CHECK-MVE-NEXT: cmp r2, #0
2286 ; CHECK-MVE-NEXT: it ne
2287 ; CHECK-MVE-NEXT: movne r2, #1
2288 ; CHECK-MVE-NEXT: cmp r2, #0
2289 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
2290 ; CHECK-MVE-NEXT: vcmpe.f16 s1, s16
2291 ; CHECK-MVE-NEXT: vmov r2, s12
2292 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2293 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
2294 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
2295 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
2296 ; CHECK-MVE-NEXT: mov.w r0, #0
2297 ; CHECK-MVE-NEXT: it lt
2298 ; CHECK-MVE-NEXT: movlt r0, #1
2299 ; CHECK-MVE-NEXT: cmp r0, #0
2300 ; CHECK-MVE-NEXT: it ne
2301 ; CHECK-MVE-NEXT: movne r0, #1
2302 ; CHECK-MVE-NEXT: cmp r0, #0
2303 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
2304 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
2305 ; CHECK-MVE-NEXT: vmov r0, s18
2306 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
2307 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
2308 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
2309 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2310 ; CHECK-MVE-NEXT: mov.w r0, #0
2311 ; CHECK-MVE-NEXT: it lt
2312 ; CHECK-MVE-NEXT: movlt r0, #1
2313 ; CHECK-MVE-NEXT: cmp r0, #0
2314 ; CHECK-MVE-NEXT: it ne
2315 ; CHECK-MVE-NEXT: movne r0, #1
2316 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
2317 ; CHECK-MVE-NEXT: cmp r0, #0
2318 ; CHECK-MVE-NEXT: vcmpe.f16 s2, s16
2319 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
2320 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2321 ; CHECK-MVE-NEXT: vmov r0, s18
2322 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
2323 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
2324 ; CHECK-MVE-NEXT: mov.w r0, #0
2325 ; CHECK-MVE-NEXT: it lt
2326 ; CHECK-MVE-NEXT: movlt r0, #1
2327 ; CHECK-MVE-NEXT: cmp r0, #0
2328 ; CHECK-MVE-NEXT: it ne
2329 ; CHECK-MVE-NEXT: movne r0, #1
2330 ; CHECK-MVE-NEXT: cmp r0, #0
2331 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
2332 ; CHECK-MVE-NEXT: movs r1, #0
2333 ; CHECK-MVE-NEXT: vmov r0, s18
2334 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
2335 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
2336 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
2337 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2338 ; CHECK-MVE-NEXT: mov.w r0, #0
2339 ; CHECK-MVE-NEXT: it lt
2340 ; CHECK-MVE-NEXT: movlt r0, #1
2341 ; CHECK-MVE-NEXT: cmp r0, #0
2342 ; CHECK-MVE-NEXT: it ne
2343 ; CHECK-MVE-NEXT: movne r0, #1
2344 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
2345 ; CHECK-MVE-NEXT: cmp r0, #0
2346 ; CHECK-MVE-NEXT: vcmpe.f16 s3, s16
2347 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
2348 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2349 ; CHECK-MVE-NEXT: vmov r0, s18
2350 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
2351 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
2352 ; CHECK-MVE-NEXT: mov.w r0, #0
2353 ; CHECK-MVE-NEXT: it lt
2354 ; CHECK-MVE-NEXT: movlt r0, #1
2355 ; CHECK-MVE-NEXT: cmp r0, #0
2356 ; CHECK-MVE-NEXT: it ne
2357 ; CHECK-MVE-NEXT: movne r0, #1
2358 ; CHECK-MVE-NEXT: cmp r0, #0
2359 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
2360 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2361 ; CHECK-MVE-NEXT: it lt
2362 ; CHECK-MVE-NEXT: movlt r1, #1
2363 ; CHECK-MVE-NEXT: cmp r1, #0
2364 ; CHECK-MVE-NEXT: it ne
2365 ; CHECK-MVE-NEXT: movne r1, #1
2366 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
2367 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
2368 ; CHECK-MVE-NEXT: cmp r1, #0
2369 ; CHECK-MVE-NEXT: vmov r0, s18
2370 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
2371 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
2372 ; CHECK-MVE-NEXT: vmov r0, s0
2373 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
2374 ; CHECK-MVE-NEXT: vmov q0, q3
2375 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
2376 ; CHECK-MVE-NEXT: bx lr
2378 ; CHECK-MVEFP-LABEL: vcmp_ult_v8f16:
2379 ; CHECK-MVEFP: @ %bb.0: @ %entry
2380 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
2381 ; CHECK-MVEFP-NEXT: vmov r0, s12
2382 ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q0, r0
2383 ; CHECK-MVEFP-NEXT: vpnot
2384 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2385 ; CHECK-MVEFP-NEXT: bx lr
2387 %src2 = load half, half* %src2p
2388 %i = insertelement <8 x half> undef, half %src2, i32 0
2389 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
2390 %c = fcmp ult <8 x half> %src, %sp
2391 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
2395 define arm_aapcs_vfpcc <8 x half> @vcmp_ule_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
2396 ; CHECK-MVE-LABEL: vcmp_ule_v8f16:
2397 ; CHECK-MVE: @ %bb.0: @ %entry
2398 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
2399 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
2400 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
2401 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
2402 ; CHECK-MVE-NEXT: movs r0, #0
2403 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
2404 ; CHECK-MVE-NEXT: vcmpe.f16 s12, s16
2405 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
2406 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2407 ; CHECK-MVE-NEXT: it le
2408 ; CHECK-MVE-NEXT: movle r0, #1
2409 ; CHECK-MVE-NEXT: cmp r0, #0
2410 ; CHECK-MVE-NEXT: it ne
2411 ; CHECK-MVE-NEXT: movne r0, #1
2412 ; CHECK-MVE-NEXT: cmp r0, #0
2413 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
2414 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
2415 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2416 ; CHECK-MVE-NEXT: mov.w r2, #0
2417 ; CHECK-MVE-NEXT: vmov r0, s12
2418 ; CHECK-MVE-NEXT: it le
2419 ; CHECK-MVE-NEXT: movle r2, #1
2420 ; CHECK-MVE-NEXT: cmp r2, #0
2421 ; CHECK-MVE-NEXT: it ne
2422 ; CHECK-MVE-NEXT: movne r2, #1
2423 ; CHECK-MVE-NEXT: cmp r2, #0
2424 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
2425 ; CHECK-MVE-NEXT: vcmpe.f16 s1, s16
2426 ; CHECK-MVE-NEXT: vmov r2, s12
2427 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2428 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
2429 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
2430 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
2431 ; CHECK-MVE-NEXT: mov.w r0, #0
2432 ; CHECK-MVE-NEXT: it le
2433 ; CHECK-MVE-NEXT: movle r0, #1
2434 ; CHECK-MVE-NEXT: cmp r0, #0
2435 ; CHECK-MVE-NEXT: it ne
2436 ; CHECK-MVE-NEXT: movne r0, #1
2437 ; CHECK-MVE-NEXT: cmp r0, #0
2438 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
2439 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
2440 ; CHECK-MVE-NEXT: vmov r0, s18
2441 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
2442 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
2443 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
2444 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2445 ; CHECK-MVE-NEXT: mov.w r0, #0
2446 ; CHECK-MVE-NEXT: it le
2447 ; CHECK-MVE-NEXT: movle r0, #1
2448 ; CHECK-MVE-NEXT: cmp r0, #0
2449 ; CHECK-MVE-NEXT: it ne
2450 ; CHECK-MVE-NEXT: movne r0, #1
2451 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
2452 ; CHECK-MVE-NEXT: cmp r0, #0
2453 ; CHECK-MVE-NEXT: vcmpe.f16 s2, s16
2454 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
2455 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2456 ; CHECK-MVE-NEXT: vmov r0, s18
2457 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
2458 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
2459 ; CHECK-MVE-NEXT: mov.w r0, #0
2460 ; CHECK-MVE-NEXT: it le
2461 ; CHECK-MVE-NEXT: movle r0, #1
2462 ; CHECK-MVE-NEXT: cmp r0, #0
2463 ; CHECK-MVE-NEXT: it ne
2464 ; CHECK-MVE-NEXT: movne r0, #1
2465 ; CHECK-MVE-NEXT: cmp r0, #0
2466 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
2467 ; CHECK-MVE-NEXT: movs r1, #0
2468 ; CHECK-MVE-NEXT: vmov r0, s18
2469 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
2470 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
2471 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
2472 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2473 ; CHECK-MVE-NEXT: mov.w r0, #0
2474 ; CHECK-MVE-NEXT: it le
2475 ; CHECK-MVE-NEXT: movle r0, #1
2476 ; CHECK-MVE-NEXT: cmp r0, #0
2477 ; CHECK-MVE-NEXT: it ne
2478 ; CHECK-MVE-NEXT: movne r0, #1
2479 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
2480 ; CHECK-MVE-NEXT: cmp r0, #0
2481 ; CHECK-MVE-NEXT: vcmpe.f16 s3, s16
2482 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
2483 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2484 ; CHECK-MVE-NEXT: vmov r0, s18
2485 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
2486 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
2487 ; CHECK-MVE-NEXT: mov.w r0, #0
2488 ; CHECK-MVE-NEXT: it le
2489 ; CHECK-MVE-NEXT: movle r0, #1
2490 ; CHECK-MVE-NEXT: cmp r0, #0
2491 ; CHECK-MVE-NEXT: it ne
2492 ; CHECK-MVE-NEXT: movne r0, #1
2493 ; CHECK-MVE-NEXT: cmp r0, #0
2494 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
2495 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2496 ; CHECK-MVE-NEXT: it le
2497 ; CHECK-MVE-NEXT: movle r1, #1
2498 ; CHECK-MVE-NEXT: cmp r1, #0
2499 ; CHECK-MVE-NEXT: it ne
2500 ; CHECK-MVE-NEXT: movne r1, #1
2501 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
2502 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
2503 ; CHECK-MVE-NEXT: cmp r1, #0
2504 ; CHECK-MVE-NEXT: vmov r0, s18
2505 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
2506 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
2507 ; CHECK-MVE-NEXT: vmov r0, s0
2508 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
2509 ; CHECK-MVE-NEXT: vmov q0, q3
2510 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
2511 ; CHECK-MVE-NEXT: bx lr
2513 ; CHECK-MVEFP-LABEL: vcmp_ule_v8f16:
2514 ; CHECK-MVEFP: @ %bb.0: @ %entry
2515 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
2516 ; CHECK-MVEFP-NEXT: vmov r0, s12
2517 ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q0, r0
2518 ; CHECK-MVEFP-NEXT: vpnot
2519 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2520 ; CHECK-MVEFP-NEXT: bx lr
2522 %src2 = load half, half* %src2p
2523 %i = insertelement <8 x half> undef, half %src2, i32 0
2524 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
2525 %c = fcmp ule <8 x half> %src, %sp
2526 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
2530 define arm_aapcs_vfpcc <8 x half> @vcmp_ord_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
2531 ; CHECK-MVE-LABEL: vcmp_ord_v8f16:
2532 ; CHECK-MVE: @ %bb.0: @ %entry
2533 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
2534 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
2535 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
2536 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
2537 ; CHECK-MVE-NEXT: movs r0, #0
2538 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
2539 ; CHECK-MVE-NEXT: vcmpe.f16 s12, s16
2540 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
2541 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2542 ; CHECK-MVE-NEXT: it vc
2543 ; CHECK-MVE-NEXT: movvc r0, #1
2544 ; CHECK-MVE-NEXT: cmp r0, #0
2545 ; CHECK-MVE-NEXT: it ne
2546 ; CHECK-MVE-NEXT: movne r0, #1
2547 ; CHECK-MVE-NEXT: cmp r0, #0
2548 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
2549 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
2550 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2551 ; CHECK-MVE-NEXT: mov.w r2, #0
2552 ; CHECK-MVE-NEXT: vmov r0, s12
2553 ; CHECK-MVE-NEXT: it vc
2554 ; CHECK-MVE-NEXT: movvc r2, #1
2555 ; CHECK-MVE-NEXT: cmp r2, #0
2556 ; CHECK-MVE-NEXT: it ne
2557 ; CHECK-MVE-NEXT: movne r2, #1
2558 ; CHECK-MVE-NEXT: cmp r2, #0
2559 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
2560 ; CHECK-MVE-NEXT: vcmpe.f16 s1, s16
2561 ; CHECK-MVE-NEXT: vmov r2, s12
2562 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2563 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
2564 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
2565 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
2566 ; CHECK-MVE-NEXT: mov.w r0, #0
2567 ; CHECK-MVE-NEXT: it vc
2568 ; CHECK-MVE-NEXT: movvc r0, #1
2569 ; CHECK-MVE-NEXT: cmp r0, #0
2570 ; CHECK-MVE-NEXT: it ne
2571 ; CHECK-MVE-NEXT: movne r0, #1
2572 ; CHECK-MVE-NEXT: cmp r0, #0
2573 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
2574 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
2575 ; CHECK-MVE-NEXT: vmov r0, s18
2576 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
2577 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
2578 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
2579 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2580 ; CHECK-MVE-NEXT: mov.w r0, #0
2581 ; CHECK-MVE-NEXT: it vc
2582 ; CHECK-MVE-NEXT: movvc r0, #1
2583 ; CHECK-MVE-NEXT: cmp r0, #0
2584 ; CHECK-MVE-NEXT: it ne
2585 ; CHECK-MVE-NEXT: movne r0, #1
2586 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
2587 ; CHECK-MVE-NEXT: cmp r0, #0
2588 ; CHECK-MVE-NEXT: vcmpe.f16 s2, s16
2589 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
2590 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2591 ; CHECK-MVE-NEXT: vmov r0, s18
2592 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
2593 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
2594 ; CHECK-MVE-NEXT: mov.w r0, #0
2595 ; CHECK-MVE-NEXT: it vc
2596 ; CHECK-MVE-NEXT: movvc r0, #1
2597 ; CHECK-MVE-NEXT: cmp r0, #0
2598 ; CHECK-MVE-NEXT: it ne
2599 ; CHECK-MVE-NEXT: movne r0, #1
2600 ; CHECK-MVE-NEXT: cmp r0, #0
2601 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
2602 ; CHECK-MVE-NEXT: movs r1, #0
2603 ; CHECK-MVE-NEXT: vmov r0, s18
2604 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
2605 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
2606 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
2607 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2608 ; CHECK-MVE-NEXT: mov.w r0, #0
2609 ; CHECK-MVE-NEXT: it vc
2610 ; CHECK-MVE-NEXT: movvc r0, #1
2611 ; CHECK-MVE-NEXT: cmp r0, #0
2612 ; CHECK-MVE-NEXT: it ne
2613 ; CHECK-MVE-NEXT: movne r0, #1
2614 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
2615 ; CHECK-MVE-NEXT: cmp r0, #0
2616 ; CHECK-MVE-NEXT: vcmpe.f16 s3, s16
2617 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
2618 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2619 ; CHECK-MVE-NEXT: vmov r0, s18
2620 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
2621 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
2622 ; CHECK-MVE-NEXT: mov.w r0, #0
2623 ; CHECK-MVE-NEXT: it vc
2624 ; CHECK-MVE-NEXT: movvc r0, #1
2625 ; CHECK-MVE-NEXT: cmp r0, #0
2626 ; CHECK-MVE-NEXT: it ne
2627 ; CHECK-MVE-NEXT: movne r0, #1
2628 ; CHECK-MVE-NEXT: cmp r0, #0
2629 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
2630 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2631 ; CHECK-MVE-NEXT: it vc
2632 ; CHECK-MVE-NEXT: movvc r1, #1
2633 ; CHECK-MVE-NEXT: cmp r1, #0
2634 ; CHECK-MVE-NEXT: it ne
2635 ; CHECK-MVE-NEXT: movne r1, #1
2636 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
2637 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
2638 ; CHECK-MVE-NEXT: cmp r1, #0
2639 ; CHECK-MVE-NEXT: vmov r0, s18
2640 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
2641 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
2642 ; CHECK-MVE-NEXT: vmov r0, s0
2643 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
2644 ; CHECK-MVE-NEXT: vmov q0, q3
2645 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
2646 ; CHECK-MVE-NEXT: bx lr
2648 ; CHECK-MVEFP-LABEL: vcmp_ord_v8f16:
2649 ; CHECK-MVEFP: @ %bb.0: @ %entry
2650 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
2651 ; CHECK-MVEFP-NEXT: vmov r0, s12
2652 ; CHECK-MVEFP-NEXT: vdup.16 q3, r0
2653 ; CHECK-MVEFP-NEXT: vcmp.f16 le, q3, q0
2654 ; CHECK-MVEFP-NEXT: vpst
2655 ; CHECK-MVEFP-NEXT: vcmpt.f16 lt, q0, r0
2656 ; CHECK-MVEFP-NEXT: vpnot
2657 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2658 ; CHECK-MVEFP-NEXT: bx lr
2660 %src2 = load half, half* %src2p
2661 %i = insertelement <8 x half> undef, half %src2, i32 0
2662 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
2663 %c = fcmp ord <8 x half> %src, %sp
2664 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b
2668 define arm_aapcs_vfpcc <8 x half> @vcmp_uno_v8f16(<8 x half> %src, half* %src2p, <8 x half> %a, <8 x half> %b) {
2669 ; CHECK-MVE-LABEL: vcmp_uno_v8f16:
2670 ; CHECK-MVE: @ %bb.0: @ %entry
2671 ; CHECK-MVE-NEXT: .vsave {d8, d9, d10}
2672 ; CHECK-MVE-NEXT: vpush {d8, d9, d10}
2673 ; CHECK-MVE-NEXT: vldr.16 s16, [r0]
2674 ; CHECK-MVE-NEXT: vmovx.f16 s12, s0
2675 ; CHECK-MVE-NEXT: movs r0, #0
2676 ; CHECK-MVE-NEXT: vmovx.f16 s14, s8
2677 ; CHECK-MVE-NEXT: vcmpe.f16 s12, s16
2678 ; CHECK-MVE-NEXT: vmovx.f16 s12, s4
2679 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2680 ; CHECK-MVE-NEXT: it vs
2681 ; CHECK-MVE-NEXT: movvs r0, #1
2682 ; CHECK-MVE-NEXT: cmp r0, #0
2683 ; CHECK-MVE-NEXT: it ne
2684 ; CHECK-MVE-NEXT: movne r0, #1
2685 ; CHECK-MVE-NEXT: cmp r0, #0
2686 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
2687 ; CHECK-MVE-NEXT: vseleq.f16 s12, s14, s12
2688 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2689 ; CHECK-MVE-NEXT: mov.w r2, #0
2690 ; CHECK-MVE-NEXT: vmov r0, s12
2691 ; CHECK-MVE-NEXT: it vs
2692 ; CHECK-MVE-NEXT: movvs r2, #1
2693 ; CHECK-MVE-NEXT: cmp r2, #0
2694 ; CHECK-MVE-NEXT: it ne
2695 ; CHECK-MVE-NEXT: movne r2, #1
2696 ; CHECK-MVE-NEXT: cmp r2, #0
2697 ; CHECK-MVE-NEXT: vseleq.f16 s12, s8, s4
2698 ; CHECK-MVE-NEXT: vcmpe.f16 s1, s16
2699 ; CHECK-MVE-NEXT: vmov r2, s12
2700 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2701 ; CHECK-MVE-NEXT: vmov.16 q3[0], r2
2702 ; CHECK-MVE-NEXT: vmovx.f16 s20, s9
2703 ; CHECK-MVE-NEXT: vmov.16 q3[1], r0
2704 ; CHECK-MVE-NEXT: mov.w r0, #0
2705 ; CHECK-MVE-NEXT: it vs
2706 ; CHECK-MVE-NEXT: movvs r0, #1
2707 ; CHECK-MVE-NEXT: cmp r0, #0
2708 ; CHECK-MVE-NEXT: it ne
2709 ; CHECK-MVE-NEXT: movne r0, #1
2710 ; CHECK-MVE-NEXT: cmp r0, #0
2711 ; CHECK-MVE-NEXT: vseleq.f16 s18, s9, s5
2712 ; CHECK-MVE-NEXT: vmovx.f16 s0, s3
2713 ; CHECK-MVE-NEXT: vmov r0, s18
2714 ; CHECK-MVE-NEXT: vmovx.f16 s18, s1
2715 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
2716 ; CHECK-MVE-NEXT: vmov.16 q3[2], r0
2717 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2718 ; CHECK-MVE-NEXT: mov.w r0, #0
2719 ; CHECK-MVE-NEXT: it vs
2720 ; CHECK-MVE-NEXT: movvs r0, #1
2721 ; CHECK-MVE-NEXT: cmp r0, #0
2722 ; CHECK-MVE-NEXT: it ne
2723 ; CHECK-MVE-NEXT: movne r0, #1
2724 ; CHECK-MVE-NEXT: vmovx.f16 s18, s5
2725 ; CHECK-MVE-NEXT: cmp r0, #0
2726 ; CHECK-MVE-NEXT: vcmpe.f16 s2, s16
2727 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
2728 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2729 ; CHECK-MVE-NEXT: vmov r0, s18
2730 ; CHECK-MVE-NEXT: vmovx.f16 s20, s10
2731 ; CHECK-MVE-NEXT: vmov.16 q3[3], r0
2732 ; CHECK-MVE-NEXT: mov.w r0, #0
2733 ; CHECK-MVE-NEXT: it vs
2734 ; CHECK-MVE-NEXT: movvs r0, #1
2735 ; CHECK-MVE-NEXT: cmp r0, #0
2736 ; CHECK-MVE-NEXT: it ne
2737 ; CHECK-MVE-NEXT: movne r0, #1
2738 ; CHECK-MVE-NEXT: cmp r0, #0
2739 ; CHECK-MVE-NEXT: vseleq.f16 s18, s10, s6
2740 ; CHECK-MVE-NEXT: movs r1, #0
2741 ; CHECK-MVE-NEXT: vmov r0, s18
2742 ; CHECK-MVE-NEXT: vmovx.f16 s18, s2
2743 ; CHECK-MVE-NEXT: vcmpe.f16 s18, s16
2744 ; CHECK-MVE-NEXT: vmov.16 q3[4], r0
2745 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2746 ; CHECK-MVE-NEXT: mov.w r0, #0
2747 ; CHECK-MVE-NEXT: it vs
2748 ; CHECK-MVE-NEXT: movvs r0, #1
2749 ; CHECK-MVE-NEXT: cmp r0, #0
2750 ; CHECK-MVE-NEXT: it ne
2751 ; CHECK-MVE-NEXT: movne r0, #1
2752 ; CHECK-MVE-NEXT: vmovx.f16 s18, s6
2753 ; CHECK-MVE-NEXT: cmp r0, #0
2754 ; CHECK-MVE-NEXT: vcmpe.f16 s3, s16
2755 ; CHECK-MVE-NEXT: vseleq.f16 s18, s20, s18
2756 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2757 ; CHECK-MVE-NEXT: vmov r0, s18
2758 ; CHECK-MVE-NEXT: vcmpe.f16 s0, s16
2759 ; CHECK-MVE-NEXT: vmov.16 q3[5], r0
2760 ; CHECK-MVE-NEXT: mov.w r0, #0
2761 ; CHECK-MVE-NEXT: it vs
2762 ; CHECK-MVE-NEXT: movvs r0, #1
2763 ; CHECK-MVE-NEXT: cmp r0, #0
2764 ; CHECK-MVE-NEXT: it ne
2765 ; CHECK-MVE-NEXT: movne r0, #1
2766 ; CHECK-MVE-NEXT: cmp r0, #0
2767 ; CHECK-MVE-NEXT: vseleq.f16 s18, s11, s7
2768 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
2769 ; CHECK-MVE-NEXT: it vs
2770 ; CHECK-MVE-NEXT: movvs r1, #1
2771 ; CHECK-MVE-NEXT: cmp r1, #0
2772 ; CHECK-MVE-NEXT: it ne
2773 ; CHECK-MVE-NEXT: movne r1, #1
2774 ; CHECK-MVE-NEXT: vmovx.f16 s0, s7
2775 ; CHECK-MVE-NEXT: vmovx.f16 s2, s11
2776 ; CHECK-MVE-NEXT: cmp r1, #0
2777 ; CHECK-MVE-NEXT: vmov r0, s18
2778 ; CHECK-MVE-NEXT: vseleq.f16 s0, s2, s0
2779 ; CHECK-MVE-NEXT: vmov.16 q3[6], r0
2780 ; CHECK-MVE-NEXT: vmov r0, s0
2781 ; CHECK-MVE-NEXT: vmov.16 q3[7], r0
2782 ; CHECK-MVE-NEXT: vmov q0, q3
2783 ; CHECK-MVE-NEXT: vpop {d8, d9, d10}
2784 ; CHECK-MVE-NEXT: bx lr
2786 ; CHECK-MVEFP-LABEL: vcmp_uno_v8f16:
2787 ; CHECK-MVEFP: @ %bb.0: @ %entry
2788 ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0]
2789 ; CHECK-MVEFP-NEXT: vmov r0, s12
2790 ; CHECK-MVEFP-NEXT: vdup.16 q3, r0
2791 ; CHECK-MVEFP-NEXT: vcmp.f16 le, q3, q0
2792 ; CHECK-MVEFP-NEXT: vpst
2793 ; CHECK-MVEFP-NEXT: vcmpt.f16 lt, q0, r0
2794 ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2
2795 ; CHECK-MVEFP-NEXT: bx lr
2797 %src2 = load half, half* %src2p
2798 %i = insertelement <8 x half> undef, half %src2, i32 0
2799 %sp = shufflevector <8 x half> %i, <8 x half> undef, <8 x i32> zeroinitializer
2800 %c = fcmp uno <8 x half> %src, %sp
2801 %s = select <8 x i1> %c, <8 x half> %a, <8 x half> %b