1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64 -mattr=-fullfp16 | FileCheck %s --check-prefixes=CHECK,CHECK-CVT
3 ; RUN: llc < %s -mtriple=aarch64 -mattr=+fullfp16 | FileCheck %s --check-prefixes=CHECK,CHECK-FP16
5 define <8 x half> @add_h(<8 x half> %a, <8 x half> %b) {
6 ; CHECK-CVT-LABEL: add_h:
7 ; CHECK-CVT: // %bb.0: // %entry
8 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
9 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
10 ; CHECK-CVT-NEXT: fcvt s4, h1
11 ; CHECK-CVT-NEXT: fcvt s5, h0
12 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
13 ; CHECK-CVT-NEXT: mov h7, v0.h[2]
14 ; CHECK-CVT-NEXT: mov h16, v1.h[3]
15 ; CHECK-CVT-NEXT: fcvt s2, h2
16 ; CHECK-CVT-NEXT: fcvt s3, h3
17 ; CHECK-CVT-NEXT: fadd s4, s5, s4
18 ; CHECK-CVT-NEXT: mov h5, v0.h[3]
19 ; CHECK-CVT-NEXT: fcvt s6, h6
20 ; CHECK-CVT-NEXT: fcvt s7, h7
21 ; CHECK-CVT-NEXT: fcvt s16, h16
22 ; CHECK-CVT-NEXT: fadd s3, s3, s2
23 ; CHECK-CVT-NEXT: fcvt s5, h5
24 ; CHECK-CVT-NEXT: fcvt h2, s4
25 ; CHECK-CVT-NEXT: fadd s4, s7, s6
26 ; CHECK-CVT-NEXT: mov h6, v1.h[4]
27 ; CHECK-CVT-NEXT: mov h7, v0.h[4]
28 ; CHECK-CVT-NEXT: fcvt h3, s3
29 ; CHECK-CVT-NEXT: fadd s5, s5, s16
30 ; CHECK-CVT-NEXT: mov h16, v0.h[5]
31 ; CHECK-CVT-NEXT: fcvt h4, s4
32 ; CHECK-CVT-NEXT: mov v2.h[1], v3.h[0]
33 ; CHECK-CVT-NEXT: fcvt s3, h6
34 ; CHECK-CVT-NEXT: fcvt s6, h7
35 ; CHECK-CVT-NEXT: mov h7, v1.h[5]
36 ; CHECK-CVT-NEXT: fcvt h5, s5
37 ; CHECK-CVT-NEXT: fcvt s16, h16
38 ; CHECK-CVT-NEXT: mov v2.h[2], v4.h[0]
39 ; CHECK-CVT-NEXT: mov h4, v1.h[6]
40 ; CHECK-CVT-NEXT: fadd s3, s6, s3
41 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
42 ; CHECK-CVT-NEXT: fcvt s7, h7
43 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
44 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
45 ; CHECK-CVT-NEXT: mov v2.h[3], v5.h[0]
46 ; CHECK-CVT-NEXT: fcvt s4, h4
47 ; CHECK-CVT-NEXT: fcvt h3, s3
48 ; CHECK-CVT-NEXT: fcvt s5, h6
49 ; CHECK-CVT-NEXT: fadd s6, s16, s7
50 ; CHECK-CVT-NEXT: fcvt s1, h1
51 ; CHECK-CVT-NEXT: fcvt s0, h0
52 ; CHECK-CVT-NEXT: mov v2.h[4], v3.h[0]
53 ; CHECK-CVT-NEXT: fadd s4, s5, s4
54 ; CHECK-CVT-NEXT: fcvt h3, s6
55 ; CHECK-CVT-NEXT: fadd s0, s0, s1
56 ; CHECK-CVT-NEXT: mov v2.h[5], v3.h[0]
57 ; CHECK-CVT-NEXT: fcvt h3, s4
58 ; CHECK-CVT-NEXT: fcvt h0, s0
59 ; CHECK-CVT-NEXT: mov v2.h[6], v3.h[0]
60 ; CHECK-CVT-NEXT: mov v2.h[7], v0.h[0]
61 ; CHECK-CVT-NEXT: mov v0.16b, v2.16b
64 ; CHECK-FP16-LABEL: add_h:
65 ; CHECK-FP16: // %bb.0: // %entry
66 ; CHECK-FP16-NEXT: fadd v0.8h, v0.8h, v1.8h
67 ; CHECK-FP16-NEXT: ret
69 %0 = fadd <8 x half> %a, %b
74 define <8 x half> @sub_h(<8 x half> %a, <8 x half> %b) {
75 ; CHECK-CVT-LABEL: sub_h:
76 ; CHECK-CVT: // %bb.0: // %entry
77 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
78 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
79 ; CHECK-CVT-NEXT: fcvt s4, h1
80 ; CHECK-CVT-NEXT: fcvt s5, h0
81 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
82 ; CHECK-CVT-NEXT: mov h7, v0.h[2]
83 ; CHECK-CVT-NEXT: mov h16, v1.h[3]
84 ; CHECK-CVT-NEXT: fcvt s2, h2
85 ; CHECK-CVT-NEXT: fcvt s3, h3
86 ; CHECK-CVT-NEXT: fsub s4, s5, s4
87 ; CHECK-CVT-NEXT: mov h5, v0.h[3]
88 ; CHECK-CVT-NEXT: fcvt s6, h6
89 ; CHECK-CVT-NEXT: fcvt s7, h7
90 ; CHECK-CVT-NEXT: fcvt s16, h16
91 ; CHECK-CVT-NEXT: fsub s3, s3, s2
92 ; CHECK-CVT-NEXT: fcvt s5, h5
93 ; CHECK-CVT-NEXT: fcvt h2, s4
94 ; CHECK-CVT-NEXT: fsub s4, s7, s6
95 ; CHECK-CVT-NEXT: mov h6, v1.h[4]
96 ; CHECK-CVT-NEXT: mov h7, v0.h[4]
97 ; CHECK-CVT-NEXT: fcvt h3, s3
98 ; CHECK-CVT-NEXT: fsub s5, s5, s16
99 ; CHECK-CVT-NEXT: mov h16, v0.h[5]
100 ; CHECK-CVT-NEXT: fcvt h4, s4
101 ; CHECK-CVT-NEXT: mov v2.h[1], v3.h[0]
102 ; CHECK-CVT-NEXT: fcvt s3, h6
103 ; CHECK-CVT-NEXT: fcvt s6, h7
104 ; CHECK-CVT-NEXT: mov h7, v1.h[5]
105 ; CHECK-CVT-NEXT: fcvt h5, s5
106 ; CHECK-CVT-NEXT: fcvt s16, h16
107 ; CHECK-CVT-NEXT: mov v2.h[2], v4.h[0]
108 ; CHECK-CVT-NEXT: mov h4, v1.h[6]
109 ; CHECK-CVT-NEXT: fsub s3, s6, s3
110 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
111 ; CHECK-CVT-NEXT: fcvt s7, h7
112 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
113 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
114 ; CHECK-CVT-NEXT: mov v2.h[3], v5.h[0]
115 ; CHECK-CVT-NEXT: fcvt s4, h4
116 ; CHECK-CVT-NEXT: fcvt h3, s3
117 ; CHECK-CVT-NEXT: fcvt s5, h6
118 ; CHECK-CVT-NEXT: fsub s6, s16, s7
119 ; CHECK-CVT-NEXT: fcvt s1, h1
120 ; CHECK-CVT-NEXT: fcvt s0, h0
121 ; CHECK-CVT-NEXT: mov v2.h[4], v3.h[0]
122 ; CHECK-CVT-NEXT: fsub s4, s5, s4
123 ; CHECK-CVT-NEXT: fcvt h3, s6
124 ; CHECK-CVT-NEXT: fsub s0, s0, s1
125 ; CHECK-CVT-NEXT: mov v2.h[5], v3.h[0]
126 ; CHECK-CVT-NEXT: fcvt h3, s4
127 ; CHECK-CVT-NEXT: fcvt h0, s0
128 ; CHECK-CVT-NEXT: mov v2.h[6], v3.h[0]
129 ; CHECK-CVT-NEXT: mov v2.h[7], v0.h[0]
130 ; CHECK-CVT-NEXT: mov v0.16b, v2.16b
131 ; CHECK-CVT-NEXT: ret
133 ; CHECK-FP16-LABEL: sub_h:
134 ; CHECK-FP16: // %bb.0: // %entry
135 ; CHECK-FP16-NEXT: fsub v0.8h, v0.8h, v1.8h
136 ; CHECK-FP16-NEXT: ret
138 %0 = fsub <8 x half> %a, %b
143 define <8 x half> @mul_h(<8 x half> %a, <8 x half> %b) {
144 ; CHECK-CVT-LABEL: mul_h:
145 ; CHECK-CVT: // %bb.0: // %entry
146 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
147 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
148 ; CHECK-CVT-NEXT: fcvt s4, h1
149 ; CHECK-CVT-NEXT: fcvt s5, h0
150 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
151 ; CHECK-CVT-NEXT: mov h7, v0.h[2]
152 ; CHECK-CVT-NEXT: mov h16, v1.h[3]
153 ; CHECK-CVT-NEXT: fcvt s2, h2
154 ; CHECK-CVT-NEXT: fcvt s3, h3
155 ; CHECK-CVT-NEXT: fmul s4, s5, s4
156 ; CHECK-CVT-NEXT: mov h5, v0.h[3]
157 ; CHECK-CVT-NEXT: fcvt s6, h6
158 ; CHECK-CVT-NEXT: fcvt s7, h7
159 ; CHECK-CVT-NEXT: fcvt s16, h16
160 ; CHECK-CVT-NEXT: fmul s3, s3, s2
161 ; CHECK-CVT-NEXT: fcvt s5, h5
162 ; CHECK-CVT-NEXT: fcvt h2, s4
163 ; CHECK-CVT-NEXT: fmul s4, s7, s6
164 ; CHECK-CVT-NEXT: mov h6, v1.h[4]
165 ; CHECK-CVT-NEXT: mov h7, v0.h[4]
166 ; CHECK-CVT-NEXT: fcvt h3, s3
167 ; CHECK-CVT-NEXT: fmul s5, s5, s16
168 ; CHECK-CVT-NEXT: mov h16, v0.h[5]
169 ; CHECK-CVT-NEXT: fcvt h4, s4
170 ; CHECK-CVT-NEXT: mov v2.h[1], v3.h[0]
171 ; CHECK-CVT-NEXT: fcvt s3, h6
172 ; CHECK-CVT-NEXT: fcvt s6, h7
173 ; CHECK-CVT-NEXT: mov h7, v1.h[5]
174 ; CHECK-CVT-NEXT: fcvt h5, s5
175 ; CHECK-CVT-NEXT: fcvt s16, h16
176 ; CHECK-CVT-NEXT: mov v2.h[2], v4.h[0]
177 ; CHECK-CVT-NEXT: mov h4, v1.h[6]
178 ; CHECK-CVT-NEXT: fmul s3, s6, s3
179 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
180 ; CHECK-CVT-NEXT: fcvt s7, h7
181 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
182 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
183 ; CHECK-CVT-NEXT: mov v2.h[3], v5.h[0]
184 ; CHECK-CVT-NEXT: fcvt s4, h4
185 ; CHECK-CVT-NEXT: fcvt h3, s3
186 ; CHECK-CVT-NEXT: fcvt s5, h6
187 ; CHECK-CVT-NEXT: fmul s6, s16, s7
188 ; CHECK-CVT-NEXT: fcvt s1, h1
189 ; CHECK-CVT-NEXT: fcvt s0, h0
190 ; CHECK-CVT-NEXT: mov v2.h[4], v3.h[0]
191 ; CHECK-CVT-NEXT: fmul s4, s5, s4
192 ; CHECK-CVT-NEXT: fcvt h3, s6
193 ; CHECK-CVT-NEXT: fmul s0, s0, s1
194 ; CHECK-CVT-NEXT: mov v2.h[5], v3.h[0]
195 ; CHECK-CVT-NEXT: fcvt h3, s4
196 ; CHECK-CVT-NEXT: fcvt h0, s0
197 ; CHECK-CVT-NEXT: mov v2.h[6], v3.h[0]
198 ; CHECK-CVT-NEXT: mov v2.h[7], v0.h[0]
199 ; CHECK-CVT-NEXT: mov v0.16b, v2.16b
200 ; CHECK-CVT-NEXT: ret
202 ; CHECK-FP16-LABEL: mul_h:
203 ; CHECK-FP16: // %bb.0: // %entry
204 ; CHECK-FP16-NEXT: fmul v0.8h, v0.8h, v1.8h
205 ; CHECK-FP16-NEXT: ret
207 %0 = fmul <8 x half> %a, %b
212 define <8 x half> @div_h(<8 x half> %a, <8 x half> %b) {
213 ; CHECK-CVT-LABEL: div_h:
214 ; CHECK-CVT: // %bb.0: // %entry
215 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
216 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
217 ; CHECK-CVT-NEXT: fcvt s4, h0
218 ; CHECK-CVT-NEXT: mov h5, v0.h[2]
219 ; CHECK-CVT-NEXT: mov h6, v0.h[3]
220 ; CHECK-CVT-NEXT: mov h7, v0.h[4]
221 ; CHECK-CVT-NEXT: mov h16, v0.h[5]
222 ; CHECK-CVT-NEXT: mov h17, v0.h[6]
223 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
224 ; CHECK-CVT-NEXT: fcvt s2, h2
225 ; CHECK-CVT-NEXT: fcvt s3, h3
226 ; CHECK-CVT-NEXT: fcvt s5, h5
227 ; CHECK-CVT-NEXT: fcvt s6, h6
228 ; CHECK-CVT-NEXT: fcvt s7, h7
229 ; CHECK-CVT-NEXT: fcvt s16, h16
230 ; CHECK-CVT-NEXT: fcvt s17, h17
231 ; CHECK-CVT-NEXT: fcvt s0, h0
232 ; CHECK-CVT-NEXT: fdiv s2, s3, s2
233 ; CHECK-CVT-NEXT: fcvt s3, h1
234 ; CHECK-CVT-NEXT: fdiv s3, s4, s3
235 ; CHECK-CVT-NEXT: mov h4, v1.h[2]
236 ; CHECK-CVT-NEXT: fcvt h18, s2
237 ; CHECK-CVT-NEXT: fcvt s4, h4
238 ; CHECK-CVT-NEXT: fdiv s4, s5, s4
239 ; CHECK-CVT-NEXT: mov h5, v1.h[3]
240 ; CHECK-CVT-NEXT: fcvt h2, s3
241 ; CHECK-CVT-NEXT: fcvt s5, h5
242 ; CHECK-CVT-NEXT: mov v2.h[1], v18.h[0]
243 ; CHECK-CVT-NEXT: fdiv s5, s6, s5
244 ; CHECK-CVT-NEXT: mov h6, v1.h[4]
245 ; CHECK-CVT-NEXT: fcvt h4, s4
246 ; CHECK-CVT-NEXT: fcvt s6, h6
247 ; CHECK-CVT-NEXT: mov v2.h[2], v4.h[0]
248 ; CHECK-CVT-NEXT: fdiv s6, s7, s6
249 ; CHECK-CVT-NEXT: mov h7, v1.h[5]
250 ; CHECK-CVT-NEXT: fcvt h4, s5
251 ; CHECK-CVT-NEXT: fcvt s7, h7
252 ; CHECK-CVT-NEXT: mov v2.h[3], v4.h[0]
253 ; CHECK-CVT-NEXT: fdiv s7, s16, s7
254 ; CHECK-CVT-NEXT: mov h16, v1.h[6]
255 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
256 ; CHECK-CVT-NEXT: fcvt s16, h16
257 ; CHECK-CVT-NEXT: fcvt s1, h1
258 ; CHECK-CVT-NEXT: fdiv s3, s17, s16
259 ; CHECK-CVT-NEXT: fdiv s0, s0, s1
260 ; CHECK-CVT-NEXT: fcvt h1, s6
261 ; CHECK-CVT-NEXT: mov v2.h[4], v1.h[0]
262 ; CHECK-CVT-NEXT: fcvt h1, s7
263 ; CHECK-CVT-NEXT: mov v2.h[5], v1.h[0]
264 ; CHECK-CVT-NEXT: fcvt h1, s3
265 ; CHECK-CVT-NEXT: mov v2.h[6], v1.h[0]
266 ; CHECK-CVT-NEXT: fcvt h0, s0
267 ; CHECK-CVT-NEXT: mov v2.h[7], v0.h[0]
268 ; CHECK-CVT-NEXT: mov v0.16b, v2.16b
269 ; CHECK-CVT-NEXT: ret
271 ; CHECK-FP16-LABEL: div_h:
272 ; CHECK-FP16: // %bb.0: // %entry
273 ; CHECK-FP16-NEXT: fdiv v0.8h, v0.8h, v1.8h
274 ; CHECK-FP16-NEXT: ret
276 %0 = fdiv <8 x half> %a, %b
281 define <8 x half> @load_h(ptr %a) {
282 ; CHECK-LABEL: load_h:
283 ; CHECK: // %bb.0: // %entry
284 ; CHECK-NEXT: ldr q0, [x0]
287 %0 = load <8 x half>, ptr %a, align 4
292 define void @store_h(ptr %a, <8 x half> %b) {
293 ; CHECK-LABEL: store_h:
294 ; CHECK: // %bb.0: // %entry
295 ; CHECK-NEXT: str q0, [x0]
298 store <8 x half> %b, ptr %a, align 4
302 define <8 x half> @s_to_h(<8 x float> %a) {
303 ; CHECK-LABEL: s_to_h:
305 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
306 ; CHECK-NEXT: fcvtn2 v0.8h, v1.4s
308 %1 = fptrunc <8 x float> %a to <8 x half>
312 define <8 x half> @d_to_h(<8 x double> %a) {
313 ; CHECK-LABEL: d_to_h:
315 ; CHECK-NEXT: mov d5, v0.d[1]
316 ; CHECK-NEXT: fcvt h0, d0
317 ; CHECK-NEXT: fcvt h4, d1
318 ; CHECK-NEXT: mov d1, v1.d[1]
319 ; CHECK-NEXT: fcvt h5, d5
320 ; CHECK-NEXT: fcvt h1, d1
321 ; CHECK-NEXT: mov v0.h[1], v5.h[0]
322 ; CHECK-NEXT: mov v0.h[2], v4.h[0]
323 ; CHECK-NEXT: mov v0.h[3], v1.h[0]
324 ; CHECK-NEXT: fcvt h1, d2
325 ; CHECK-NEXT: mov d2, v2.d[1]
326 ; CHECK-NEXT: mov v0.h[4], v1.h[0]
327 ; CHECK-NEXT: fcvt h1, d2
328 ; CHECK-NEXT: mov d2, v3.d[1]
329 ; CHECK-NEXT: mov v0.h[5], v1.h[0]
330 ; CHECK-NEXT: fcvt h1, d3
331 ; CHECK-NEXT: mov v0.h[6], v1.h[0]
332 ; CHECK-NEXT: fcvt h1, d2
333 ; CHECK-NEXT: mov v0.h[7], v1.h[0]
335 %1 = fptrunc <8 x double> %a to <8 x half>
339 define <8 x float> @h_to_s(<8 x half> %a) {
340 ; CHECK-LABEL: h_to_s:
342 ; CHECK-NEXT: fcvtl2 v1.4s, v0.8h
343 ; CHECK-NEXT: fcvtl v0.4s, v0.4h
345 %1 = fpext <8 x half> %a to <8 x float>
349 define <8 x double> @h_to_d(<8 x half> %a) {
350 ; CHECK-LABEL: h_to_d:
352 ; CHECK-NEXT: ext v2.16b, v0.16b, v0.16b, #8
353 ; CHECK-NEXT: mov h1, v0.h[1]
354 ; CHECK-NEXT: mov h3, v0.h[3]
355 ; CHECK-NEXT: mov h4, v0.h[2]
356 ; CHECK-NEXT: fcvt d0, h0
357 ; CHECK-NEXT: mov h5, v2.h[1]
358 ; CHECK-NEXT: mov h6, v2.h[3]
359 ; CHECK-NEXT: mov h7, v2.h[2]
360 ; CHECK-NEXT: fcvt d16, h1
361 ; CHECK-NEXT: fcvt d17, h3
362 ; CHECK-NEXT: fcvt d1, h4
363 ; CHECK-NEXT: fcvt d2, h2
364 ; CHECK-NEXT: fcvt d4, h5
365 ; CHECK-NEXT: fcvt d5, h6
366 ; CHECK-NEXT: fcvt d3, h7
367 ; CHECK-NEXT: mov v0.d[1], v16.d[0]
368 ; CHECK-NEXT: mov v1.d[1], v17.d[0]
369 ; CHECK-NEXT: mov v2.d[1], v4.d[0]
370 ; CHECK-NEXT: mov v3.d[1], v5.d[0]
372 %1 = fpext <8 x half> %a to <8 x double>
377 define <8 x half> @bitcast_i_to_h(float, <8 x i16> %a) {
378 ; CHECK-LABEL: bitcast_i_to_h:
380 ; CHECK-NEXT: mov v0.16b, v1.16b
382 %2 = bitcast <8 x i16> %a to <8 x half>
386 define <8 x i16> @bitcast_h_to_i(float, <8 x half> %a) {
387 ; CHECK-LABEL: bitcast_h_to_i:
389 ; CHECK-NEXT: mov v0.16b, v1.16b
391 %2 = bitcast <8 x half> %a to <8 x i16>
395 define <4 x half> @sitofp_v4i8(<4 x i8> %a) #0 {
396 ; CHECK-CVT-LABEL: sitofp_v4i8:
397 ; CHECK-CVT: // %bb.0:
398 ; CHECK-CVT-NEXT: shl v0.4h, v0.4h, #8
399 ; CHECK-CVT-NEXT: sshr v0.4h, v0.4h, #8
400 ; CHECK-CVT-NEXT: sshll v0.4s, v0.4h, #0
401 ; CHECK-CVT-NEXT: scvtf v0.4s, v0.4s
402 ; CHECK-CVT-NEXT: fcvtn v0.4h, v0.4s
403 ; CHECK-CVT-NEXT: ret
405 ; CHECK-FP16-LABEL: sitofp_v4i8:
406 ; CHECK-FP16: // %bb.0:
407 ; CHECK-FP16-NEXT: shl v0.4h, v0.4h, #8
408 ; CHECK-FP16-NEXT: sshr v0.4h, v0.4h, #8
409 ; CHECK-FP16-NEXT: scvtf v0.4h, v0.4h
410 ; CHECK-FP16-NEXT: ret
411 %1 = sitofp <4 x i8> %a to <4 x half>
415 define <8 x half> @sitofp_v8i8(<8 x i8> %a) #0 {
416 ; CHECK-CVT-LABEL: sitofp_v8i8:
417 ; CHECK-CVT: // %bb.0:
418 ; CHECK-CVT-NEXT: sshll v0.8h, v0.8b, #0
419 ; CHECK-CVT-NEXT: sshll v1.4s, v0.4h, #0
420 ; CHECK-CVT-NEXT: sshll2 v2.4s, v0.8h, #0
421 ; CHECK-CVT-NEXT: scvtf v1.4s, v1.4s
422 ; CHECK-CVT-NEXT: fcvtn v0.4h, v1.4s
423 ; CHECK-CVT-NEXT: scvtf v1.4s, v2.4s
424 ; CHECK-CVT-NEXT: fcvtn2 v0.8h, v1.4s
425 ; CHECK-CVT-NEXT: ret
427 ; CHECK-FP16-LABEL: sitofp_v8i8:
428 ; CHECK-FP16: // %bb.0:
429 ; CHECK-FP16-NEXT: sshll v0.8h, v0.8b, #0
430 ; CHECK-FP16-NEXT: scvtf v0.8h, v0.8h
431 ; CHECK-FP16-NEXT: ret
432 %1 = sitofp <8 x i8> %a to <8 x half>
436 define <16 x half> @sitofp_v16i8(<16 x i8> %a) #0 {
437 ; CHECK-CVT-LABEL: sitofp_v16i8:
438 ; CHECK-CVT: // %bb.0:
439 ; CHECK-CVT-NEXT: sshll2 v1.8h, v0.16b, #0
440 ; CHECK-CVT-NEXT: sshll v0.8h, v0.8b, #0
441 ; CHECK-CVT-NEXT: sshll v2.4s, v1.4h, #0
442 ; CHECK-CVT-NEXT: sshll v3.4s, v0.4h, #0
443 ; CHECK-CVT-NEXT: sshll2 v4.4s, v1.8h, #0
444 ; CHECK-CVT-NEXT: sshll2 v5.4s, v0.8h, #0
445 ; CHECK-CVT-NEXT: scvtf v2.4s, v2.4s
446 ; CHECK-CVT-NEXT: scvtf v3.4s, v3.4s
447 ; CHECK-CVT-NEXT: fcvtn v1.4h, v2.4s
448 ; CHECK-CVT-NEXT: scvtf v2.4s, v4.4s
449 ; CHECK-CVT-NEXT: fcvtn v0.4h, v3.4s
450 ; CHECK-CVT-NEXT: scvtf v3.4s, v5.4s
451 ; CHECK-CVT-NEXT: fcvtn2 v1.8h, v2.4s
452 ; CHECK-CVT-NEXT: fcvtn2 v0.8h, v3.4s
453 ; CHECK-CVT-NEXT: ret
455 ; CHECK-FP16-LABEL: sitofp_v16i8:
456 ; CHECK-FP16: // %bb.0:
457 ; CHECK-FP16-NEXT: sshll2 v1.8h, v0.16b, #0
458 ; CHECK-FP16-NEXT: sshll v0.8h, v0.8b, #0
459 ; CHECK-FP16-NEXT: scvtf v1.8h, v1.8h
460 ; CHECK-FP16-NEXT: scvtf v0.8h, v0.8h
461 ; CHECK-FP16-NEXT: ret
462 %1 = sitofp <16 x i8> %a to <16 x half>
466 define <8 x half> @sitofp_i16(<8 x i16> %a) #0 {
467 ; CHECK-CVT-LABEL: sitofp_i16:
468 ; CHECK-CVT: // %bb.0:
469 ; CHECK-CVT-NEXT: sshll v1.4s, v0.4h, #0
470 ; CHECK-CVT-NEXT: sshll2 v2.4s, v0.8h, #0
471 ; CHECK-CVT-NEXT: scvtf v1.4s, v1.4s
472 ; CHECK-CVT-NEXT: fcvtn v0.4h, v1.4s
473 ; CHECK-CVT-NEXT: scvtf v1.4s, v2.4s
474 ; CHECK-CVT-NEXT: fcvtn2 v0.8h, v1.4s
475 ; CHECK-CVT-NEXT: ret
477 ; CHECK-FP16-LABEL: sitofp_i16:
478 ; CHECK-FP16: // %bb.0:
479 ; CHECK-FP16-NEXT: scvtf v0.8h, v0.8h
480 ; CHECK-FP16-NEXT: ret
481 %1 = sitofp <8 x i16> %a to <8 x half>
485 define <8 x half> @sitofp_i32(<8 x i32> %a) #0 {
486 ; CHECK-LABEL: sitofp_i32:
488 ; CHECK-NEXT: scvtf v0.4s, v0.4s
489 ; CHECK-NEXT: scvtf v1.4s, v1.4s
490 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
491 ; CHECK-NEXT: fcvtn2 v0.8h, v1.4s
493 %1 = sitofp <8 x i32> %a to <8 x half>
498 define <8 x half> @sitofp_i64(<8 x i64> %a) #0 {
499 ; CHECK-LABEL: sitofp_i64:
501 ; CHECK-NEXT: scvtf v0.2d, v0.2d
502 ; CHECK-NEXT: scvtf v2.2d, v2.2d
503 ; CHECK-NEXT: scvtf v1.2d, v1.2d
504 ; CHECK-NEXT: scvtf v3.2d, v3.2d
505 ; CHECK-NEXT: fcvtn v0.2s, v0.2d
506 ; CHECK-NEXT: fcvtn v2.2s, v2.2d
507 ; CHECK-NEXT: fcvtn2 v0.4s, v1.2d
508 ; CHECK-NEXT: fcvtn2 v2.4s, v3.2d
509 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
510 ; CHECK-NEXT: fcvtn2 v0.8h, v2.4s
512 %1 = sitofp <8 x i64> %a to <8 x half>
516 define <4 x half> @uitofp_v4i8(<4 x i8> %a) #0 {
517 ; CHECK-CVT-LABEL: uitofp_v4i8:
518 ; CHECK-CVT: // %bb.0:
519 ; CHECK-CVT-NEXT: bic v0.4h, #255, lsl #8
520 ; CHECK-CVT-NEXT: ushll v0.4s, v0.4h, #0
521 ; CHECK-CVT-NEXT: ucvtf v0.4s, v0.4s
522 ; CHECK-CVT-NEXT: fcvtn v0.4h, v0.4s
523 ; CHECK-CVT-NEXT: ret
525 ; CHECK-FP16-LABEL: uitofp_v4i8:
526 ; CHECK-FP16: // %bb.0:
527 ; CHECK-FP16-NEXT: bic v0.4h, #255, lsl #8
528 ; CHECK-FP16-NEXT: ucvtf v0.4h, v0.4h
529 ; CHECK-FP16-NEXT: ret
530 %1 = uitofp <4 x i8> %a to <4 x half>
534 define <8 x half> @uitofp_v8i8(<8 x i8> %a) #0 {
535 ; CHECK-CVT-LABEL: uitofp_v8i8:
536 ; CHECK-CVT: // %bb.0:
537 ; CHECK-CVT-NEXT: ushll v0.8h, v0.8b, #0
538 ; CHECK-CVT-NEXT: ushll v1.4s, v0.4h, #0
539 ; CHECK-CVT-NEXT: ushll2 v2.4s, v0.8h, #0
540 ; CHECK-CVT-NEXT: ucvtf v1.4s, v1.4s
541 ; CHECK-CVT-NEXT: fcvtn v0.4h, v1.4s
542 ; CHECK-CVT-NEXT: ucvtf v1.4s, v2.4s
543 ; CHECK-CVT-NEXT: fcvtn2 v0.8h, v1.4s
544 ; CHECK-CVT-NEXT: ret
546 ; CHECK-FP16-LABEL: uitofp_v8i8:
547 ; CHECK-FP16: // %bb.0:
548 ; CHECK-FP16-NEXT: ushll v0.8h, v0.8b, #0
549 ; CHECK-FP16-NEXT: ucvtf v0.8h, v0.8h
550 ; CHECK-FP16-NEXT: ret
551 %1 = uitofp <8 x i8> %a to <8 x half>
555 define <16 x half> @uitofp_v16i8(<16 x i8> %a) #0 {
556 ; CHECK-CVT-LABEL: uitofp_v16i8:
557 ; CHECK-CVT: // %bb.0:
558 ; CHECK-CVT-NEXT: ushll2 v1.8h, v0.16b, #0
559 ; CHECK-CVT-NEXT: ushll v0.8h, v0.8b, #0
560 ; CHECK-CVT-NEXT: ushll v2.4s, v1.4h, #0
561 ; CHECK-CVT-NEXT: ushll v3.4s, v0.4h, #0
562 ; CHECK-CVT-NEXT: ushll2 v4.4s, v1.8h, #0
563 ; CHECK-CVT-NEXT: ushll2 v5.4s, v0.8h, #0
564 ; CHECK-CVT-NEXT: ucvtf v2.4s, v2.4s
565 ; CHECK-CVT-NEXT: ucvtf v3.4s, v3.4s
566 ; CHECK-CVT-NEXT: fcvtn v1.4h, v2.4s
567 ; CHECK-CVT-NEXT: ucvtf v2.4s, v4.4s
568 ; CHECK-CVT-NEXT: fcvtn v0.4h, v3.4s
569 ; CHECK-CVT-NEXT: ucvtf v3.4s, v5.4s
570 ; CHECK-CVT-NEXT: fcvtn2 v1.8h, v2.4s
571 ; CHECK-CVT-NEXT: fcvtn2 v0.8h, v3.4s
572 ; CHECK-CVT-NEXT: ret
574 ; CHECK-FP16-LABEL: uitofp_v16i8:
575 ; CHECK-FP16: // %bb.0:
576 ; CHECK-FP16-NEXT: ushll2 v1.8h, v0.16b, #0
577 ; CHECK-FP16-NEXT: ushll v0.8h, v0.8b, #0
578 ; CHECK-FP16-NEXT: ucvtf v1.8h, v1.8h
579 ; CHECK-FP16-NEXT: ucvtf v0.8h, v0.8h
580 ; CHECK-FP16-NEXT: ret
581 %1 = uitofp <16 x i8> %a to <16 x half>
586 define <8 x half> @uitofp_i16(<8 x i16> %a) #0 {
587 ; CHECK-CVT-LABEL: uitofp_i16:
588 ; CHECK-CVT: // %bb.0:
589 ; CHECK-CVT-NEXT: ushll v1.4s, v0.4h, #0
590 ; CHECK-CVT-NEXT: ushll2 v2.4s, v0.8h, #0
591 ; CHECK-CVT-NEXT: ucvtf v1.4s, v1.4s
592 ; CHECK-CVT-NEXT: fcvtn v0.4h, v1.4s
593 ; CHECK-CVT-NEXT: ucvtf v1.4s, v2.4s
594 ; CHECK-CVT-NEXT: fcvtn2 v0.8h, v1.4s
595 ; CHECK-CVT-NEXT: ret
597 ; CHECK-FP16-LABEL: uitofp_i16:
598 ; CHECK-FP16: // %bb.0:
599 ; CHECK-FP16-NEXT: ucvtf v0.8h, v0.8h
600 ; CHECK-FP16-NEXT: ret
601 %1 = uitofp <8 x i16> %a to <8 x half>
606 define <8 x half> @uitofp_i32(<8 x i32> %a) #0 {
607 ; CHECK-LABEL: uitofp_i32:
609 ; CHECK-NEXT: ucvtf v0.4s, v0.4s
610 ; CHECK-NEXT: ucvtf v1.4s, v1.4s
611 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
612 ; CHECK-NEXT: fcvtn2 v0.8h, v1.4s
614 %1 = uitofp <8 x i32> %a to <8 x half>
619 define <8 x half> @uitofp_i64(<8 x i64> %a) #0 {
620 ; CHECK-LABEL: uitofp_i64:
622 ; CHECK-NEXT: ucvtf v0.2d, v0.2d
623 ; CHECK-NEXT: ucvtf v2.2d, v2.2d
624 ; CHECK-NEXT: ucvtf v1.2d, v1.2d
625 ; CHECK-NEXT: ucvtf v3.2d, v3.2d
626 ; CHECK-NEXT: fcvtn v0.2s, v0.2d
627 ; CHECK-NEXT: fcvtn v2.2s, v2.2d
628 ; CHECK-NEXT: fcvtn2 v0.4s, v1.2d
629 ; CHECK-NEXT: fcvtn2 v2.4s, v3.2d
630 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
631 ; CHECK-NEXT: fcvtn2 v0.8h, v2.4s
633 %1 = uitofp <8 x i64> %a to <8 x half>
637 define void @test_insert_at_zero(half %a, ptr %b) #0 {
638 ; CHECK-LABEL: test_insert_at_zero:
640 ; CHECK-NEXT: // kill: def $h0 killed $h0 def $q0
641 ; CHECK-NEXT: str q0, [x0]
643 %1 = insertelement <8 x half> undef, half %a, i64 0
644 store <8 x half> %1, ptr %b, align 4
648 define <8 x i8> @fptosi_i8(<8 x half> %a) #0 {
649 ; CHECK-CVT-LABEL: fptosi_i8:
650 ; CHECK-CVT: // %bb.0:
651 ; CHECK-CVT-NEXT: fcvtl2 v1.4s, v0.8h
652 ; CHECK-CVT-NEXT: fcvtl v0.4s, v0.4h
653 ; CHECK-CVT-NEXT: fcvtzs v1.4s, v1.4s
654 ; CHECK-CVT-NEXT: fcvtzs v0.4s, v0.4s
655 ; CHECK-CVT-NEXT: uzp1 v0.8h, v0.8h, v1.8h
656 ; CHECK-CVT-NEXT: xtn v0.8b, v0.8h
657 ; CHECK-CVT-NEXT: ret
659 ; CHECK-FP16-LABEL: fptosi_i8:
660 ; CHECK-FP16: // %bb.0:
661 ; CHECK-FP16-NEXT: fcvtzs v0.8h, v0.8h
662 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
663 ; CHECK-FP16-NEXT: ret
664 %1 = fptosi<8 x half> %a to <8 x i8>
668 define <8 x i16> @fptosi_i16(<8 x half> %a) #0 {
669 ; CHECK-CVT-LABEL: fptosi_i16:
670 ; CHECK-CVT: // %bb.0:
671 ; CHECK-CVT-NEXT: fcvtl2 v1.4s, v0.8h
672 ; CHECK-CVT-NEXT: fcvtl v0.4s, v0.4h
673 ; CHECK-CVT-NEXT: fcvtzs v1.4s, v1.4s
674 ; CHECK-CVT-NEXT: fcvtzs v0.4s, v0.4s
675 ; CHECK-CVT-NEXT: uzp1 v0.8h, v0.8h, v1.8h
676 ; CHECK-CVT-NEXT: ret
678 ; CHECK-FP16-LABEL: fptosi_i16:
679 ; CHECK-FP16: // %bb.0:
680 ; CHECK-FP16-NEXT: fcvtzs v0.8h, v0.8h
681 ; CHECK-FP16-NEXT: ret
682 %1 = fptosi<8 x half> %a to <8 x i16>
686 define <8 x i8> @fptoui_i8(<8 x half> %a) #0 {
687 ; CHECK-CVT-LABEL: fptoui_i8:
688 ; CHECK-CVT: // %bb.0:
689 ; CHECK-CVT-NEXT: fcvtl2 v1.4s, v0.8h
690 ; CHECK-CVT-NEXT: fcvtl v0.4s, v0.4h
691 ; CHECK-CVT-NEXT: fcvtzu v1.4s, v1.4s
692 ; CHECK-CVT-NEXT: fcvtzu v0.4s, v0.4s
693 ; CHECK-CVT-NEXT: uzp1 v0.8h, v0.8h, v1.8h
694 ; CHECK-CVT-NEXT: xtn v0.8b, v0.8h
695 ; CHECK-CVT-NEXT: ret
697 ; CHECK-FP16-LABEL: fptoui_i8:
698 ; CHECK-FP16: // %bb.0:
699 ; CHECK-FP16-NEXT: fcvtzu v0.8h, v0.8h
700 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
701 ; CHECK-FP16-NEXT: ret
702 %1 = fptoui<8 x half> %a to <8 x i8>
706 define <8 x i16> @fptoui_i16(<8 x half> %a) #0 {
707 ; CHECK-CVT-LABEL: fptoui_i16:
708 ; CHECK-CVT: // %bb.0:
709 ; CHECK-CVT-NEXT: fcvtl2 v1.4s, v0.8h
710 ; CHECK-CVT-NEXT: fcvtl v0.4s, v0.4h
711 ; CHECK-CVT-NEXT: fcvtzu v1.4s, v1.4s
712 ; CHECK-CVT-NEXT: fcvtzu v0.4s, v0.4s
713 ; CHECK-CVT-NEXT: uzp1 v0.8h, v0.8h, v1.8h
714 ; CHECK-CVT-NEXT: ret
716 ; CHECK-FP16-LABEL: fptoui_i16:
717 ; CHECK-FP16: // %bb.0:
718 ; CHECK-FP16-NEXT: fcvtzu v0.8h, v0.8h
719 ; CHECK-FP16-NEXT: ret
720 %1 = fptoui<8 x half> %a to <8 x i16>
724 define <8 x i1> @test_fcmp_une(<8 x half> %a, <8 x half> %b) #0 {
725 ; CHECK-CVT-LABEL: test_fcmp_une:
726 ; CHECK-CVT: // %bb.0:
727 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
728 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
729 ; CHECK-CVT-NEXT: fcvt s4, h1
730 ; CHECK-CVT-NEXT: fcvt s5, h0
731 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
732 ; CHECK-CVT-NEXT: fcvt s2, h2
733 ; CHECK-CVT-NEXT: fcvt s3, h3
734 ; CHECK-CVT-NEXT: fcmp s3, s2
735 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
736 ; CHECK-CVT-NEXT: mov h3, v1.h[3]
737 ; CHECK-CVT-NEXT: csetm w8, ne
738 ; CHECK-CVT-NEXT: fcmp s5, s4
739 ; CHECK-CVT-NEXT: fcvt s5, h6
740 ; CHECK-CVT-NEXT: fcvt s2, h2
741 ; CHECK-CVT-NEXT: mov h4, v0.h[3]
742 ; CHECK-CVT-NEXT: fcvt s3, h3
743 ; CHECK-CVT-NEXT: mov h6, v0.h[4]
744 ; CHECK-CVT-NEXT: csetm w9, ne
745 ; CHECK-CVT-NEXT: fcmp s2, s5
746 ; CHECK-CVT-NEXT: fmov s2, w9
747 ; CHECK-CVT-NEXT: fcvt s4, h4
748 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
749 ; CHECK-CVT-NEXT: fcvt s6, h6
750 ; CHECK-CVT-NEXT: mov v2.h[1], w8
751 ; CHECK-CVT-NEXT: csetm w8, ne
752 ; CHECK-CVT-NEXT: fcmp s4, s3
753 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
754 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
755 ; CHECK-CVT-NEXT: fcvt s5, h5
756 ; CHECK-CVT-NEXT: mov v2.h[2], w8
757 ; CHECK-CVT-NEXT: csetm w8, ne
758 ; CHECK-CVT-NEXT: fcvt s3, h3
759 ; CHECK-CVT-NEXT: fcvt s4, h4
760 ; CHECK-CVT-NEXT: fcmp s6, s5
761 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
762 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
763 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
764 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
765 ; CHECK-CVT-NEXT: mov v2.h[3], w8
766 ; CHECK-CVT-NEXT: csetm w8, ne
767 ; CHECK-CVT-NEXT: fcmp s4, s3
768 ; CHECK-CVT-NEXT: fcvt s3, h5
769 ; CHECK-CVT-NEXT: fcvt s4, h6
770 ; CHECK-CVT-NEXT: fcvt s1, h1
771 ; CHECK-CVT-NEXT: fcvt s0, h0
772 ; CHECK-CVT-NEXT: mov v2.h[4], w8
773 ; CHECK-CVT-NEXT: csetm w8, ne
774 ; CHECK-CVT-NEXT: fcmp s4, s3
775 ; CHECK-CVT-NEXT: mov v2.h[5], w8
776 ; CHECK-CVT-NEXT: csetm w8, ne
777 ; CHECK-CVT-NEXT: fcmp s0, s1
778 ; CHECK-CVT-NEXT: mov v2.h[6], w8
779 ; CHECK-CVT-NEXT: csetm w8, ne
780 ; CHECK-CVT-NEXT: mov v2.h[7], w8
781 ; CHECK-CVT-NEXT: xtn v0.8b, v2.8h
782 ; CHECK-CVT-NEXT: ret
784 ; CHECK-FP16-LABEL: test_fcmp_une:
785 ; CHECK-FP16: // %bb.0:
786 ; CHECK-FP16-NEXT: fcmeq v0.8h, v0.8h, v1.8h
787 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
788 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
789 ; CHECK-FP16-NEXT: ret
790 %1 = fcmp une <8 x half> %a, %b
794 define <8 x i1> @test_fcmp_ueq(<8 x half> %a, <8 x half> %b) #0 {
795 ; CHECK-CVT-LABEL: test_fcmp_ueq:
796 ; CHECK-CVT: // %bb.0:
797 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
798 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
799 ; CHECK-CVT-NEXT: fcvt s4, h1
800 ; CHECK-CVT-NEXT: fcvt s6, h0
801 ; CHECK-CVT-NEXT: mov h5, v1.h[2]
802 ; CHECK-CVT-NEXT: fcvt s2, h2
803 ; CHECK-CVT-NEXT: fcvt s3, h3
804 ; CHECK-CVT-NEXT: fcmp s3, s2
805 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
806 ; CHECK-CVT-NEXT: fcvt s3, h5
807 ; CHECK-CVT-NEXT: mov h5, v0.h[3]
808 ; CHECK-CVT-NEXT: csetm w8, eq
809 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, vc
810 ; CHECK-CVT-NEXT: fcmp s6, s4
811 ; CHECK-CVT-NEXT: fcvt s2, h2
812 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
813 ; CHECK-CVT-NEXT: mov h6, v1.h[4]
814 ; CHECK-CVT-NEXT: csetm w9, eq
815 ; CHECK-CVT-NEXT: csinv w9, w9, wzr, vc
816 ; CHECK-CVT-NEXT: fcmp s2, s3
817 ; CHECK-CVT-NEXT: mov h2, v0.h[4]
818 ; CHECK-CVT-NEXT: fcvt s3, h4
819 ; CHECK-CVT-NEXT: fcvt s4, h5
820 ; CHECK-CVT-NEXT: fmov s5, w9
821 ; CHECK-CVT-NEXT: fcvt s6, h6
822 ; CHECK-CVT-NEXT: mov v5.h[1], w8
823 ; CHECK-CVT-NEXT: csetm w8, eq
824 ; CHECK-CVT-NEXT: fcvt s2, h2
825 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, vc
826 ; CHECK-CVT-NEXT: fcmp s4, s3
827 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
828 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
829 ; CHECK-CVT-NEXT: mov v5.h[2], w8
830 ; CHECK-CVT-NEXT: csetm w8, eq
831 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, vc
832 ; CHECK-CVT-NEXT: fcmp s2, s6
833 ; CHECK-CVT-NEXT: fcvt s2, h3
834 ; CHECK-CVT-NEXT: fcvt s3, h4
835 ; CHECK-CVT-NEXT: mov h4, v1.h[6]
836 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
837 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
838 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
839 ; CHECK-CVT-NEXT: mov v5.h[3], w8
840 ; CHECK-CVT-NEXT: csetm w8, eq
841 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, vc
842 ; CHECK-CVT-NEXT: fcmp s3, s2
843 ; CHECK-CVT-NEXT: fcvt s2, h4
844 ; CHECK-CVT-NEXT: fcvt s3, h6
845 ; CHECK-CVT-NEXT: fcvt s1, h1
846 ; CHECK-CVT-NEXT: fcvt s0, h0
847 ; CHECK-CVT-NEXT: mov v5.h[4], w8
848 ; CHECK-CVT-NEXT: csetm w8, eq
849 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, vc
850 ; CHECK-CVT-NEXT: fcmp s3, s2
851 ; CHECK-CVT-NEXT: mov v5.h[5], w8
852 ; CHECK-CVT-NEXT: csetm w8, eq
853 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, vc
854 ; CHECK-CVT-NEXT: fcmp s0, s1
855 ; CHECK-CVT-NEXT: mov v5.h[6], w8
856 ; CHECK-CVT-NEXT: csetm w8, eq
857 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, vc
858 ; CHECK-CVT-NEXT: mov v5.h[7], w8
859 ; CHECK-CVT-NEXT: xtn v0.8b, v5.8h
860 ; CHECK-CVT-NEXT: ret
862 ; CHECK-FP16-LABEL: test_fcmp_ueq:
863 ; CHECK-FP16: // %bb.0:
864 ; CHECK-FP16-NEXT: fcmgt v2.8h, v0.8h, v1.8h
865 ; CHECK-FP16-NEXT: fcmgt v0.8h, v1.8h, v0.8h
866 ; CHECK-FP16-NEXT: orr v0.16b, v0.16b, v2.16b
867 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
868 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
869 ; CHECK-FP16-NEXT: ret
870 %1 = fcmp ueq <8 x half> %a, %b
874 define <8 x i1> @test_fcmp_ugt(<8 x half> %a, <8 x half> %b) #0 {
875 ; CHECK-CVT-LABEL: test_fcmp_ugt:
876 ; CHECK-CVT: // %bb.0:
877 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
878 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
879 ; CHECK-CVT-NEXT: fcvt s4, h1
880 ; CHECK-CVT-NEXT: fcvt s5, h0
881 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
882 ; CHECK-CVT-NEXT: fcvt s2, h2
883 ; CHECK-CVT-NEXT: fcvt s3, h3
884 ; CHECK-CVT-NEXT: fcmp s3, s2
885 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
886 ; CHECK-CVT-NEXT: mov h3, v1.h[3]
887 ; CHECK-CVT-NEXT: csetm w8, hi
888 ; CHECK-CVT-NEXT: fcmp s5, s4
889 ; CHECK-CVT-NEXT: fcvt s5, h6
890 ; CHECK-CVT-NEXT: fcvt s2, h2
891 ; CHECK-CVT-NEXT: mov h4, v0.h[3]
892 ; CHECK-CVT-NEXT: fcvt s3, h3
893 ; CHECK-CVT-NEXT: mov h6, v0.h[4]
894 ; CHECK-CVT-NEXT: csetm w9, hi
895 ; CHECK-CVT-NEXT: fcmp s2, s5
896 ; CHECK-CVT-NEXT: fmov s2, w9
897 ; CHECK-CVT-NEXT: fcvt s4, h4
898 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
899 ; CHECK-CVT-NEXT: fcvt s6, h6
900 ; CHECK-CVT-NEXT: mov v2.h[1], w8
901 ; CHECK-CVT-NEXT: csetm w8, hi
902 ; CHECK-CVT-NEXT: fcmp s4, s3
903 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
904 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
905 ; CHECK-CVT-NEXT: fcvt s5, h5
906 ; CHECK-CVT-NEXT: mov v2.h[2], w8
907 ; CHECK-CVT-NEXT: csetm w8, hi
908 ; CHECK-CVT-NEXT: fcvt s3, h3
909 ; CHECK-CVT-NEXT: fcvt s4, h4
910 ; CHECK-CVT-NEXT: fcmp s6, s5
911 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
912 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
913 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
914 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
915 ; CHECK-CVT-NEXT: mov v2.h[3], w8
916 ; CHECK-CVT-NEXT: csetm w8, hi
917 ; CHECK-CVT-NEXT: fcmp s4, s3
918 ; CHECK-CVT-NEXT: fcvt s3, h5
919 ; CHECK-CVT-NEXT: fcvt s4, h6
920 ; CHECK-CVT-NEXT: fcvt s1, h1
921 ; CHECK-CVT-NEXT: fcvt s0, h0
922 ; CHECK-CVT-NEXT: mov v2.h[4], w8
923 ; CHECK-CVT-NEXT: csetm w8, hi
924 ; CHECK-CVT-NEXT: fcmp s4, s3
925 ; CHECK-CVT-NEXT: mov v2.h[5], w8
926 ; CHECK-CVT-NEXT: csetm w8, hi
927 ; CHECK-CVT-NEXT: fcmp s0, s1
928 ; CHECK-CVT-NEXT: mov v2.h[6], w8
929 ; CHECK-CVT-NEXT: csetm w8, hi
930 ; CHECK-CVT-NEXT: mov v2.h[7], w8
931 ; CHECK-CVT-NEXT: xtn v0.8b, v2.8h
932 ; CHECK-CVT-NEXT: ret
934 ; CHECK-FP16-LABEL: test_fcmp_ugt:
935 ; CHECK-FP16: // %bb.0:
936 ; CHECK-FP16-NEXT: fcmge v0.8h, v1.8h, v0.8h
937 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
938 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
939 ; CHECK-FP16-NEXT: ret
940 %1 = fcmp ugt <8 x half> %a, %b
944 define <8 x i1> @test_fcmp_uge(<8 x half> %a, <8 x half> %b) #0 {
945 ; CHECK-CVT-LABEL: test_fcmp_uge:
946 ; CHECK-CVT: // %bb.0:
947 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
948 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
949 ; CHECK-CVT-NEXT: fcvt s4, h1
950 ; CHECK-CVT-NEXT: fcvt s5, h0
951 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
952 ; CHECK-CVT-NEXT: fcvt s2, h2
953 ; CHECK-CVT-NEXT: fcvt s3, h3
954 ; CHECK-CVT-NEXT: fcmp s3, s2
955 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
956 ; CHECK-CVT-NEXT: mov h3, v1.h[3]
957 ; CHECK-CVT-NEXT: csetm w8, pl
958 ; CHECK-CVT-NEXT: fcmp s5, s4
959 ; CHECK-CVT-NEXT: fcvt s5, h6
960 ; CHECK-CVT-NEXT: fcvt s2, h2
961 ; CHECK-CVT-NEXT: mov h4, v0.h[3]
962 ; CHECK-CVT-NEXT: fcvt s3, h3
963 ; CHECK-CVT-NEXT: mov h6, v0.h[4]
964 ; CHECK-CVT-NEXT: csetm w9, pl
965 ; CHECK-CVT-NEXT: fcmp s2, s5
966 ; CHECK-CVT-NEXT: fmov s2, w9
967 ; CHECK-CVT-NEXT: fcvt s4, h4
968 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
969 ; CHECK-CVT-NEXT: fcvt s6, h6
970 ; CHECK-CVT-NEXT: mov v2.h[1], w8
971 ; CHECK-CVT-NEXT: csetm w8, pl
972 ; CHECK-CVT-NEXT: fcmp s4, s3
973 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
974 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
975 ; CHECK-CVT-NEXT: fcvt s5, h5
976 ; CHECK-CVT-NEXT: mov v2.h[2], w8
977 ; CHECK-CVT-NEXT: csetm w8, pl
978 ; CHECK-CVT-NEXT: fcvt s3, h3
979 ; CHECK-CVT-NEXT: fcvt s4, h4
980 ; CHECK-CVT-NEXT: fcmp s6, s5
981 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
982 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
983 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
984 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
985 ; CHECK-CVT-NEXT: mov v2.h[3], w8
986 ; CHECK-CVT-NEXT: csetm w8, pl
987 ; CHECK-CVT-NEXT: fcmp s4, s3
988 ; CHECK-CVT-NEXT: fcvt s3, h5
989 ; CHECK-CVT-NEXT: fcvt s4, h6
990 ; CHECK-CVT-NEXT: fcvt s1, h1
991 ; CHECK-CVT-NEXT: fcvt s0, h0
992 ; CHECK-CVT-NEXT: mov v2.h[4], w8
993 ; CHECK-CVT-NEXT: csetm w8, pl
994 ; CHECK-CVT-NEXT: fcmp s4, s3
995 ; CHECK-CVT-NEXT: mov v2.h[5], w8
996 ; CHECK-CVT-NEXT: csetm w8, pl
997 ; CHECK-CVT-NEXT: fcmp s0, s1
998 ; CHECK-CVT-NEXT: mov v2.h[6], w8
999 ; CHECK-CVT-NEXT: csetm w8, pl
1000 ; CHECK-CVT-NEXT: mov v2.h[7], w8
1001 ; CHECK-CVT-NEXT: xtn v0.8b, v2.8h
1002 ; CHECK-CVT-NEXT: ret
1004 ; CHECK-FP16-LABEL: test_fcmp_uge:
1005 ; CHECK-FP16: // %bb.0:
1006 ; CHECK-FP16-NEXT: fcmgt v0.8h, v1.8h, v0.8h
1007 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
1008 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1009 ; CHECK-FP16-NEXT: ret
1010 %1 = fcmp uge <8 x half> %a, %b
1014 define <8 x i1> @test_fcmp_ult(<8 x half> %a, <8 x half> %b) #0 {
1015 ; CHECK-CVT-LABEL: test_fcmp_ult:
1016 ; CHECK-CVT: // %bb.0:
1017 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1018 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1019 ; CHECK-CVT-NEXT: fcvt s4, h1
1020 ; CHECK-CVT-NEXT: fcvt s5, h0
1021 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
1022 ; CHECK-CVT-NEXT: fcvt s2, h2
1023 ; CHECK-CVT-NEXT: fcvt s3, h3
1024 ; CHECK-CVT-NEXT: fcmp s3, s2
1025 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1026 ; CHECK-CVT-NEXT: mov h3, v1.h[3]
1027 ; CHECK-CVT-NEXT: csetm w8, lt
1028 ; CHECK-CVT-NEXT: fcmp s5, s4
1029 ; CHECK-CVT-NEXT: fcvt s5, h6
1030 ; CHECK-CVT-NEXT: fcvt s2, h2
1031 ; CHECK-CVT-NEXT: mov h4, v0.h[3]
1032 ; CHECK-CVT-NEXT: fcvt s3, h3
1033 ; CHECK-CVT-NEXT: mov h6, v0.h[4]
1034 ; CHECK-CVT-NEXT: csetm w9, lt
1035 ; CHECK-CVT-NEXT: fcmp s2, s5
1036 ; CHECK-CVT-NEXT: fmov s2, w9
1037 ; CHECK-CVT-NEXT: fcvt s4, h4
1038 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
1039 ; CHECK-CVT-NEXT: fcvt s6, h6
1040 ; CHECK-CVT-NEXT: mov v2.h[1], w8
1041 ; CHECK-CVT-NEXT: csetm w8, lt
1042 ; CHECK-CVT-NEXT: fcmp s4, s3
1043 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
1044 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
1045 ; CHECK-CVT-NEXT: fcvt s5, h5
1046 ; CHECK-CVT-NEXT: mov v2.h[2], w8
1047 ; CHECK-CVT-NEXT: csetm w8, lt
1048 ; CHECK-CVT-NEXT: fcvt s3, h3
1049 ; CHECK-CVT-NEXT: fcvt s4, h4
1050 ; CHECK-CVT-NEXT: fcmp s6, s5
1051 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
1052 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
1053 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1054 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1055 ; CHECK-CVT-NEXT: mov v2.h[3], w8
1056 ; CHECK-CVT-NEXT: csetm w8, lt
1057 ; CHECK-CVT-NEXT: fcmp s4, s3
1058 ; CHECK-CVT-NEXT: fcvt s3, h5
1059 ; CHECK-CVT-NEXT: fcvt s4, h6
1060 ; CHECK-CVT-NEXT: fcvt s1, h1
1061 ; CHECK-CVT-NEXT: fcvt s0, h0
1062 ; CHECK-CVT-NEXT: mov v2.h[4], w8
1063 ; CHECK-CVT-NEXT: csetm w8, lt
1064 ; CHECK-CVT-NEXT: fcmp s4, s3
1065 ; CHECK-CVT-NEXT: mov v2.h[5], w8
1066 ; CHECK-CVT-NEXT: csetm w8, lt
1067 ; CHECK-CVT-NEXT: fcmp s0, s1
1068 ; CHECK-CVT-NEXT: mov v2.h[6], w8
1069 ; CHECK-CVT-NEXT: csetm w8, lt
1070 ; CHECK-CVT-NEXT: mov v2.h[7], w8
1071 ; CHECK-CVT-NEXT: xtn v0.8b, v2.8h
1072 ; CHECK-CVT-NEXT: ret
1074 ; CHECK-FP16-LABEL: test_fcmp_ult:
1075 ; CHECK-FP16: // %bb.0:
1076 ; CHECK-FP16-NEXT: fcmge v0.8h, v0.8h, v1.8h
1077 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
1078 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1079 ; CHECK-FP16-NEXT: ret
1080 %1 = fcmp ult <8 x half> %a, %b
1084 define <8 x i1> @test_fcmp_ule(<8 x half> %a, <8 x half> %b) #0 {
1085 ; CHECK-CVT-LABEL: test_fcmp_ule:
1086 ; CHECK-CVT: // %bb.0:
1087 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1088 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1089 ; CHECK-CVT-NEXT: fcvt s4, h1
1090 ; CHECK-CVT-NEXT: fcvt s5, h0
1091 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
1092 ; CHECK-CVT-NEXT: fcvt s2, h2
1093 ; CHECK-CVT-NEXT: fcvt s3, h3
1094 ; CHECK-CVT-NEXT: fcmp s3, s2
1095 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1096 ; CHECK-CVT-NEXT: mov h3, v1.h[3]
1097 ; CHECK-CVT-NEXT: csetm w8, le
1098 ; CHECK-CVT-NEXT: fcmp s5, s4
1099 ; CHECK-CVT-NEXT: fcvt s5, h6
1100 ; CHECK-CVT-NEXT: fcvt s2, h2
1101 ; CHECK-CVT-NEXT: mov h4, v0.h[3]
1102 ; CHECK-CVT-NEXT: fcvt s3, h3
1103 ; CHECK-CVT-NEXT: mov h6, v0.h[4]
1104 ; CHECK-CVT-NEXT: csetm w9, le
1105 ; CHECK-CVT-NEXT: fcmp s2, s5
1106 ; CHECK-CVT-NEXT: fmov s2, w9
1107 ; CHECK-CVT-NEXT: fcvt s4, h4
1108 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
1109 ; CHECK-CVT-NEXT: fcvt s6, h6
1110 ; CHECK-CVT-NEXT: mov v2.h[1], w8
1111 ; CHECK-CVT-NEXT: csetm w8, le
1112 ; CHECK-CVT-NEXT: fcmp s4, s3
1113 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
1114 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
1115 ; CHECK-CVT-NEXT: fcvt s5, h5
1116 ; CHECK-CVT-NEXT: mov v2.h[2], w8
1117 ; CHECK-CVT-NEXT: csetm w8, le
1118 ; CHECK-CVT-NEXT: fcvt s3, h3
1119 ; CHECK-CVT-NEXT: fcvt s4, h4
1120 ; CHECK-CVT-NEXT: fcmp s6, s5
1121 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
1122 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
1123 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1124 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1125 ; CHECK-CVT-NEXT: mov v2.h[3], w8
1126 ; CHECK-CVT-NEXT: csetm w8, le
1127 ; CHECK-CVT-NEXT: fcmp s4, s3
1128 ; CHECK-CVT-NEXT: fcvt s3, h5
1129 ; CHECK-CVT-NEXT: fcvt s4, h6
1130 ; CHECK-CVT-NEXT: fcvt s1, h1
1131 ; CHECK-CVT-NEXT: fcvt s0, h0
1132 ; CHECK-CVT-NEXT: mov v2.h[4], w8
1133 ; CHECK-CVT-NEXT: csetm w8, le
1134 ; CHECK-CVT-NEXT: fcmp s4, s3
1135 ; CHECK-CVT-NEXT: mov v2.h[5], w8
1136 ; CHECK-CVT-NEXT: csetm w8, le
1137 ; CHECK-CVT-NEXT: fcmp s0, s1
1138 ; CHECK-CVT-NEXT: mov v2.h[6], w8
1139 ; CHECK-CVT-NEXT: csetm w8, le
1140 ; CHECK-CVT-NEXT: mov v2.h[7], w8
1141 ; CHECK-CVT-NEXT: xtn v0.8b, v2.8h
1142 ; CHECK-CVT-NEXT: ret
1144 ; CHECK-FP16-LABEL: test_fcmp_ule:
1145 ; CHECK-FP16: // %bb.0:
1146 ; CHECK-FP16-NEXT: fcmgt v0.8h, v0.8h, v1.8h
1147 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
1148 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1149 ; CHECK-FP16-NEXT: ret
1150 %1 = fcmp ule <8 x half> %a, %b
1154 define <8 x i1> @test_fcmp_uno(<8 x half> %a, <8 x half> %b) #0 {
1155 ; CHECK-CVT-LABEL: test_fcmp_uno:
1156 ; CHECK-CVT: // %bb.0:
1157 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1158 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1159 ; CHECK-CVT-NEXT: fcvt s4, h1
1160 ; CHECK-CVT-NEXT: fcvt s5, h0
1161 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
1162 ; CHECK-CVT-NEXT: fcvt s2, h2
1163 ; CHECK-CVT-NEXT: fcvt s3, h3
1164 ; CHECK-CVT-NEXT: fcmp s3, s2
1165 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1166 ; CHECK-CVT-NEXT: mov h3, v1.h[3]
1167 ; CHECK-CVT-NEXT: csetm w8, vs
1168 ; CHECK-CVT-NEXT: fcmp s5, s4
1169 ; CHECK-CVT-NEXT: fcvt s5, h6
1170 ; CHECK-CVT-NEXT: fcvt s2, h2
1171 ; CHECK-CVT-NEXT: mov h4, v0.h[3]
1172 ; CHECK-CVT-NEXT: fcvt s3, h3
1173 ; CHECK-CVT-NEXT: mov h6, v0.h[4]
1174 ; CHECK-CVT-NEXT: csetm w9, vs
1175 ; CHECK-CVT-NEXT: fcmp s2, s5
1176 ; CHECK-CVT-NEXT: fmov s2, w9
1177 ; CHECK-CVT-NEXT: fcvt s4, h4
1178 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
1179 ; CHECK-CVT-NEXT: fcvt s6, h6
1180 ; CHECK-CVT-NEXT: mov v2.h[1], w8
1181 ; CHECK-CVT-NEXT: csetm w8, vs
1182 ; CHECK-CVT-NEXT: fcmp s4, s3
1183 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
1184 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
1185 ; CHECK-CVT-NEXT: fcvt s5, h5
1186 ; CHECK-CVT-NEXT: mov v2.h[2], w8
1187 ; CHECK-CVT-NEXT: csetm w8, vs
1188 ; CHECK-CVT-NEXT: fcvt s3, h3
1189 ; CHECK-CVT-NEXT: fcvt s4, h4
1190 ; CHECK-CVT-NEXT: fcmp s6, s5
1191 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
1192 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
1193 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1194 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1195 ; CHECK-CVT-NEXT: mov v2.h[3], w8
1196 ; CHECK-CVT-NEXT: csetm w8, vs
1197 ; CHECK-CVT-NEXT: fcmp s4, s3
1198 ; CHECK-CVT-NEXT: fcvt s3, h5
1199 ; CHECK-CVT-NEXT: fcvt s4, h6
1200 ; CHECK-CVT-NEXT: fcvt s1, h1
1201 ; CHECK-CVT-NEXT: fcvt s0, h0
1202 ; CHECK-CVT-NEXT: mov v2.h[4], w8
1203 ; CHECK-CVT-NEXT: csetm w8, vs
1204 ; CHECK-CVT-NEXT: fcmp s4, s3
1205 ; CHECK-CVT-NEXT: mov v2.h[5], w8
1206 ; CHECK-CVT-NEXT: csetm w8, vs
1207 ; CHECK-CVT-NEXT: fcmp s0, s1
1208 ; CHECK-CVT-NEXT: mov v2.h[6], w8
1209 ; CHECK-CVT-NEXT: csetm w8, vs
1210 ; CHECK-CVT-NEXT: mov v2.h[7], w8
1211 ; CHECK-CVT-NEXT: xtn v0.8b, v2.8h
1212 ; CHECK-CVT-NEXT: ret
1214 ; CHECK-FP16-LABEL: test_fcmp_uno:
1215 ; CHECK-FP16: // %bb.0:
1216 ; CHECK-FP16-NEXT: fcmge v2.8h, v0.8h, v1.8h
1217 ; CHECK-FP16-NEXT: fcmgt v0.8h, v1.8h, v0.8h
1218 ; CHECK-FP16-NEXT: orr v0.16b, v0.16b, v2.16b
1219 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
1220 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1221 ; CHECK-FP16-NEXT: ret
1222 %1 = fcmp uno <8 x half> %a, %b
1226 define <8 x i1> @test_fcmp_one(<8 x half> %a, <8 x half> %b) #0 {
1227 ; CHECK-CVT-LABEL: test_fcmp_one:
1228 ; CHECK-CVT: // %bb.0:
1229 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1230 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1231 ; CHECK-CVT-NEXT: fcvt s4, h1
1232 ; CHECK-CVT-NEXT: fcvt s6, h0
1233 ; CHECK-CVT-NEXT: mov h5, v1.h[2]
1234 ; CHECK-CVT-NEXT: fcvt s2, h2
1235 ; CHECK-CVT-NEXT: fcvt s3, h3
1236 ; CHECK-CVT-NEXT: fcmp s3, s2
1237 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1238 ; CHECK-CVT-NEXT: fcvt s3, h5
1239 ; CHECK-CVT-NEXT: mov h5, v0.h[3]
1240 ; CHECK-CVT-NEXT: csetm w8, mi
1241 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, le
1242 ; CHECK-CVT-NEXT: fcmp s6, s4
1243 ; CHECK-CVT-NEXT: fcvt s2, h2
1244 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
1245 ; CHECK-CVT-NEXT: mov h6, v1.h[4]
1246 ; CHECK-CVT-NEXT: csetm w9, mi
1247 ; CHECK-CVT-NEXT: csinv w9, w9, wzr, le
1248 ; CHECK-CVT-NEXT: fcmp s2, s3
1249 ; CHECK-CVT-NEXT: mov h2, v0.h[4]
1250 ; CHECK-CVT-NEXT: fcvt s3, h4
1251 ; CHECK-CVT-NEXT: fcvt s4, h5
1252 ; CHECK-CVT-NEXT: fmov s5, w9
1253 ; CHECK-CVT-NEXT: fcvt s6, h6
1254 ; CHECK-CVT-NEXT: mov v5.h[1], w8
1255 ; CHECK-CVT-NEXT: csetm w8, mi
1256 ; CHECK-CVT-NEXT: fcvt s2, h2
1257 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, le
1258 ; CHECK-CVT-NEXT: fcmp s4, s3
1259 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
1260 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
1261 ; CHECK-CVT-NEXT: mov v5.h[2], w8
1262 ; CHECK-CVT-NEXT: csetm w8, mi
1263 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, le
1264 ; CHECK-CVT-NEXT: fcmp s2, s6
1265 ; CHECK-CVT-NEXT: fcvt s2, h3
1266 ; CHECK-CVT-NEXT: fcvt s3, h4
1267 ; CHECK-CVT-NEXT: mov h4, v1.h[6]
1268 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
1269 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1270 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1271 ; CHECK-CVT-NEXT: mov v5.h[3], w8
1272 ; CHECK-CVT-NEXT: csetm w8, mi
1273 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, le
1274 ; CHECK-CVT-NEXT: fcmp s3, s2
1275 ; CHECK-CVT-NEXT: fcvt s2, h4
1276 ; CHECK-CVT-NEXT: fcvt s3, h6
1277 ; CHECK-CVT-NEXT: fcvt s1, h1
1278 ; CHECK-CVT-NEXT: fcvt s0, h0
1279 ; CHECK-CVT-NEXT: mov v5.h[4], w8
1280 ; CHECK-CVT-NEXT: csetm w8, mi
1281 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, le
1282 ; CHECK-CVT-NEXT: fcmp s3, s2
1283 ; CHECK-CVT-NEXT: mov v5.h[5], w8
1284 ; CHECK-CVT-NEXT: csetm w8, mi
1285 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, le
1286 ; CHECK-CVT-NEXT: fcmp s0, s1
1287 ; CHECK-CVT-NEXT: mov v5.h[6], w8
1288 ; CHECK-CVT-NEXT: csetm w8, mi
1289 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, le
1290 ; CHECK-CVT-NEXT: mov v5.h[7], w8
1291 ; CHECK-CVT-NEXT: xtn v0.8b, v5.8h
1292 ; CHECK-CVT-NEXT: ret
1294 ; CHECK-FP16-LABEL: test_fcmp_one:
1295 ; CHECK-FP16: // %bb.0:
1296 ; CHECK-FP16-NEXT: fcmgt v2.8h, v0.8h, v1.8h
1297 ; CHECK-FP16-NEXT: fcmgt v0.8h, v1.8h, v0.8h
1298 ; CHECK-FP16-NEXT: orr v0.16b, v0.16b, v2.16b
1299 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1300 ; CHECK-FP16-NEXT: ret
1301 %1 = fcmp one <8 x half> %a, %b
1305 define <8 x i1> @test_fcmp_oeq(<8 x half> %a, <8 x half> %b) #0 {
1306 ; CHECK-CVT-LABEL: test_fcmp_oeq:
1307 ; CHECK-CVT: // %bb.0:
1308 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1309 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1310 ; CHECK-CVT-NEXT: fcvt s4, h1
1311 ; CHECK-CVT-NEXT: fcvt s5, h0
1312 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
1313 ; CHECK-CVT-NEXT: fcvt s2, h2
1314 ; CHECK-CVT-NEXT: fcvt s3, h3
1315 ; CHECK-CVT-NEXT: fcmp s3, s2
1316 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1317 ; CHECK-CVT-NEXT: mov h3, v1.h[3]
1318 ; CHECK-CVT-NEXT: csetm w8, eq
1319 ; CHECK-CVT-NEXT: fcmp s5, s4
1320 ; CHECK-CVT-NEXT: fcvt s5, h6
1321 ; CHECK-CVT-NEXT: fcvt s2, h2
1322 ; CHECK-CVT-NEXT: mov h4, v0.h[3]
1323 ; CHECK-CVT-NEXT: fcvt s3, h3
1324 ; CHECK-CVT-NEXT: mov h6, v0.h[4]
1325 ; CHECK-CVT-NEXT: csetm w9, eq
1326 ; CHECK-CVT-NEXT: fcmp s2, s5
1327 ; CHECK-CVT-NEXT: fmov s2, w9
1328 ; CHECK-CVT-NEXT: fcvt s4, h4
1329 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
1330 ; CHECK-CVT-NEXT: fcvt s6, h6
1331 ; CHECK-CVT-NEXT: mov v2.h[1], w8
1332 ; CHECK-CVT-NEXT: csetm w8, eq
1333 ; CHECK-CVT-NEXT: fcmp s4, s3
1334 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
1335 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
1336 ; CHECK-CVT-NEXT: fcvt s5, h5
1337 ; CHECK-CVT-NEXT: mov v2.h[2], w8
1338 ; CHECK-CVT-NEXT: csetm w8, eq
1339 ; CHECK-CVT-NEXT: fcvt s3, h3
1340 ; CHECK-CVT-NEXT: fcvt s4, h4
1341 ; CHECK-CVT-NEXT: fcmp s6, s5
1342 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
1343 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
1344 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1345 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1346 ; CHECK-CVT-NEXT: mov v2.h[3], w8
1347 ; CHECK-CVT-NEXT: csetm w8, eq
1348 ; CHECK-CVT-NEXT: fcmp s4, s3
1349 ; CHECK-CVT-NEXT: fcvt s3, h5
1350 ; CHECK-CVT-NEXT: fcvt s4, h6
1351 ; CHECK-CVT-NEXT: fcvt s1, h1
1352 ; CHECK-CVT-NEXT: fcvt s0, h0
1353 ; CHECK-CVT-NEXT: mov v2.h[4], w8
1354 ; CHECK-CVT-NEXT: csetm w8, eq
1355 ; CHECK-CVT-NEXT: fcmp s4, s3
1356 ; CHECK-CVT-NEXT: mov v2.h[5], w8
1357 ; CHECK-CVT-NEXT: csetm w8, eq
1358 ; CHECK-CVT-NEXT: fcmp s0, s1
1359 ; CHECK-CVT-NEXT: mov v2.h[6], w8
1360 ; CHECK-CVT-NEXT: csetm w8, eq
1361 ; CHECK-CVT-NEXT: mov v2.h[7], w8
1362 ; CHECK-CVT-NEXT: xtn v0.8b, v2.8h
1363 ; CHECK-CVT-NEXT: ret
1365 ; CHECK-FP16-LABEL: test_fcmp_oeq:
1366 ; CHECK-FP16: // %bb.0:
1367 ; CHECK-FP16-NEXT: fcmeq v0.8h, v0.8h, v1.8h
1368 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1369 ; CHECK-FP16-NEXT: ret
1370 %1 = fcmp oeq <8 x half> %a, %b
1374 define <8 x i1> @test_fcmp_ogt(<8 x half> %a, <8 x half> %b) #0 {
1375 ; CHECK-CVT-LABEL: test_fcmp_ogt:
1376 ; CHECK-CVT: // %bb.0:
1377 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1378 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1379 ; CHECK-CVT-NEXT: fcvt s4, h1
1380 ; CHECK-CVT-NEXT: fcvt s5, h0
1381 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
1382 ; CHECK-CVT-NEXT: fcvt s2, h2
1383 ; CHECK-CVT-NEXT: fcvt s3, h3
1384 ; CHECK-CVT-NEXT: fcmp s3, s2
1385 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1386 ; CHECK-CVT-NEXT: mov h3, v1.h[3]
1387 ; CHECK-CVT-NEXT: csetm w8, gt
1388 ; CHECK-CVT-NEXT: fcmp s5, s4
1389 ; CHECK-CVT-NEXT: fcvt s5, h6
1390 ; CHECK-CVT-NEXT: fcvt s2, h2
1391 ; CHECK-CVT-NEXT: mov h4, v0.h[3]
1392 ; CHECK-CVT-NEXT: fcvt s3, h3
1393 ; CHECK-CVT-NEXT: mov h6, v0.h[4]
1394 ; CHECK-CVT-NEXT: csetm w9, gt
1395 ; CHECK-CVT-NEXT: fcmp s2, s5
1396 ; CHECK-CVT-NEXT: fmov s2, w9
1397 ; CHECK-CVT-NEXT: fcvt s4, h4
1398 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
1399 ; CHECK-CVT-NEXT: fcvt s6, h6
1400 ; CHECK-CVT-NEXT: mov v2.h[1], w8
1401 ; CHECK-CVT-NEXT: csetm w8, gt
1402 ; CHECK-CVT-NEXT: fcmp s4, s3
1403 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
1404 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
1405 ; CHECK-CVT-NEXT: fcvt s5, h5
1406 ; CHECK-CVT-NEXT: mov v2.h[2], w8
1407 ; CHECK-CVT-NEXT: csetm w8, gt
1408 ; CHECK-CVT-NEXT: fcvt s3, h3
1409 ; CHECK-CVT-NEXT: fcvt s4, h4
1410 ; CHECK-CVT-NEXT: fcmp s6, s5
1411 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
1412 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
1413 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1414 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1415 ; CHECK-CVT-NEXT: mov v2.h[3], w8
1416 ; CHECK-CVT-NEXT: csetm w8, gt
1417 ; CHECK-CVT-NEXT: fcmp s4, s3
1418 ; CHECK-CVT-NEXT: fcvt s3, h5
1419 ; CHECK-CVT-NEXT: fcvt s4, h6
1420 ; CHECK-CVT-NEXT: fcvt s1, h1
1421 ; CHECK-CVT-NEXT: fcvt s0, h0
1422 ; CHECK-CVT-NEXT: mov v2.h[4], w8
1423 ; CHECK-CVT-NEXT: csetm w8, gt
1424 ; CHECK-CVT-NEXT: fcmp s4, s3
1425 ; CHECK-CVT-NEXT: mov v2.h[5], w8
1426 ; CHECK-CVT-NEXT: csetm w8, gt
1427 ; CHECK-CVT-NEXT: fcmp s0, s1
1428 ; CHECK-CVT-NEXT: mov v2.h[6], w8
1429 ; CHECK-CVT-NEXT: csetm w8, gt
1430 ; CHECK-CVT-NEXT: mov v2.h[7], w8
1431 ; CHECK-CVT-NEXT: xtn v0.8b, v2.8h
1432 ; CHECK-CVT-NEXT: ret
1434 ; CHECK-FP16-LABEL: test_fcmp_ogt:
1435 ; CHECK-FP16: // %bb.0:
1436 ; CHECK-FP16-NEXT: fcmgt v0.8h, v0.8h, v1.8h
1437 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1438 ; CHECK-FP16-NEXT: ret
1439 %1 = fcmp ogt <8 x half> %a, %b
1443 define <8 x i1> @test_fcmp_oge(<8 x half> %a, <8 x half> %b) #0 {
1444 ; CHECK-CVT-LABEL: test_fcmp_oge:
1445 ; CHECK-CVT: // %bb.0:
1446 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1447 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1448 ; CHECK-CVT-NEXT: fcvt s4, h1
1449 ; CHECK-CVT-NEXT: fcvt s5, h0
1450 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
1451 ; CHECK-CVT-NEXT: fcvt s2, h2
1452 ; CHECK-CVT-NEXT: fcvt s3, h3
1453 ; CHECK-CVT-NEXT: fcmp s3, s2
1454 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1455 ; CHECK-CVT-NEXT: mov h3, v1.h[3]
1456 ; CHECK-CVT-NEXT: csetm w8, ge
1457 ; CHECK-CVT-NEXT: fcmp s5, s4
1458 ; CHECK-CVT-NEXT: fcvt s5, h6
1459 ; CHECK-CVT-NEXT: fcvt s2, h2
1460 ; CHECK-CVT-NEXT: mov h4, v0.h[3]
1461 ; CHECK-CVT-NEXT: fcvt s3, h3
1462 ; CHECK-CVT-NEXT: mov h6, v0.h[4]
1463 ; CHECK-CVT-NEXT: csetm w9, ge
1464 ; CHECK-CVT-NEXT: fcmp s2, s5
1465 ; CHECK-CVT-NEXT: fmov s2, w9
1466 ; CHECK-CVT-NEXT: fcvt s4, h4
1467 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
1468 ; CHECK-CVT-NEXT: fcvt s6, h6
1469 ; CHECK-CVT-NEXT: mov v2.h[1], w8
1470 ; CHECK-CVT-NEXT: csetm w8, ge
1471 ; CHECK-CVT-NEXT: fcmp s4, s3
1472 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
1473 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
1474 ; CHECK-CVT-NEXT: fcvt s5, h5
1475 ; CHECK-CVT-NEXT: mov v2.h[2], w8
1476 ; CHECK-CVT-NEXT: csetm w8, ge
1477 ; CHECK-CVT-NEXT: fcvt s3, h3
1478 ; CHECK-CVT-NEXT: fcvt s4, h4
1479 ; CHECK-CVT-NEXT: fcmp s6, s5
1480 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
1481 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
1482 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1483 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1484 ; CHECK-CVT-NEXT: mov v2.h[3], w8
1485 ; CHECK-CVT-NEXT: csetm w8, ge
1486 ; CHECK-CVT-NEXT: fcmp s4, s3
1487 ; CHECK-CVT-NEXT: fcvt s3, h5
1488 ; CHECK-CVT-NEXT: fcvt s4, h6
1489 ; CHECK-CVT-NEXT: fcvt s1, h1
1490 ; CHECK-CVT-NEXT: fcvt s0, h0
1491 ; CHECK-CVT-NEXT: mov v2.h[4], w8
1492 ; CHECK-CVT-NEXT: csetm w8, ge
1493 ; CHECK-CVT-NEXT: fcmp s4, s3
1494 ; CHECK-CVT-NEXT: mov v2.h[5], w8
1495 ; CHECK-CVT-NEXT: csetm w8, ge
1496 ; CHECK-CVT-NEXT: fcmp s0, s1
1497 ; CHECK-CVT-NEXT: mov v2.h[6], w8
1498 ; CHECK-CVT-NEXT: csetm w8, ge
1499 ; CHECK-CVT-NEXT: mov v2.h[7], w8
1500 ; CHECK-CVT-NEXT: xtn v0.8b, v2.8h
1501 ; CHECK-CVT-NEXT: ret
1503 ; CHECK-FP16-LABEL: test_fcmp_oge:
1504 ; CHECK-FP16: // %bb.0:
1505 ; CHECK-FP16-NEXT: fcmge v0.8h, v0.8h, v1.8h
1506 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1507 ; CHECK-FP16-NEXT: ret
1508 %1 = fcmp oge <8 x half> %a, %b
1512 define <8 x i1> @test_fcmp_olt(<8 x half> %a, <8 x half> %b) #0 {
1513 ; CHECK-CVT-LABEL: test_fcmp_olt:
1514 ; CHECK-CVT: // %bb.0:
1515 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1516 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1517 ; CHECK-CVT-NEXT: fcvt s4, h1
1518 ; CHECK-CVT-NEXT: fcvt s5, h0
1519 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
1520 ; CHECK-CVT-NEXT: fcvt s2, h2
1521 ; CHECK-CVT-NEXT: fcvt s3, h3
1522 ; CHECK-CVT-NEXT: fcmp s3, s2
1523 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1524 ; CHECK-CVT-NEXT: mov h3, v1.h[3]
1525 ; CHECK-CVT-NEXT: csetm w8, mi
1526 ; CHECK-CVT-NEXT: fcmp s5, s4
1527 ; CHECK-CVT-NEXT: fcvt s5, h6
1528 ; CHECK-CVT-NEXT: fcvt s2, h2
1529 ; CHECK-CVT-NEXT: mov h4, v0.h[3]
1530 ; CHECK-CVT-NEXT: fcvt s3, h3
1531 ; CHECK-CVT-NEXT: mov h6, v0.h[4]
1532 ; CHECK-CVT-NEXT: csetm w9, mi
1533 ; CHECK-CVT-NEXT: fcmp s2, s5
1534 ; CHECK-CVT-NEXT: fmov s2, w9
1535 ; CHECK-CVT-NEXT: fcvt s4, h4
1536 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
1537 ; CHECK-CVT-NEXT: fcvt s6, h6
1538 ; CHECK-CVT-NEXT: mov v2.h[1], w8
1539 ; CHECK-CVT-NEXT: csetm w8, mi
1540 ; CHECK-CVT-NEXT: fcmp s4, s3
1541 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
1542 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
1543 ; CHECK-CVT-NEXT: fcvt s5, h5
1544 ; CHECK-CVT-NEXT: mov v2.h[2], w8
1545 ; CHECK-CVT-NEXT: csetm w8, mi
1546 ; CHECK-CVT-NEXT: fcvt s3, h3
1547 ; CHECK-CVT-NEXT: fcvt s4, h4
1548 ; CHECK-CVT-NEXT: fcmp s6, s5
1549 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
1550 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
1551 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1552 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1553 ; CHECK-CVT-NEXT: mov v2.h[3], w8
1554 ; CHECK-CVT-NEXT: csetm w8, mi
1555 ; CHECK-CVT-NEXT: fcmp s4, s3
1556 ; CHECK-CVT-NEXT: fcvt s3, h5
1557 ; CHECK-CVT-NEXT: fcvt s4, h6
1558 ; CHECK-CVT-NEXT: fcvt s1, h1
1559 ; CHECK-CVT-NEXT: fcvt s0, h0
1560 ; CHECK-CVT-NEXT: mov v2.h[4], w8
1561 ; CHECK-CVT-NEXT: csetm w8, mi
1562 ; CHECK-CVT-NEXT: fcmp s4, s3
1563 ; CHECK-CVT-NEXT: mov v2.h[5], w8
1564 ; CHECK-CVT-NEXT: csetm w8, mi
1565 ; CHECK-CVT-NEXT: fcmp s0, s1
1566 ; CHECK-CVT-NEXT: mov v2.h[6], w8
1567 ; CHECK-CVT-NEXT: csetm w8, mi
1568 ; CHECK-CVT-NEXT: mov v2.h[7], w8
1569 ; CHECK-CVT-NEXT: xtn v0.8b, v2.8h
1570 ; CHECK-CVT-NEXT: ret
1572 ; CHECK-FP16-LABEL: test_fcmp_olt:
1573 ; CHECK-FP16: // %bb.0:
1574 ; CHECK-FP16-NEXT: fcmgt v0.8h, v1.8h, v0.8h
1575 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1576 ; CHECK-FP16-NEXT: ret
1577 %1 = fcmp olt <8 x half> %a, %b
1581 define <8 x i1> @test_fcmp_ole(<8 x half> %a, <8 x half> %b) #0 {
1582 ; CHECK-CVT-LABEL: test_fcmp_ole:
1583 ; CHECK-CVT: // %bb.0:
1584 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1585 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1586 ; CHECK-CVT-NEXT: fcvt s4, h1
1587 ; CHECK-CVT-NEXT: fcvt s5, h0
1588 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
1589 ; CHECK-CVT-NEXT: fcvt s2, h2
1590 ; CHECK-CVT-NEXT: fcvt s3, h3
1591 ; CHECK-CVT-NEXT: fcmp s3, s2
1592 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1593 ; CHECK-CVT-NEXT: mov h3, v1.h[3]
1594 ; CHECK-CVT-NEXT: csetm w8, ls
1595 ; CHECK-CVT-NEXT: fcmp s5, s4
1596 ; CHECK-CVT-NEXT: fcvt s5, h6
1597 ; CHECK-CVT-NEXT: fcvt s2, h2
1598 ; CHECK-CVT-NEXT: mov h4, v0.h[3]
1599 ; CHECK-CVT-NEXT: fcvt s3, h3
1600 ; CHECK-CVT-NEXT: mov h6, v0.h[4]
1601 ; CHECK-CVT-NEXT: csetm w9, ls
1602 ; CHECK-CVT-NEXT: fcmp s2, s5
1603 ; CHECK-CVT-NEXT: fmov s2, w9
1604 ; CHECK-CVT-NEXT: fcvt s4, h4
1605 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
1606 ; CHECK-CVT-NEXT: fcvt s6, h6
1607 ; CHECK-CVT-NEXT: mov v2.h[1], w8
1608 ; CHECK-CVT-NEXT: csetm w8, ls
1609 ; CHECK-CVT-NEXT: fcmp s4, s3
1610 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
1611 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
1612 ; CHECK-CVT-NEXT: fcvt s5, h5
1613 ; CHECK-CVT-NEXT: mov v2.h[2], w8
1614 ; CHECK-CVT-NEXT: csetm w8, ls
1615 ; CHECK-CVT-NEXT: fcvt s3, h3
1616 ; CHECK-CVT-NEXT: fcvt s4, h4
1617 ; CHECK-CVT-NEXT: fcmp s6, s5
1618 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
1619 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
1620 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1621 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1622 ; CHECK-CVT-NEXT: mov v2.h[3], w8
1623 ; CHECK-CVT-NEXT: csetm w8, ls
1624 ; CHECK-CVT-NEXT: fcmp s4, s3
1625 ; CHECK-CVT-NEXT: fcvt s3, h5
1626 ; CHECK-CVT-NEXT: fcvt s4, h6
1627 ; CHECK-CVT-NEXT: fcvt s1, h1
1628 ; CHECK-CVT-NEXT: fcvt s0, h0
1629 ; CHECK-CVT-NEXT: mov v2.h[4], w8
1630 ; CHECK-CVT-NEXT: csetm w8, ls
1631 ; CHECK-CVT-NEXT: fcmp s4, s3
1632 ; CHECK-CVT-NEXT: mov v2.h[5], w8
1633 ; CHECK-CVT-NEXT: csetm w8, ls
1634 ; CHECK-CVT-NEXT: fcmp s0, s1
1635 ; CHECK-CVT-NEXT: mov v2.h[6], w8
1636 ; CHECK-CVT-NEXT: csetm w8, ls
1637 ; CHECK-CVT-NEXT: mov v2.h[7], w8
1638 ; CHECK-CVT-NEXT: xtn v0.8b, v2.8h
1639 ; CHECK-CVT-NEXT: ret
1641 ; CHECK-FP16-LABEL: test_fcmp_ole:
1642 ; CHECK-FP16: // %bb.0:
1643 ; CHECK-FP16-NEXT: fcmge v0.8h, v1.8h, v0.8h
1644 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1645 ; CHECK-FP16-NEXT: ret
1646 %1 = fcmp ole <8 x half> %a, %b
1650 define <8 x i1> @test_fcmp_ord(<8 x half> %a, <8 x half> %b) #0 {
1651 ; CHECK-CVT-LABEL: test_fcmp_ord:
1652 ; CHECK-CVT: // %bb.0:
1653 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1654 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1655 ; CHECK-CVT-NEXT: fcvt s4, h1
1656 ; CHECK-CVT-NEXT: fcvt s5, h0
1657 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
1658 ; CHECK-CVT-NEXT: fcvt s2, h2
1659 ; CHECK-CVT-NEXT: fcvt s3, h3
1660 ; CHECK-CVT-NEXT: fcmp s3, s2
1661 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1662 ; CHECK-CVT-NEXT: mov h3, v1.h[3]
1663 ; CHECK-CVT-NEXT: csetm w8, vc
1664 ; CHECK-CVT-NEXT: fcmp s5, s4
1665 ; CHECK-CVT-NEXT: fcvt s5, h6
1666 ; CHECK-CVT-NEXT: fcvt s2, h2
1667 ; CHECK-CVT-NEXT: mov h4, v0.h[3]
1668 ; CHECK-CVT-NEXT: fcvt s3, h3
1669 ; CHECK-CVT-NEXT: mov h6, v0.h[4]
1670 ; CHECK-CVT-NEXT: csetm w9, vc
1671 ; CHECK-CVT-NEXT: fcmp s2, s5
1672 ; CHECK-CVT-NEXT: fmov s2, w9
1673 ; CHECK-CVT-NEXT: fcvt s4, h4
1674 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
1675 ; CHECK-CVT-NEXT: fcvt s6, h6
1676 ; CHECK-CVT-NEXT: mov v2.h[1], w8
1677 ; CHECK-CVT-NEXT: csetm w8, vc
1678 ; CHECK-CVT-NEXT: fcmp s4, s3
1679 ; CHECK-CVT-NEXT: mov h3, v1.h[5]
1680 ; CHECK-CVT-NEXT: mov h4, v0.h[5]
1681 ; CHECK-CVT-NEXT: fcvt s5, h5
1682 ; CHECK-CVT-NEXT: mov v2.h[2], w8
1683 ; CHECK-CVT-NEXT: csetm w8, vc
1684 ; CHECK-CVT-NEXT: fcvt s3, h3
1685 ; CHECK-CVT-NEXT: fcvt s4, h4
1686 ; CHECK-CVT-NEXT: fcmp s6, s5
1687 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
1688 ; CHECK-CVT-NEXT: mov h6, v0.h[6]
1689 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1690 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1691 ; CHECK-CVT-NEXT: mov v2.h[3], w8
1692 ; CHECK-CVT-NEXT: csetm w8, vc
1693 ; CHECK-CVT-NEXT: fcmp s4, s3
1694 ; CHECK-CVT-NEXT: fcvt s3, h5
1695 ; CHECK-CVT-NEXT: fcvt s4, h6
1696 ; CHECK-CVT-NEXT: fcvt s1, h1
1697 ; CHECK-CVT-NEXT: fcvt s0, h0
1698 ; CHECK-CVT-NEXT: mov v2.h[4], w8
1699 ; CHECK-CVT-NEXT: csetm w8, vc
1700 ; CHECK-CVT-NEXT: fcmp s4, s3
1701 ; CHECK-CVT-NEXT: mov v2.h[5], w8
1702 ; CHECK-CVT-NEXT: csetm w8, vc
1703 ; CHECK-CVT-NEXT: fcmp s0, s1
1704 ; CHECK-CVT-NEXT: mov v2.h[6], w8
1705 ; CHECK-CVT-NEXT: csetm w8, vc
1706 ; CHECK-CVT-NEXT: mov v2.h[7], w8
1707 ; CHECK-CVT-NEXT: xtn v0.8b, v2.8h
1708 ; CHECK-CVT-NEXT: ret
1710 ; CHECK-FP16-LABEL: test_fcmp_ord:
1711 ; CHECK-FP16: // %bb.0:
1712 ; CHECK-FP16-NEXT: fcmge v2.8h, v0.8h, v1.8h
1713 ; CHECK-FP16-NEXT: fcmgt v0.8h, v1.8h, v0.8h
1714 ; CHECK-FP16-NEXT: orr v0.16b, v0.16b, v2.16b
1715 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1716 ; CHECK-FP16-NEXT: ret
1717 %1 = fcmp ord <8 x half> %a, %b
1721 attributes #0 = { nounwind }