1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-none-eabi -mattr=-fullfp16 | FileCheck %s --check-prefixes=CHECK,CHECK-CVT
3 ; RUN: llc < %s -mtriple=aarch64-none-eabi -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: mov h6, v1.h[2]
11 ; CHECK-CVT-NEXT: mov h7, v0.h[2]
12 ; CHECK-CVT-NEXT: mov h16, v1.h[3]
13 ; CHECK-CVT-NEXT: mov h17, v0.h[3]
14 ; CHECK-CVT-NEXT: fcvt s4, h1
15 ; CHECK-CVT-NEXT: fcvt s5, h0
16 ; CHECK-CVT-NEXT: fcvt s2, h2
17 ; CHECK-CVT-NEXT: fcvt s3, h3
18 ; CHECK-CVT-NEXT: fcvt s6, h6
19 ; CHECK-CVT-NEXT: fcvt s7, h7
20 ; CHECK-CVT-NEXT: fcvt s16, h16
21 ; CHECK-CVT-NEXT: fcvt s17, h17
22 ; CHECK-CVT-NEXT: fadd s4, s5, s4
23 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
24 ; CHECK-CVT-NEXT: fadd s2, s3, s2
25 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
26 ; CHECK-CVT-NEXT: fadd s6, s7, s6
27 ; CHECK-CVT-NEXT: mov h7, v1.h[5]
28 ; CHECK-CVT-NEXT: fadd s16, s17, s16
29 ; CHECK-CVT-NEXT: mov h17, v0.h[5]
30 ; CHECK-CVT-NEXT: fcvt s5, h5
31 ; CHECK-CVT-NEXT: fcvt s3, h3
32 ; CHECK-CVT-NEXT: fcvt s7, h7
33 ; CHECK-CVT-NEXT: fcvt s17, h17
34 ; CHECK-CVT-NEXT: fadd s3, s3, s5
35 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
36 ; CHECK-CVT-NEXT: fadd s7, s17, s7
37 ; CHECK-CVT-NEXT: mov h17, v0.h[6]
38 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
39 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
40 ; CHECK-CVT-NEXT: fcvt s1, h1
41 ; CHECK-CVT-NEXT: fcvt s0, h0
42 ; CHECK-CVT-NEXT: fadd s1, s0, s1
43 ; CHECK-CVT-NEXT: fcvt h0, s4
44 ; CHECK-CVT-NEXT: fcvt h2, s2
45 ; CHECK-CVT-NEXT: mov v0.h[1], v2.h[0]
46 ; CHECK-CVT-NEXT: fcvt h2, s6
47 ; CHECK-CVT-NEXT: mov v0.h[2], v2.h[0]
48 ; CHECK-CVT-NEXT: fcvt h2, s16
49 ; CHECK-CVT-NEXT: fcvt s5, h5
50 ; CHECK-CVT-NEXT: fcvt s17, h17
51 ; CHECK-CVT-NEXT: mov v0.h[3], v2.h[0]
52 ; CHECK-CVT-NEXT: fcvt h2, s3
53 ; CHECK-CVT-NEXT: fadd s5, s17, s5
54 ; CHECK-CVT-NEXT: fcvt h3, s7
55 ; CHECK-CVT-NEXT: mov v0.h[4], v2.h[0]
56 ; CHECK-CVT-NEXT: fcvt h4, s5
57 ; CHECK-CVT-NEXT: mov v0.h[5], v3.h[0]
58 ; CHECK-CVT-NEXT: mov v0.h[6], v4.h[0]
59 ; CHECK-CVT-NEXT: fcvt h1, s1
60 ; CHECK-CVT-NEXT: mov v0.h[7], v1.h[0]
63 ; CHECK-FP16-LABEL: add_h:
64 ; CHECK-FP16: // %bb.0: // %entry
65 ; CHECK-FP16-NEXT: fadd v0.8h, v0.8h, v1.8h
66 ; CHECK-FP16-NEXT: ret
68 %0 = fadd <8 x half> %a, %b
73 define <8 x half> @sub_h(<8 x half> %a, <8 x half> %b) {
74 ; CHECK-CVT-LABEL: sub_h:
75 ; CHECK-CVT: // %bb.0: // %entry
76 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
77 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
78 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
79 ; CHECK-CVT-NEXT: mov h7, v0.h[2]
80 ; CHECK-CVT-NEXT: mov h16, v1.h[3]
81 ; CHECK-CVT-NEXT: mov h17, v0.h[3]
82 ; CHECK-CVT-NEXT: fcvt s4, h1
83 ; CHECK-CVT-NEXT: fcvt s5, h0
84 ; CHECK-CVT-NEXT: fcvt s2, h2
85 ; CHECK-CVT-NEXT: fcvt s3, h3
86 ; CHECK-CVT-NEXT: fcvt s6, h6
87 ; CHECK-CVT-NEXT: fcvt s7, h7
88 ; CHECK-CVT-NEXT: fcvt s16, h16
89 ; CHECK-CVT-NEXT: fcvt s17, h17
90 ; CHECK-CVT-NEXT: fsub s4, s5, s4
91 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
92 ; CHECK-CVT-NEXT: fsub s2, s3, s2
93 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
94 ; CHECK-CVT-NEXT: fsub s6, s7, s6
95 ; CHECK-CVT-NEXT: mov h7, v1.h[5]
96 ; CHECK-CVT-NEXT: fsub s16, s17, s16
97 ; CHECK-CVT-NEXT: mov h17, v0.h[5]
98 ; CHECK-CVT-NEXT: fcvt s5, h5
99 ; CHECK-CVT-NEXT: fcvt s3, h3
100 ; CHECK-CVT-NEXT: fcvt s7, h7
101 ; CHECK-CVT-NEXT: fcvt s17, h17
102 ; CHECK-CVT-NEXT: fsub s3, s3, s5
103 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
104 ; CHECK-CVT-NEXT: fsub s7, s17, s7
105 ; CHECK-CVT-NEXT: mov h17, v0.h[6]
106 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
107 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
108 ; CHECK-CVT-NEXT: fcvt s1, h1
109 ; CHECK-CVT-NEXT: fcvt s0, h0
110 ; CHECK-CVT-NEXT: fsub s1, s0, s1
111 ; CHECK-CVT-NEXT: fcvt h0, s4
112 ; CHECK-CVT-NEXT: fcvt h2, s2
113 ; CHECK-CVT-NEXT: mov v0.h[1], v2.h[0]
114 ; CHECK-CVT-NEXT: fcvt h2, s6
115 ; CHECK-CVT-NEXT: mov v0.h[2], v2.h[0]
116 ; CHECK-CVT-NEXT: fcvt h2, s16
117 ; CHECK-CVT-NEXT: fcvt s5, h5
118 ; CHECK-CVT-NEXT: fcvt s17, h17
119 ; CHECK-CVT-NEXT: mov v0.h[3], v2.h[0]
120 ; CHECK-CVT-NEXT: fcvt h2, s3
121 ; CHECK-CVT-NEXT: fsub s5, s17, s5
122 ; CHECK-CVT-NEXT: fcvt h3, s7
123 ; CHECK-CVT-NEXT: mov v0.h[4], v2.h[0]
124 ; CHECK-CVT-NEXT: fcvt h4, s5
125 ; CHECK-CVT-NEXT: mov v0.h[5], v3.h[0]
126 ; CHECK-CVT-NEXT: mov v0.h[6], v4.h[0]
127 ; CHECK-CVT-NEXT: fcvt h1, s1
128 ; CHECK-CVT-NEXT: mov v0.h[7], v1.h[0]
129 ; CHECK-CVT-NEXT: ret
131 ; CHECK-FP16-LABEL: sub_h:
132 ; CHECK-FP16: // %bb.0: // %entry
133 ; CHECK-FP16-NEXT: fsub v0.8h, v0.8h, v1.8h
134 ; CHECK-FP16-NEXT: ret
136 %0 = fsub <8 x half> %a, %b
141 define <8 x half> @mul_h(<8 x half> %a, <8 x half> %b) {
142 ; CHECK-CVT-LABEL: mul_h:
143 ; CHECK-CVT: // %bb.0: // %entry
144 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
145 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
146 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
147 ; CHECK-CVT-NEXT: mov h7, v0.h[2]
148 ; CHECK-CVT-NEXT: mov h16, v1.h[3]
149 ; CHECK-CVT-NEXT: mov h17, v0.h[3]
150 ; CHECK-CVT-NEXT: fcvt s4, h1
151 ; CHECK-CVT-NEXT: fcvt s5, h0
152 ; CHECK-CVT-NEXT: fcvt s2, h2
153 ; CHECK-CVT-NEXT: fcvt s3, h3
154 ; CHECK-CVT-NEXT: fcvt s6, h6
155 ; CHECK-CVT-NEXT: fcvt s7, h7
156 ; CHECK-CVT-NEXT: fcvt s16, h16
157 ; CHECK-CVT-NEXT: fcvt s17, h17
158 ; CHECK-CVT-NEXT: fmul s4, s5, s4
159 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
160 ; CHECK-CVT-NEXT: fmul s2, s3, s2
161 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
162 ; CHECK-CVT-NEXT: fmul s6, s7, s6
163 ; CHECK-CVT-NEXT: mov h7, v1.h[5]
164 ; CHECK-CVT-NEXT: fmul s16, s17, s16
165 ; CHECK-CVT-NEXT: mov h17, v0.h[5]
166 ; CHECK-CVT-NEXT: fcvt s5, h5
167 ; CHECK-CVT-NEXT: fcvt s3, h3
168 ; CHECK-CVT-NEXT: fcvt s7, h7
169 ; CHECK-CVT-NEXT: fcvt s17, h17
170 ; CHECK-CVT-NEXT: fmul s3, s3, s5
171 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
172 ; CHECK-CVT-NEXT: fmul s7, s17, s7
173 ; CHECK-CVT-NEXT: mov h17, v0.h[6]
174 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
175 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
176 ; CHECK-CVT-NEXT: fcvt s1, h1
177 ; CHECK-CVT-NEXT: fcvt s0, h0
178 ; CHECK-CVT-NEXT: fmul s1, s0, s1
179 ; CHECK-CVT-NEXT: fcvt h0, s4
180 ; CHECK-CVT-NEXT: fcvt h2, s2
181 ; CHECK-CVT-NEXT: mov v0.h[1], v2.h[0]
182 ; CHECK-CVT-NEXT: fcvt h2, s6
183 ; CHECK-CVT-NEXT: mov v0.h[2], v2.h[0]
184 ; CHECK-CVT-NEXT: fcvt h2, s16
185 ; CHECK-CVT-NEXT: fcvt s5, h5
186 ; CHECK-CVT-NEXT: fcvt s17, h17
187 ; CHECK-CVT-NEXT: mov v0.h[3], v2.h[0]
188 ; CHECK-CVT-NEXT: fcvt h2, s3
189 ; CHECK-CVT-NEXT: fmul s5, s17, s5
190 ; CHECK-CVT-NEXT: fcvt h3, s7
191 ; CHECK-CVT-NEXT: mov v0.h[4], v2.h[0]
192 ; CHECK-CVT-NEXT: fcvt h4, s5
193 ; CHECK-CVT-NEXT: mov v0.h[5], v3.h[0]
194 ; CHECK-CVT-NEXT: mov v0.h[6], v4.h[0]
195 ; CHECK-CVT-NEXT: fcvt h1, s1
196 ; CHECK-CVT-NEXT: mov v0.h[7], v1.h[0]
197 ; CHECK-CVT-NEXT: ret
199 ; CHECK-FP16-LABEL: mul_h:
200 ; CHECK-FP16: // %bb.0: // %entry
201 ; CHECK-FP16-NEXT: fmul v0.8h, v0.8h, v1.8h
202 ; CHECK-FP16-NEXT: ret
204 %0 = fmul <8 x half> %a, %b
209 define <8 x half> @div_h(<8 x half> %a, <8 x half> %b) {
210 ; CHECK-CVT-LABEL: div_h:
211 ; CHECK-CVT: // %bb.0: // %entry
212 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
213 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
214 ; CHECK-CVT-NEXT: mov h6, v1.h[2]
215 ; CHECK-CVT-NEXT: mov h7, v0.h[2]
216 ; CHECK-CVT-NEXT: mov h16, v1.h[3]
217 ; CHECK-CVT-NEXT: mov h17, v0.h[3]
218 ; CHECK-CVT-NEXT: fcvt s4, h1
219 ; CHECK-CVT-NEXT: fcvt s5, h0
220 ; CHECK-CVT-NEXT: fcvt s2, h2
221 ; CHECK-CVT-NEXT: fcvt s3, h3
222 ; CHECK-CVT-NEXT: fcvt s6, h6
223 ; CHECK-CVT-NEXT: fcvt s7, h7
224 ; CHECK-CVT-NEXT: fcvt s16, h16
225 ; CHECK-CVT-NEXT: fcvt s17, h17
226 ; CHECK-CVT-NEXT: fdiv s4, s5, s4
227 ; CHECK-CVT-NEXT: mov h5, v1.h[4]
228 ; CHECK-CVT-NEXT: fdiv s2, s3, s2
229 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
230 ; CHECK-CVT-NEXT: fdiv s6, s7, s6
231 ; CHECK-CVT-NEXT: mov h7, v1.h[5]
232 ; CHECK-CVT-NEXT: fdiv s16, s17, s16
233 ; CHECK-CVT-NEXT: mov h17, v0.h[5]
234 ; CHECK-CVT-NEXT: fcvt s5, h5
235 ; CHECK-CVT-NEXT: fcvt s3, h3
236 ; CHECK-CVT-NEXT: fcvt s7, h7
237 ; CHECK-CVT-NEXT: fcvt s17, h17
238 ; CHECK-CVT-NEXT: fdiv s3, s3, s5
239 ; CHECK-CVT-NEXT: mov h5, v1.h[6]
240 ; CHECK-CVT-NEXT: fdiv s7, s17, s7
241 ; CHECK-CVT-NEXT: mov h17, v0.h[6]
242 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
243 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
244 ; CHECK-CVT-NEXT: fcvt s1, h1
245 ; CHECK-CVT-NEXT: fcvt s0, h0
246 ; CHECK-CVT-NEXT: fdiv s1, s0, s1
247 ; CHECK-CVT-NEXT: fcvt h0, s4
248 ; CHECK-CVT-NEXT: fcvt h2, s2
249 ; CHECK-CVT-NEXT: mov v0.h[1], v2.h[0]
250 ; CHECK-CVT-NEXT: fcvt h2, s6
251 ; CHECK-CVT-NEXT: mov v0.h[2], v2.h[0]
252 ; CHECK-CVT-NEXT: fcvt h2, s16
253 ; CHECK-CVT-NEXT: fcvt s5, h5
254 ; CHECK-CVT-NEXT: fcvt s17, h17
255 ; CHECK-CVT-NEXT: mov v0.h[3], v2.h[0]
256 ; CHECK-CVT-NEXT: fcvt h2, s3
257 ; CHECK-CVT-NEXT: fdiv s5, s17, s5
258 ; CHECK-CVT-NEXT: fcvt h3, s7
259 ; CHECK-CVT-NEXT: mov v0.h[4], v2.h[0]
260 ; CHECK-CVT-NEXT: fcvt h4, s5
261 ; CHECK-CVT-NEXT: mov v0.h[5], v3.h[0]
262 ; CHECK-CVT-NEXT: mov v0.h[6], v4.h[0]
263 ; CHECK-CVT-NEXT: fcvt h1, s1
264 ; CHECK-CVT-NEXT: mov v0.h[7], v1.h[0]
265 ; CHECK-CVT-NEXT: ret
267 ; CHECK-FP16-LABEL: div_h:
268 ; CHECK-FP16: // %bb.0: // %entry
269 ; CHECK-FP16-NEXT: fdiv v0.8h, v0.8h, v1.8h
270 ; CHECK-FP16-NEXT: ret
272 %0 = fdiv <8 x half> %a, %b
277 define <8 x half> @load_h(<8 x half>* %a) {
278 ; CHECK-LABEL: load_h:
279 ; CHECK: // %bb.0: // %entry
280 ; CHECK-NEXT: ldr q0, [x0]
283 %0 = load <8 x half>, <8 x half>* %a, align 4
288 define void @store_h(<8 x half>* %a, <8 x half> %b) {
289 ; CHECK-LABEL: store_h:
290 ; CHECK: // %bb.0: // %entry
291 ; CHECK-NEXT: str q0, [x0]
294 store <8 x half> %b, <8 x half>* %a, align 4
298 define <8 x half> @s_to_h(<8 x float> %a) {
299 ; CHECK-LABEL: s_to_h:
301 ; CHECK-NEXT: fcvtn v1.4h, v1.4s
302 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
303 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
305 %1 = fptrunc <8 x float> %a to <8 x half>
309 define <8 x half> @d_to_h(<8 x double> %a) {
310 ; CHECK-LABEL: d_to_h:
312 ; CHECK-NEXT: mov d4, v0.d[1]
313 ; CHECK-NEXT: fcvt h0, d0
314 ; CHECK-NEXT: fcvt h4, d4
315 ; CHECK-NEXT: mov v0.h[1], v4.h[0]
316 ; CHECK-NEXT: fcvt h4, d1
317 ; CHECK-NEXT: mov d1, v1.d[1]
318 ; CHECK-NEXT: mov v0.h[2], v4.h[0]
319 ; CHECK-NEXT: fcvt h1, d1
320 ; CHECK-NEXT: fcvt h4, d2
321 ; CHECK-NEXT: mov d2, v2.d[1]
322 ; CHECK-NEXT: mov v0.h[3], v1.h[0]
323 ; CHECK-NEXT: fcvt h2, d2
324 ; CHECK-NEXT: mov v0.h[4], v4.h[0]
325 ; CHECK-NEXT: fcvt h1, d3
326 ; CHECK-NEXT: mov d3, v3.d[1]
327 ; CHECK-NEXT: mov v0.h[5], v2.h[0]
328 ; CHECK-NEXT: mov v0.h[6], v1.h[0]
329 ; CHECK-NEXT: fcvt h1, d3
330 ; CHECK-NEXT: mov v0.h[7], v1.h[0]
332 %1 = fptrunc <8 x double> %a to <8 x half>
336 define <8 x float> @h_to_s(<8 x half> %a) {
337 ; CHECK-LABEL: h_to_s:
339 ; CHECK-NEXT: fcvtl2 v1.4s, v0.8h
340 ; CHECK-NEXT: fcvtl v0.4s, v0.4h
342 %1 = fpext <8 x half> %a to <8 x float>
346 define <8 x double> @h_to_d(<8 x half> %a) {
347 ; CHECK-LABEL: h_to_d:
349 ; CHECK-NEXT: mov h1, v0.h[1]
350 ; CHECK-NEXT: fcvt d4, h0
351 ; CHECK-NEXT: mov h2, v0.h[3]
352 ; CHECK-NEXT: mov h3, v0.h[2]
353 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
354 ; CHECK-NEXT: fcvt d5, h1
355 ; CHECK-NEXT: fcvt d2, h2
356 ; CHECK-NEXT: fcvt d1, h3
357 ; CHECK-NEXT: mov h3, v0.h[1]
358 ; CHECK-NEXT: mov v1.d[1], v2.d[0]
359 ; CHECK-NEXT: fcvt d2, h0
360 ; CHECK-NEXT: fcvt d3, h3
361 ; CHECK-NEXT: mov v2.d[1], v3.d[0]
362 ; CHECK-NEXT: mov h3, v0.h[3]
363 ; CHECK-NEXT: mov h0, v0.h[2]
364 ; CHECK-NEXT: mov v4.d[1], v5.d[0]
365 ; CHECK-NEXT: fcvt d5, h3
366 ; CHECK-NEXT: fcvt d3, h0
367 ; CHECK-NEXT: mov v3.d[1], v5.d[0]
368 ; CHECK-NEXT: mov v0.16b, v4.16b
370 %1 = fpext <8 x half> %a to <8 x double>
375 define <8 x half> @bitcast_i_to_h(float, <8 x i16> %a) {
376 ; CHECK-LABEL: bitcast_i_to_h:
378 ; CHECK-NEXT: mov v0.16b, v1.16b
380 %2 = bitcast <8 x i16> %a to <8 x half>
384 define <8 x i16> @bitcast_h_to_i(float, <8 x half> %a) {
385 ; CHECK-LABEL: bitcast_h_to_i:
387 ; CHECK-NEXT: mov v0.16b, v1.16b
389 %2 = bitcast <8 x half> %a to <8 x i16>
394 define <8 x half> @sitofp_i8(<8 x i8> %a) #0 {
395 ; CHECK-LABEL: sitofp_i8:
397 ; CHECK-NEXT: sshll v0.8h, v0.8b, #0
398 ; CHECK-NEXT: sshll2 v1.4s, v0.8h, #0
399 ; CHECK-NEXT: sshll v0.4s, v0.4h, #0
400 ; CHECK-NEXT: scvtf v1.4s, v1.4s
401 ; CHECK-NEXT: scvtf v0.4s, v0.4s
402 ; CHECK-NEXT: fcvtn v1.4h, v1.4s
403 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
404 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
406 %1 = sitofp <8 x i8> %a to <8 x half>
411 define <8 x half> @sitofp_i16(<8 x i16> %a) #0 {
412 ; CHECK-CVT-LABEL: sitofp_i16:
413 ; CHECK-CVT: // %bb.0:
414 ; CHECK-CVT-NEXT: sshll2 v1.4s, v0.8h, #0
415 ; CHECK-CVT-NEXT: sshll v0.4s, v0.4h, #0
416 ; CHECK-CVT-NEXT: scvtf v1.4s, v1.4s
417 ; CHECK-CVT-NEXT: scvtf v0.4s, v0.4s
418 ; CHECK-CVT-NEXT: fcvtn v1.4h, v1.4s
419 ; CHECK-CVT-NEXT: fcvtn v0.4h, v0.4s
420 ; CHECK-CVT-NEXT: mov v0.d[1], v1.d[0]
421 ; CHECK-CVT-NEXT: ret
423 ; CHECK-FP16-LABEL: sitofp_i16:
424 ; CHECK-FP16: // %bb.0:
425 ; CHECK-FP16-NEXT: scvtf v0.8h, v0.8h
426 ; CHECK-FP16-NEXT: ret
427 %1 = sitofp <8 x i16> %a to <8 x half>
432 define <8 x half> @sitofp_i32(<8 x i32> %a) #0 {
433 ; CHECK-LABEL: sitofp_i32:
435 ; CHECK-NEXT: scvtf v1.4s, v1.4s
436 ; CHECK-NEXT: scvtf v0.4s, v0.4s
437 ; CHECK-NEXT: fcvtn v1.4h, v1.4s
438 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
439 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
441 %1 = sitofp <8 x i32> %a to <8 x half>
446 define <8 x half> @sitofp_i64(<8 x i64> %a) #0 {
447 ; CHECK-LABEL: sitofp_i64:
449 ; CHECK-NEXT: scvtf v2.2d, v2.2d
450 ; CHECK-NEXT: scvtf v0.2d, v0.2d
451 ; CHECK-NEXT: scvtf v3.2d, v3.2d
452 ; CHECK-NEXT: scvtf v1.2d, v1.2d
453 ; CHECK-NEXT: fcvtn v2.2s, v2.2d
454 ; CHECK-NEXT: fcvtn v0.2s, v0.2d
455 ; CHECK-NEXT: fcvtn2 v2.4s, v3.2d
456 ; CHECK-NEXT: fcvtn2 v0.4s, v1.2d
457 ; CHECK-NEXT: fcvtn v1.4h, v2.4s
458 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
459 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
461 %1 = sitofp <8 x i64> %a to <8 x half>
465 define <8 x half> @uitofp_i8(<8 x i8> %a) #0 {
466 ; CHECK-LABEL: uitofp_i8:
468 ; CHECK-NEXT: ushll v0.8h, v0.8b, #0
469 ; CHECK-NEXT: ushll2 v1.4s, v0.8h, #0
470 ; CHECK-NEXT: ushll v0.4s, v0.4h, #0
471 ; CHECK-NEXT: ucvtf v1.4s, v1.4s
472 ; CHECK-NEXT: ucvtf v0.4s, v0.4s
473 ; CHECK-NEXT: fcvtn v1.4h, v1.4s
474 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
475 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
477 %1 = uitofp <8 x i8> %a to <8 x half>
482 define <8 x half> @uitofp_i16(<8 x i16> %a) #0 {
483 ; CHECK-CVT-LABEL: uitofp_i16:
484 ; CHECK-CVT: // %bb.0:
485 ; CHECK-CVT-NEXT: ushll2 v1.4s, v0.8h, #0
486 ; CHECK-CVT-NEXT: ushll v0.4s, v0.4h, #0
487 ; CHECK-CVT-NEXT: ucvtf v1.4s, v1.4s
488 ; CHECK-CVT-NEXT: ucvtf v0.4s, v0.4s
489 ; CHECK-CVT-NEXT: fcvtn v1.4h, v1.4s
490 ; CHECK-CVT-NEXT: fcvtn v0.4h, v0.4s
491 ; CHECK-CVT-NEXT: mov v0.d[1], v1.d[0]
492 ; CHECK-CVT-NEXT: ret
494 ; CHECK-FP16-LABEL: uitofp_i16:
495 ; CHECK-FP16: // %bb.0:
496 ; CHECK-FP16-NEXT: ucvtf v0.8h, v0.8h
497 ; CHECK-FP16-NEXT: ret
498 %1 = uitofp <8 x i16> %a to <8 x half>
503 define <8 x half> @uitofp_i32(<8 x i32> %a) #0 {
504 ; CHECK-LABEL: uitofp_i32:
506 ; CHECK-NEXT: ucvtf v1.4s, v1.4s
507 ; CHECK-NEXT: ucvtf v0.4s, v0.4s
508 ; CHECK-NEXT: fcvtn v1.4h, v1.4s
509 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
510 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
512 %1 = uitofp <8 x i32> %a to <8 x half>
517 define <8 x half> @uitofp_i64(<8 x i64> %a) #0 {
518 ; CHECK-LABEL: uitofp_i64:
520 ; CHECK-NEXT: ucvtf v2.2d, v2.2d
521 ; CHECK-NEXT: ucvtf v0.2d, v0.2d
522 ; CHECK-NEXT: ucvtf v3.2d, v3.2d
523 ; CHECK-NEXT: ucvtf v1.2d, v1.2d
524 ; CHECK-NEXT: fcvtn v2.2s, v2.2d
525 ; CHECK-NEXT: fcvtn v0.2s, v0.2d
526 ; CHECK-NEXT: fcvtn2 v2.4s, v3.2d
527 ; CHECK-NEXT: fcvtn2 v0.4s, v1.2d
528 ; CHECK-NEXT: fcvtn v1.4h, v2.4s
529 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
530 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
532 %1 = uitofp <8 x i64> %a to <8 x half>
536 define void @test_insert_at_zero(half %a, <8 x half>* %b) #0 {
537 ; CHECK-LABEL: test_insert_at_zero:
539 ; CHECK-NEXT: // kill: def $h0 killed $h0 def $q0
540 ; CHECK-NEXT: str q0, [x0]
542 %1 = insertelement <8 x half> undef, half %a, i64 0
543 store <8 x half> %1, <8 x half>* %b, align 4
547 define <8 x i8> @fptosi_i8(<8 x half> %a) #0 {
548 ; CHECK-CVT-LABEL: fptosi_i8:
549 ; CHECK-CVT: // %bb.0:
550 ; CHECK-CVT-NEXT: fcvtl v1.4s, v0.4h
551 ; CHECK-CVT-NEXT: fcvtl2 v0.4s, v0.8h
552 ; CHECK-CVT-NEXT: fcvtzs v1.4s, v1.4s
553 ; CHECK-CVT-NEXT: xtn v1.4h, v1.4s
554 ; CHECK-CVT-NEXT: fcvtzs v0.4s, v0.4s
555 ; CHECK-CVT-NEXT: xtn2 v1.8h, v0.4s
556 ; CHECK-CVT-NEXT: xtn v0.8b, v1.8h
557 ; CHECK-CVT-NEXT: ret
559 ; CHECK-FP16-LABEL: fptosi_i8:
560 ; CHECK-FP16: // %bb.0:
561 ; CHECK-FP16-NEXT: fcvtzs v0.8h, v0.8h
562 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
563 ; CHECK-FP16-NEXT: ret
564 %1 = fptosi<8 x half> %a to <8 x i8>
568 define <8 x i16> @fptosi_i16(<8 x half> %a) #0 {
569 ; CHECK-CVT_DAG: fcvtl [[LO:v[0-9]+\.4s]], v0.4h
570 ; CHECK-CVT_DAG: fcvtl2 [[HI:v[0-9]+\.4s]], v0.8h
571 ; CHECK-CVT_DAG: fcvtzs [[LOF32:v[0-9]+\.4s]], [[LO]]
572 ; CHECK-CVT_DAG: xtn [[I16:v[0-9]+]].4h, [[LOF32]]
573 ; CHECK-CVT_DAG: fcvtzs [[HIF32:v[0-9]+\.4s]], [[HI]]
574 ; CHECK-CVT_DAG: xtn2 [[I16]].8h, [[HIF32]]
575 ; CHECK-COMMON_NEXT: ret
576 ; CHECK-CVT-LABEL: fptosi_i16:
577 ; CHECK-CVT: // %bb.0:
578 ; CHECK-CVT-NEXT: fcvtl v1.4s, v0.4h
579 ; CHECK-CVT-NEXT: fcvtl2 v2.4s, v0.8h
580 ; CHECK-CVT-NEXT: fcvtzs v0.4s, v1.4s
581 ; CHECK-CVT-NEXT: xtn v0.4h, v0.4s
582 ; CHECK-CVT-NEXT: fcvtzs v1.4s, v2.4s
583 ; CHECK-CVT-NEXT: xtn2 v0.8h, v1.4s
584 ; CHECK-CVT-NEXT: ret
586 ; CHECK-FP16-LABEL: fptosi_i16:
587 ; CHECK-FP16: // %bb.0:
588 ; CHECK-FP16-NEXT: fcvtzs v0.8h, v0.8h
589 ; CHECK-FP16-NEXT: ret
590 %1 = fptosi<8 x half> %a to <8 x i16>
594 define <8 x i8> @fptoui_i8(<8 x half> %a) #0 {
595 ; CHECK-CVT-LABEL: fptoui_i8:
596 ; CHECK-CVT: // %bb.0:
597 ; CHECK-CVT-NEXT: fcvtl v1.4s, v0.4h
598 ; CHECK-CVT-NEXT: fcvtl2 v0.4s, v0.8h
599 ; CHECK-CVT-NEXT: fcvtzu v1.4s, v1.4s
600 ; CHECK-CVT-NEXT: xtn v1.4h, v1.4s
601 ; CHECK-CVT-NEXT: fcvtzu v0.4s, v0.4s
602 ; CHECK-CVT-NEXT: xtn2 v1.8h, v0.4s
603 ; CHECK-CVT-NEXT: xtn v0.8b, v1.8h
604 ; CHECK-CVT-NEXT: ret
606 ; CHECK-FP16-LABEL: fptoui_i8:
607 ; CHECK-FP16: // %bb.0:
608 ; CHECK-FP16-NEXT: fcvtzu v0.8h, v0.8h
609 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
610 ; CHECK-FP16-NEXT: ret
611 %1 = fptoui<8 x half> %a to <8 x i8>
615 define <8 x i16> @fptoui_i16(<8 x half> %a) #0 {
616 ; CHECK-CVT-LABEL: fptoui_i16:
617 ; CHECK-CVT: // %bb.0:
618 ; CHECK-CVT-NEXT: fcvtl v1.4s, v0.4h
619 ; CHECK-CVT-NEXT: fcvtl2 v2.4s, v0.8h
620 ; CHECK-CVT-NEXT: fcvtzu v0.4s, v1.4s
621 ; CHECK-CVT-NEXT: xtn v0.4h, v0.4s
622 ; CHECK-CVT-NEXT: fcvtzu v1.4s, v2.4s
623 ; CHECK-CVT-NEXT: xtn2 v0.8h, v1.4s
624 ; CHECK-CVT-NEXT: ret
626 ; CHECK-FP16-LABEL: fptoui_i16:
627 ; CHECK-FP16: // %bb.0:
628 ; CHECK-FP16-NEXT: fcvtzu v0.8h, v0.8h
629 ; CHECK-FP16-NEXT: ret
630 %1 = fptoui<8 x half> %a to <8 x i16>
634 define <8 x i1> @test_fcmp_une(<8 x half> %a, <8 x half> %b) #0 {
635 ; CHECK-CVT-LABEL: test_fcmp_une:
636 ; CHECK-CVT: // %bb.0:
637 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
638 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
639 ; CHECK-CVT-NEXT: fcvt s2, h2
640 ; CHECK-CVT-NEXT: fcvt s3, h3
641 ; CHECK-CVT-NEXT: fcvt s4, h1
642 ; CHECK-CVT-NEXT: fcmp s3, s2
643 ; CHECK-CVT-NEXT: fcvt s2, h0
644 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
645 ; CHECK-CVT-NEXT: csetm w8, ne
646 ; CHECK-CVT-NEXT: fcmp s2, s4
647 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
648 ; CHECK-CVT-NEXT: fcvt s3, h3
649 ; CHECK-CVT-NEXT: fcvt s2, h2
650 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
651 ; CHECK-CVT-NEXT: csetm w9, ne
652 ; CHECK-CVT-NEXT: fcmp s2, s3
653 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
654 ; CHECK-CVT-NEXT: fcvt s3, h4
655 ; CHECK-CVT-NEXT: fcvt s2, h2
656 ; CHECK-CVT-NEXT: fmov s4, w9
657 ; CHECK-CVT-NEXT: csetm w9, ne
658 ; CHECK-CVT-NEXT: fcmp s2, s3
659 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
660 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
661 ; CHECK-CVT-NEXT: fcvt s2, h2
662 ; CHECK-CVT-NEXT: fcvt s3, h3
663 ; CHECK-CVT-NEXT: mov v4.h[1], w8
664 ; CHECK-CVT-NEXT: csetm w8, ne
665 ; CHECK-CVT-NEXT: fcmp s3, s2
666 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
667 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
668 ; CHECK-CVT-NEXT: fcvt s2, h2
669 ; CHECK-CVT-NEXT: fcvt s3, h3
670 ; CHECK-CVT-NEXT: mov v4.h[2], w9
671 ; CHECK-CVT-NEXT: csetm w9, ne
672 ; CHECK-CVT-NEXT: fcmp s3, s2
673 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
674 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
675 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
676 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
677 ; CHECK-CVT-NEXT: fcvt s2, h2
678 ; CHECK-CVT-NEXT: fcvt s3, h3
679 ; CHECK-CVT-NEXT: mov v4.h[3], w8
680 ; CHECK-CVT-NEXT: fcvt s1, h1
681 ; CHECK-CVT-NEXT: fcvt s0, h0
682 ; CHECK-CVT-NEXT: csetm w8, ne
683 ; CHECK-CVT-NEXT: fcmp s3, s2
684 ; CHECK-CVT-NEXT: mov v4.h[4], w9
685 ; CHECK-CVT-NEXT: csetm w9, ne
686 ; CHECK-CVT-NEXT: fcmp s0, s1
687 ; CHECK-CVT-NEXT: mov v4.h[5], w8
688 ; CHECK-CVT-NEXT: mov v4.h[6], w9
689 ; CHECK-CVT-NEXT: csetm w8, ne
690 ; CHECK-CVT-NEXT: mov v4.h[7], w8
691 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
692 ; CHECK-CVT-NEXT: ret
694 ; CHECK-FP16-LABEL: test_fcmp_une:
695 ; CHECK-FP16: // %bb.0:
696 ; CHECK-FP16-NEXT: fcmeq v0.8h, v0.8h, v1.8h
697 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
698 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
699 ; CHECK-FP16-NEXT: ret
700 %1 = fcmp une <8 x half> %a, %b
704 define <8 x i1> @test_fcmp_ueq(<8 x half> %a, <8 x half> %b) #0 {
705 ; CHECK-CVT-LABEL: test_fcmp_ueq:
706 ; CHECK-CVT: // %bb.0:
707 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
708 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
709 ; CHECK-CVT-NEXT: fcvt s2, h2
710 ; CHECK-CVT-NEXT: fcvt s3, h3
711 ; CHECK-CVT-NEXT: fcmp s3, s2
712 ; CHECK-CVT-NEXT: fcvt s4, h1
713 ; CHECK-CVT-NEXT: fcvt s2, h0
714 ; CHECK-CVT-NEXT: csetm w8, eq
715 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
716 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, vc
717 ; CHECK-CVT-NEXT: fcmp s2, s4
718 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
719 ; CHECK-CVT-NEXT: fcvt s3, h3
720 ; CHECK-CVT-NEXT: fcvt s2, h2
721 ; CHECK-CVT-NEXT: csetm w9, eq
722 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
723 ; CHECK-CVT-NEXT: csinv w9, w9, wzr, vc
724 ; CHECK-CVT-NEXT: fcmp s2, s3
725 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
726 ; CHECK-CVT-NEXT: fcvt s3, h4
727 ; CHECK-CVT-NEXT: fcvt s2, h2
728 ; CHECK-CVT-NEXT: fmov s4, w9
729 ; CHECK-CVT-NEXT: csetm w9, eq
730 ; CHECK-CVT-NEXT: csinv w9, w9, wzr, vc
731 ; CHECK-CVT-NEXT: fcmp s2, s3
732 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
733 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
734 ; CHECK-CVT-NEXT: fcvt s2, h2
735 ; CHECK-CVT-NEXT: fcvt s3, h3
736 ; CHECK-CVT-NEXT: mov v4.h[1], w8
737 ; CHECK-CVT-NEXT: csetm w8, eq
738 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, vc
739 ; CHECK-CVT-NEXT: fcmp s3, s2
740 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
741 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
742 ; CHECK-CVT-NEXT: fcvt s2, h2
743 ; CHECK-CVT-NEXT: fcvt s3, h3
744 ; CHECK-CVT-NEXT: mov v4.h[2], w9
745 ; CHECK-CVT-NEXT: csetm w9, eq
746 ; CHECK-CVT-NEXT: csinv w9, w9, wzr, vc
747 ; CHECK-CVT-NEXT: fcmp s3, s2
748 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
749 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
750 ; CHECK-CVT-NEXT: fcvt s2, h2
751 ; CHECK-CVT-NEXT: fcvt s3, h3
752 ; CHECK-CVT-NEXT: mov v4.h[3], w8
753 ; CHECK-CVT-NEXT: csetm w8, eq
754 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
755 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
756 ; CHECK-CVT-NEXT: mov v4.h[4], w9
757 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, vc
758 ; CHECK-CVT-NEXT: fcmp s3, s2
759 ; CHECK-CVT-NEXT: fcvt s1, h1
760 ; CHECK-CVT-NEXT: fcvt s0, h0
761 ; CHECK-CVT-NEXT: mov v4.h[5], w8
762 ; CHECK-CVT-NEXT: csetm w8, eq
763 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, vc
764 ; CHECK-CVT-NEXT: fcmp s0, s1
765 ; CHECK-CVT-NEXT: mov v4.h[6], w8
766 ; CHECK-CVT-NEXT: csetm w8, eq
767 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, vc
768 ; CHECK-CVT-NEXT: mov v4.h[7], w8
769 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
770 ; CHECK-CVT-NEXT: ret
772 ; CHECK-FP16-LABEL: test_fcmp_ueq:
773 ; CHECK-FP16: // %bb.0:
774 ; CHECK-FP16-NEXT: fcmgt v2.8h, v0.8h, v1.8h
775 ; CHECK-FP16-NEXT: fcmgt v0.8h, v1.8h, v0.8h
776 ; CHECK-FP16-NEXT: orr v0.16b, v0.16b, v2.16b
777 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
778 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
779 ; CHECK-FP16-NEXT: ret
780 %1 = fcmp ueq <8 x half> %a, %b
784 define <8 x i1> @test_fcmp_ugt(<8 x half> %a, <8 x half> %b) #0 {
785 ; CHECK-CVT-LABEL: test_fcmp_ugt:
786 ; CHECK-CVT: // %bb.0:
787 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
788 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
789 ; CHECK-CVT-NEXT: fcvt s2, h2
790 ; CHECK-CVT-NEXT: fcvt s3, h3
791 ; CHECK-CVT-NEXT: fcvt s4, h1
792 ; CHECK-CVT-NEXT: fcmp s3, s2
793 ; CHECK-CVT-NEXT: fcvt s2, h0
794 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
795 ; CHECK-CVT-NEXT: csetm w8, hi
796 ; CHECK-CVT-NEXT: fcmp s2, s4
797 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
798 ; CHECK-CVT-NEXT: fcvt s3, h3
799 ; CHECK-CVT-NEXT: fcvt s2, h2
800 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
801 ; CHECK-CVT-NEXT: csetm w9, hi
802 ; CHECK-CVT-NEXT: fcmp s2, s3
803 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
804 ; CHECK-CVT-NEXT: fcvt s3, h4
805 ; CHECK-CVT-NEXT: fcvt s2, h2
806 ; CHECK-CVT-NEXT: fmov s4, w9
807 ; CHECK-CVT-NEXT: csetm w9, hi
808 ; CHECK-CVT-NEXT: fcmp s2, s3
809 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
810 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
811 ; CHECK-CVT-NEXT: fcvt s2, h2
812 ; CHECK-CVT-NEXT: fcvt s3, h3
813 ; CHECK-CVT-NEXT: mov v4.h[1], w8
814 ; CHECK-CVT-NEXT: csetm w8, hi
815 ; CHECK-CVT-NEXT: fcmp s3, s2
816 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
817 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
818 ; CHECK-CVT-NEXT: fcvt s2, h2
819 ; CHECK-CVT-NEXT: fcvt s3, h3
820 ; CHECK-CVT-NEXT: mov v4.h[2], w9
821 ; CHECK-CVT-NEXT: csetm w9, hi
822 ; CHECK-CVT-NEXT: fcmp s3, s2
823 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
824 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
825 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
826 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
827 ; CHECK-CVT-NEXT: fcvt s2, h2
828 ; CHECK-CVT-NEXT: fcvt s3, h3
829 ; CHECK-CVT-NEXT: mov v4.h[3], w8
830 ; CHECK-CVT-NEXT: fcvt s1, h1
831 ; CHECK-CVT-NEXT: fcvt s0, h0
832 ; CHECK-CVT-NEXT: csetm w8, hi
833 ; CHECK-CVT-NEXT: fcmp s3, s2
834 ; CHECK-CVT-NEXT: mov v4.h[4], w9
835 ; CHECK-CVT-NEXT: csetm w9, hi
836 ; CHECK-CVT-NEXT: fcmp s0, s1
837 ; CHECK-CVT-NEXT: mov v4.h[5], w8
838 ; CHECK-CVT-NEXT: mov v4.h[6], w9
839 ; CHECK-CVT-NEXT: csetm w8, hi
840 ; CHECK-CVT-NEXT: mov v4.h[7], w8
841 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
842 ; CHECK-CVT-NEXT: ret
844 ; CHECK-FP16-LABEL: test_fcmp_ugt:
845 ; CHECK-FP16: // %bb.0:
846 ; CHECK-FP16-NEXT: fcmge v0.8h, v1.8h, v0.8h
847 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
848 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
849 ; CHECK-FP16-NEXT: ret
850 %1 = fcmp ugt <8 x half> %a, %b
854 define <8 x i1> @test_fcmp_uge(<8 x half> %a, <8 x half> %b) #0 {
855 ; CHECK-CVT-LABEL: test_fcmp_uge:
856 ; CHECK-CVT: // %bb.0:
857 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
858 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
859 ; CHECK-CVT-NEXT: fcvt s2, h2
860 ; CHECK-CVT-NEXT: fcvt s3, h3
861 ; CHECK-CVT-NEXT: fcvt s4, h1
862 ; CHECK-CVT-NEXT: fcmp s3, s2
863 ; CHECK-CVT-NEXT: fcvt s2, h0
864 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
865 ; CHECK-CVT-NEXT: csetm w8, pl
866 ; CHECK-CVT-NEXT: fcmp s2, s4
867 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
868 ; CHECK-CVT-NEXT: fcvt s3, h3
869 ; CHECK-CVT-NEXT: fcvt s2, h2
870 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
871 ; CHECK-CVT-NEXT: csetm w9, pl
872 ; CHECK-CVT-NEXT: fcmp s2, s3
873 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
874 ; CHECK-CVT-NEXT: fcvt s3, h4
875 ; CHECK-CVT-NEXT: fcvt s2, h2
876 ; CHECK-CVT-NEXT: fmov s4, w9
877 ; CHECK-CVT-NEXT: csetm w9, pl
878 ; CHECK-CVT-NEXT: fcmp s2, s3
879 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
880 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
881 ; CHECK-CVT-NEXT: fcvt s2, h2
882 ; CHECK-CVT-NEXT: fcvt s3, h3
883 ; CHECK-CVT-NEXT: mov v4.h[1], w8
884 ; CHECK-CVT-NEXT: csetm w8, pl
885 ; CHECK-CVT-NEXT: fcmp s3, s2
886 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
887 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
888 ; CHECK-CVT-NEXT: fcvt s2, h2
889 ; CHECK-CVT-NEXT: fcvt s3, h3
890 ; CHECK-CVT-NEXT: mov v4.h[2], w9
891 ; CHECK-CVT-NEXT: csetm w9, pl
892 ; CHECK-CVT-NEXT: fcmp s3, s2
893 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
894 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
895 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
896 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
897 ; CHECK-CVT-NEXT: fcvt s2, h2
898 ; CHECK-CVT-NEXT: fcvt s3, h3
899 ; CHECK-CVT-NEXT: mov v4.h[3], w8
900 ; CHECK-CVT-NEXT: fcvt s1, h1
901 ; CHECK-CVT-NEXT: fcvt s0, h0
902 ; CHECK-CVT-NEXT: csetm w8, pl
903 ; CHECK-CVT-NEXT: fcmp s3, s2
904 ; CHECK-CVT-NEXT: mov v4.h[4], w9
905 ; CHECK-CVT-NEXT: csetm w9, pl
906 ; CHECK-CVT-NEXT: fcmp s0, s1
907 ; CHECK-CVT-NEXT: mov v4.h[5], w8
908 ; CHECK-CVT-NEXT: mov v4.h[6], w9
909 ; CHECK-CVT-NEXT: csetm w8, pl
910 ; CHECK-CVT-NEXT: mov v4.h[7], w8
911 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
912 ; CHECK-CVT-NEXT: ret
914 ; CHECK-FP16-LABEL: test_fcmp_uge:
915 ; CHECK-FP16: // %bb.0:
916 ; CHECK-FP16-NEXT: fcmgt v0.8h, v1.8h, v0.8h
917 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
918 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
919 ; CHECK-FP16-NEXT: ret
920 %1 = fcmp uge <8 x half> %a, %b
924 define <8 x i1> @test_fcmp_ult(<8 x half> %a, <8 x half> %b) #0 {
925 ; CHECK-CVT-LABEL: test_fcmp_ult:
926 ; CHECK-CVT: // %bb.0:
927 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
928 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
929 ; CHECK-CVT-NEXT: fcvt s2, h2
930 ; CHECK-CVT-NEXT: fcvt s3, h3
931 ; CHECK-CVT-NEXT: fcvt s4, h1
932 ; CHECK-CVT-NEXT: fcmp s3, s2
933 ; CHECK-CVT-NEXT: fcvt s2, h0
934 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
935 ; CHECK-CVT-NEXT: csetm w8, lt
936 ; CHECK-CVT-NEXT: fcmp s2, s4
937 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
938 ; CHECK-CVT-NEXT: fcvt s3, h3
939 ; CHECK-CVT-NEXT: fcvt s2, h2
940 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
941 ; CHECK-CVT-NEXT: csetm w9, lt
942 ; CHECK-CVT-NEXT: fcmp s2, s3
943 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
944 ; CHECK-CVT-NEXT: fcvt s3, h4
945 ; CHECK-CVT-NEXT: fcvt s2, h2
946 ; CHECK-CVT-NEXT: fmov s4, w9
947 ; CHECK-CVT-NEXT: csetm w9, lt
948 ; CHECK-CVT-NEXT: fcmp s2, s3
949 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
950 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
951 ; CHECK-CVT-NEXT: fcvt s2, h2
952 ; CHECK-CVT-NEXT: fcvt s3, h3
953 ; CHECK-CVT-NEXT: mov v4.h[1], w8
954 ; CHECK-CVT-NEXT: csetm w8, lt
955 ; CHECK-CVT-NEXT: fcmp s3, s2
956 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
957 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
958 ; CHECK-CVT-NEXT: fcvt s2, h2
959 ; CHECK-CVT-NEXT: fcvt s3, h3
960 ; CHECK-CVT-NEXT: mov v4.h[2], w9
961 ; CHECK-CVT-NEXT: csetm w9, lt
962 ; CHECK-CVT-NEXT: fcmp s3, s2
963 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
964 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
965 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
966 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
967 ; CHECK-CVT-NEXT: fcvt s2, h2
968 ; CHECK-CVT-NEXT: fcvt s3, h3
969 ; CHECK-CVT-NEXT: mov v4.h[3], w8
970 ; CHECK-CVT-NEXT: fcvt s1, h1
971 ; CHECK-CVT-NEXT: fcvt s0, h0
972 ; CHECK-CVT-NEXT: csetm w8, lt
973 ; CHECK-CVT-NEXT: fcmp s3, s2
974 ; CHECK-CVT-NEXT: mov v4.h[4], w9
975 ; CHECK-CVT-NEXT: csetm w9, lt
976 ; CHECK-CVT-NEXT: fcmp s0, s1
977 ; CHECK-CVT-NEXT: mov v4.h[5], w8
978 ; CHECK-CVT-NEXT: mov v4.h[6], w9
979 ; CHECK-CVT-NEXT: csetm w8, lt
980 ; CHECK-CVT-NEXT: mov v4.h[7], w8
981 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
982 ; CHECK-CVT-NEXT: ret
984 ; CHECK-FP16-LABEL: test_fcmp_ult:
985 ; CHECK-FP16: // %bb.0:
986 ; CHECK-FP16-NEXT: fcmge v0.8h, v0.8h, v1.8h
987 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
988 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
989 ; CHECK-FP16-NEXT: ret
990 %1 = fcmp ult <8 x half> %a, %b
994 define <8 x i1> @test_fcmp_ule(<8 x half> %a, <8 x half> %b) #0 {
995 ; CHECK-CVT-LABEL: test_fcmp_ule:
996 ; CHECK-CVT: // %bb.0:
997 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
998 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
999 ; CHECK-CVT-NEXT: fcvt s2, h2
1000 ; CHECK-CVT-NEXT: fcvt s3, h3
1001 ; CHECK-CVT-NEXT: fcvt s4, h1
1002 ; CHECK-CVT-NEXT: fcmp s3, s2
1003 ; CHECK-CVT-NEXT: fcvt s2, h0
1004 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
1005 ; CHECK-CVT-NEXT: csetm w8, le
1006 ; CHECK-CVT-NEXT: fcmp s2, s4
1007 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1008 ; CHECK-CVT-NEXT: fcvt s3, h3
1009 ; CHECK-CVT-NEXT: fcvt s2, h2
1010 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
1011 ; CHECK-CVT-NEXT: csetm w9, le
1012 ; CHECK-CVT-NEXT: fcmp s2, s3
1013 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
1014 ; CHECK-CVT-NEXT: fcvt s3, h4
1015 ; CHECK-CVT-NEXT: fcvt s2, h2
1016 ; CHECK-CVT-NEXT: fmov s4, w9
1017 ; CHECK-CVT-NEXT: csetm w9, le
1018 ; CHECK-CVT-NEXT: fcmp s2, s3
1019 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
1020 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
1021 ; CHECK-CVT-NEXT: fcvt s2, h2
1022 ; CHECK-CVT-NEXT: fcvt s3, h3
1023 ; CHECK-CVT-NEXT: mov v4.h[1], w8
1024 ; CHECK-CVT-NEXT: csetm w8, le
1025 ; CHECK-CVT-NEXT: fcmp s3, s2
1026 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
1027 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
1028 ; CHECK-CVT-NEXT: fcvt s2, h2
1029 ; CHECK-CVT-NEXT: fcvt s3, h3
1030 ; CHECK-CVT-NEXT: mov v4.h[2], w9
1031 ; CHECK-CVT-NEXT: csetm w9, le
1032 ; CHECK-CVT-NEXT: fcmp s3, s2
1033 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
1034 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
1035 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1036 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1037 ; CHECK-CVT-NEXT: fcvt s2, h2
1038 ; CHECK-CVT-NEXT: fcvt s3, h3
1039 ; CHECK-CVT-NEXT: mov v4.h[3], w8
1040 ; CHECK-CVT-NEXT: fcvt s1, h1
1041 ; CHECK-CVT-NEXT: fcvt s0, h0
1042 ; CHECK-CVT-NEXT: csetm w8, le
1043 ; CHECK-CVT-NEXT: fcmp s3, s2
1044 ; CHECK-CVT-NEXT: mov v4.h[4], w9
1045 ; CHECK-CVT-NEXT: csetm w9, le
1046 ; CHECK-CVT-NEXT: fcmp s0, s1
1047 ; CHECK-CVT-NEXT: mov v4.h[5], w8
1048 ; CHECK-CVT-NEXT: mov v4.h[6], w9
1049 ; CHECK-CVT-NEXT: csetm w8, le
1050 ; CHECK-CVT-NEXT: mov v4.h[7], w8
1051 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
1052 ; CHECK-CVT-NEXT: ret
1054 ; CHECK-FP16-LABEL: test_fcmp_ule:
1055 ; CHECK-FP16: // %bb.0:
1056 ; CHECK-FP16-NEXT: fcmgt v0.8h, v0.8h, v1.8h
1057 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
1058 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1059 ; CHECK-FP16-NEXT: ret
1060 %1 = fcmp ule <8 x half> %a, %b
1064 define <8 x i1> @test_fcmp_uno(<8 x half> %a, <8 x half> %b) #0 {
1065 ; CHECK-CVT-LABEL: test_fcmp_uno:
1066 ; CHECK-CVT: // %bb.0:
1067 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1068 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1069 ; CHECK-CVT-NEXT: fcvt s2, h2
1070 ; CHECK-CVT-NEXT: fcvt s3, h3
1071 ; CHECK-CVT-NEXT: fcvt s4, h1
1072 ; CHECK-CVT-NEXT: fcmp s3, s2
1073 ; CHECK-CVT-NEXT: fcvt s2, h0
1074 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
1075 ; CHECK-CVT-NEXT: csetm w8, vs
1076 ; CHECK-CVT-NEXT: fcmp s2, s4
1077 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1078 ; CHECK-CVT-NEXT: fcvt s3, h3
1079 ; CHECK-CVT-NEXT: fcvt s2, h2
1080 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
1081 ; CHECK-CVT-NEXT: csetm w9, vs
1082 ; CHECK-CVT-NEXT: fcmp s2, s3
1083 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
1084 ; CHECK-CVT-NEXT: fcvt s3, h4
1085 ; CHECK-CVT-NEXT: fcvt s2, h2
1086 ; CHECK-CVT-NEXT: fmov s4, w9
1087 ; CHECK-CVT-NEXT: csetm w9, vs
1088 ; CHECK-CVT-NEXT: fcmp s2, s3
1089 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
1090 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
1091 ; CHECK-CVT-NEXT: fcvt s2, h2
1092 ; CHECK-CVT-NEXT: fcvt s3, h3
1093 ; CHECK-CVT-NEXT: mov v4.h[1], w8
1094 ; CHECK-CVT-NEXT: csetm w8, vs
1095 ; CHECK-CVT-NEXT: fcmp s3, s2
1096 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
1097 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
1098 ; CHECK-CVT-NEXT: fcvt s2, h2
1099 ; CHECK-CVT-NEXT: fcvt s3, h3
1100 ; CHECK-CVT-NEXT: mov v4.h[2], w9
1101 ; CHECK-CVT-NEXT: csetm w9, vs
1102 ; CHECK-CVT-NEXT: fcmp s3, s2
1103 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
1104 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
1105 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1106 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1107 ; CHECK-CVT-NEXT: fcvt s2, h2
1108 ; CHECK-CVT-NEXT: fcvt s3, h3
1109 ; CHECK-CVT-NEXT: mov v4.h[3], w8
1110 ; CHECK-CVT-NEXT: fcvt s1, h1
1111 ; CHECK-CVT-NEXT: fcvt s0, h0
1112 ; CHECK-CVT-NEXT: csetm w8, vs
1113 ; CHECK-CVT-NEXT: fcmp s3, s2
1114 ; CHECK-CVT-NEXT: mov v4.h[4], w9
1115 ; CHECK-CVT-NEXT: csetm w9, vs
1116 ; CHECK-CVT-NEXT: fcmp s0, s1
1117 ; CHECK-CVT-NEXT: mov v4.h[5], w8
1118 ; CHECK-CVT-NEXT: mov v4.h[6], w9
1119 ; CHECK-CVT-NEXT: csetm w8, vs
1120 ; CHECK-CVT-NEXT: mov v4.h[7], w8
1121 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
1122 ; CHECK-CVT-NEXT: ret
1124 ; CHECK-FP16-LABEL: test_fcmp_uno:
1125 ; CHECK-FP16: // %bb.0:
1126 ; CHECK-FP16-NEXT: fcmge v2.8h, v0.8h, v1.8h
1127 ; CHECK-FP16-NEXT: fcmgt v0.8h, v1.8h, v0.8h
1128 ; CHECK-FP16-NEXT: orr v0.16b, v0.16b, v2.16b
1129 ; CHECK-FP16-NEXT: mvn v0.16b, v0.16b
1130 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1131 ; CHECK-FP16-NEXT: ret
1132 %1 = fcmp uno <8 x half> %a, %b
1136 define <8 x i1> @test_fcmp_one(<8 x half> %a, <8 x half> %b) #0 {
1137 ; CHECK-CVT-LABEL: test_fcmp_one:
1138 ; CHECK-CVT: // %bb.0:
1139 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1140 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1141 ; CHECK-CVT-NEXT: fcvt s2, h2
1142 ; CHECK-CVT-NEXT: fcvt s3, h3
1143 ; CHECK-CVT-NEXT: fcmp s3, s2
1144 ; CHECK-CVT-NEXT: fcvt s4, h1
1145 ; CHECK-CVT-NEXT: fcvt s2, h0
1146 ; CHECK-CVT-NEXT: csetm w8, mi
1147 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
1148 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, le
1149 ; CHECK-CVT-NEXT: fcmp s2, s4
1150 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1151 ; CHECK-CVT-NEXT: fcvt s3, h3
1152 ; CHECK-CVT-NEXT: fcvt s2, h2
1153 ; CHECK-CVT-NEXT: csetm w9, mi
1154 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
1155 ; CHECK-CVT-NEXT: csinv w9, w9, wzr, le
1156 ; CHECK-CVT-NEXT: fcmp s2, s3
1157 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
1158 ; CHECK-CVT-NEXT: fcvt s3, h4
1159 ; CHECK-CVT-NEXT: fcvt s2, h2
1160 ; CHECK-CVT-NEXT: fmov s4, w9
1161 ; CHECK-CVT-NEXT: csetm w9, mi
1162 ; CHECK-CVT-NEXT: csinv w9, w9, wzr, le
1163 ; CHECK-CVT-NEXT: fcmp s2, s3
1164 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
1165 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
1166 ; CHECK-CVT-NEXT: fcvt s2, h2
1167 ; CHECK-CVT-NEXT: fcvt s3, h3
1168 ; CHECK-CVT-NEXT: mov v4.h[1], w8
1169 ; CHECK-CVT-NEXT: csetm w8, mi
1170 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, le
1171 ; CHECK-CVT-NEXT: fcmp s3, s2
1172 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
1173 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
1174 ; CHECK-CVT-NEXT: fcvt s2, h2
1175 ; CHECK-CVT-NEXT: fcvt s3, h3
1176 ; CHECK-CVT-NEXT: mov v4.h[2], w9
1177 ; CHECK-CVT-NEXT: csetm w9, mi
1178 ; CHECK-CVT-NEXT: csinv w9, w9, wzr, le
1179 ; CHECK-CVT-NEXT: fcmp s3, s2
1180 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
1181 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
1182 ; CHECK-CVT-NEXT: fcvt s2, h2
1183 ; CHECK-CVT-NEXT: fcvt s3, h3
1184 ; CHECK-CVT-NEXT: mov v4.h[3], w8
1185 ; CHECK-CVT-NEXT: csetm w8, mi
1186 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1187 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1188 ; CHECK-CVT-NEXT: mov v4.h[4], w9
1189 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, le
1190 ; CHECK-CVT-NEXT: fcmp s3, s2
1191 ; CHECK-CVT-NEXT: fcvt s1, h1
1192 ; CHECK-CVT-NEXT: fcvt s0, h0
1193 ; CHECK-CVT-NEXT: mov v4.h[5], w8
1194 ; CHECK-CVT-NEXT: csetm w8, mi
1195 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, le
1196 ; CHECK-CVT-NEXT: fcmp s0, s1
1197 ; CHECK-CVT-NEXT: mov v4.h[6], w8
1198 ; CHECK-CVT-NEXT: csetm w8, mi
1199 ; CHECK-CVT-NEXT: csinv w8, w8, wzr, le
1200 ; CHECK-CVT-NEXT: mov v4.h[7], w8
1201 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
1202 ; CHECK-CVT-NEXT: ret
1204 ; CHECK-FP16-LABEL: test_fcmp_one:
1205 ; CHECK-FP16: // %bb.0:
1206 ; CHECK-FP16-NEXT: fcmgt v2.8h, v0.8h, v1.8h
1207 ; CHECK-FP16-NEXT: fcmgt v0.8h, v1.8h, v0.8h
1208 ; CHECK-FP16-NEXT: orr v0.16b, v0.16b, v2.16b
1209 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1210 ; CHECK-FP16-NEXT: ret
1211 %1 = fcmp one <8 x half> %a, %b
1215 define <8 x i1> @test_fcmp_oeq(<8 x half> %a, <8 x half> %b) #0 {
1216 ; CHECK-CVT-LABEL: test_fcmp_oeq:
1217 ; CHECK-CVT: // %bb.0:
1218 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1219 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1220 ; CHECK-CVT-NEXT: fcvt s2, h2
1221 ; CHECK-CVT-NEXT: fcvt s3, h3
1222 ; CHECK-CVT-NEXT: fcvt s4, h1
1223 ; CHECK-CVT-NEXT: fcmp s3, s2
1224 ; CHECK-CVT-NEXT: fcvt s2, h0
1225 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
1226 ; CHECK-CVT-NEXT: csetm w8, eq
1227 ; CHECK-CVT-NEXT: fcmp s2, s4
1228 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1229 ; CHECK-CVT-NEXT: fcvt s3, h3
1230 ; CHECK-CVT-NEXT: fcvt s2, h2
1231 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
1232 ; CHECK-CVT-NEXT: csetm w9, eq
1233 ; CHECK-CVT-NEXT: fcmp s2, s3
1234 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
1235 ; CHECK-CVT-NEXT: fcvt s3, h4
1236 ; CHECK-CVT-NEXT: fcvt s2, h2
1237 ; CHECK-CVT-NEXT: fmov s4, w9
1238 ; CHECK-CVT-NEXT: csetm w9, eq
1239 ; CHECK-CVT-NEXT: fcmp s2, s3
1240 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
1241 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
1242 ; CHECK-CVT-NEXT: fcvt s2, h2
1243 ; CHECK-CVT-NEXT: fcvt s3, h3
1244 ; CHECK-CVT-NEXT: mov v4.h[1], w8
1245 ; CHECK-CVT-NEXT: csetm w8, eq
1246 ; CHECK-CVT-NEXT: fcmp s3, s2
1247 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
1248 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
1249 ; CHECK-CVT-NEXT: fcvt s2, h2
1250 ; CHECK-CVT-NEXT: fcvt s3, h3
1251 ; CHECK-CVT-NEXT: mov v4.h[2], w9
1252 ; CHECK-CVT-NEXT: csetm w9, eq
1253 ; CHECK-CVT-NEXT: fcmp s3, s2
1254 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
1255 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
1256 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1257 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1258 ; CHECK-CVT-NEXT: fcvt s2, h2
1259 ; CHECK-CVT-NEXT: fcvt s3, h3
1260 ; CHECK-CVT-NEXT: mov v4.h[3], w8
1261 ; CHECK-CVT-NEXT: fcvt s1, h1
1262 ; CHECK-CVT-NEXT: fcvt s0, h0
1263 ; CHECK-CVT-NEXT: csetm w8, eq
1264 ; CHECK-CVT-NEXT: fcmp s3, s2
1265 ; CHECK-CVT-NEXT: mov v4.h[4], w9
1266 ; CHECK-CVT-NEXT: csetm w9, eq
1267 ; CHECK-CVT-NEXT: fcmp s0, s1
1268 ; CHECK-CVT-NEXT: mov v4.h[5], w8
1269 ; CHECK-CVT-NEXT: mov v4.h[6], w9
1270 ; CHECK-CVT-NEXT: csetm w8, eq
1271 ; CHECK-CVT-NEXT: mov v4.h[7], w8
1272 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
1273 ; CHECK-CVT-NEXT: ret
1275 ; CHECK-FP16-LABEL: test_fcmp_oeq:
1276 ; CHECK-FP16: // %bb.0:
1277 ; CHECK-FP16-NEXT: fcmeq v0.8h, v0.8h, v1.8h
1278 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1279 ; CHECK-FP16-NEXT: ret
1280 %1 = fcmp oeq <8 x half> %a, %b
1284 define <8 x i1> @test_fcmp_ogt(<8 x half> %a, <8 x half> %b) #0 {
1285 ; CHECK-CVT-LABEL: test_fcmp_ogt:
1286 ; CHECK-CVT: // %bb.0:
1287 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1288 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1289 ; CHECK-CVT-NEXT: fcvt s2, h2
1290 ; CHECK-CVT-NEXT: fcvt s3, h3
1291 ; CHECK-CVT-NEXT: fcvt s4, h1
1292 ; CHECK-CVT-NEXT: fcmp s3, s2
1293 ; CHECK-CVT-NEXT: fcvt s2, h0
1294 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
1295 ; CHECK-CVT-NEXT: csetm w8, gt
1296 ; CHECK-CVT-NEXT: fcmp s2, s4
1297 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1298 ; CHECK-CVT-NEXT: fcvt s3, h3
1299 ; CHECK-CVT-NEXT: fcvt s2, h2
1300 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
1301 ; CHECK-CVT-NEXT: csetm w9, gt
1302 ; CHECK-CVT-NEXT: fcmp s2, s3
1303 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
1304 ; CHECK-CVT-NEXT: fcvt s3, h4
1305 ; CHECK-CVT-NEXT: fcvt s2, h2
1306 ; CHECK-CVT-NEXT: fmov s4, w9
1307 ; CHECK-CVT-NEXT: csetm w9, gt
1308 ; CHECK-CVT-NEXT: fcmp s2, s3
1309 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
1310 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
1311 ; CHECK-CVT-NEXT: fcvt s2, h2
1312 ; CHECK-CVT-NEXT: fcvt s3, h3
1313 ; CHECK-CVT-NEXT: mov v4.h[1], w8
1314 ; CHECK-CVT-NEXT: csetm w8, gt
1315 ; CHECK-CVT-NEXT: fcmp s3, s2
1316 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
1317 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
1318 ; CHECK-CVT-NEXT: fcvt s2, h2
1319 ; CHECK-CVT-NEXT: fcvt s3, h3
1320 ; CHECK-CVT-NEXT: mov v4.h[2], w9
1321 ; CHECK-CVT-NEXT: csetm w9, gt
1322 ; CHECK-CVT-NEXT: fcmp s3, s2
1323 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
1324 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
1325 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1326 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1327 ; CHECK-CVT-NEXT: fcvt s2, h2
1328 ; CHECK-CVT-NEXT: fcvt s3, h3
1329 ; CHECK-CVT-NEXT: mov v4.h[3], w8
1330 ; CHECK-CVT-NEXT: fcvt s1, h1
1331 ; CHECK-CVT-NEXT: fcvt s0, h0
1332 ; CHECK-CVT-NEXT: csetm w8, gt
1333 ; CHECK-CVT-NEXT: fcmp s3, s2
1334 ; CHECK-CVT-NEXT: mov v4.h[4], w9
1335 ; CHECK-CVT-NEXT: csetm w9, gt
1336 ; CHECK-CVT-NEXT: fcmp s0, s1
1337 ; CHECK-CVT-NEXT: mov v4.h[5], w8
1338 ; CHECK-CVT-NEXT: mov v4.h[6], w9
1339 ; CHECK-CVT-NEXT: csetm w8, gt
1340 ; CHECK-CVT-NEXT: mov v4.h[7], w8
1341 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
1342 ; CHECK-CVT-NEXT: ret
1344 ; CHECK-FP16-LABEL: test_fcmp_ogt:
1345 ; CHECK-FP16: // %bb.0:
1346 ; CHECK-FP16-NEXT: fcmgt v0.8h, v0.8h, v1.8h
1347 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1348 ; CHECK-FP16-NEXT: ret
1349 %1 = fcmp ogt <8 x half> %a, %b
1353 define <8 x i1> @test_fcmp_oge(<8 x half> %a, <8 x half> %b) #0 {
1354 ; CHECK-CVT-LABEL: test_fcmp_oge:
1355 ; CHECK-CVT: // %bb.0:
1356 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1357 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1358 ; CHECK-CVT-NEXT: fcvt s2, h2
1359 ; CHECK-CVT-NEXT: fcvt s3, h3
1360 ; CHECK-CVT-NEXT: fcvt s4, h1
1361 ; CHECK-CVT-NEXT: fcmp s3, s2
1362 ; CHECK-CVT-NEXT: fcvt s2, h0
1363 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
1364 ; CHECK-CVT-NEXT: csetm w8, ge
1365 ; CHECK-CVT-NEXT: fcmp s2, s4
1366 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1367 ; CHECK-CVT-NEXT: fcvt s3, h3
1368 ; CHECK-CVT-NEXT: fcvt s2, h2
1369 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
1370 ; CHECK-CVT-NEXT: csetm w9, ge
1371 ; CHECK-CVT-NEXT: fcmp s2, s3
1372 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
1373 ; CHECK-CVT-NEXT: fcvt s3, h4
1374 ; CHECK-CVT-NEXT: fcvt s2, h2
1375 ; CHECK-CVT-NEXT: fmov s4, w9
1376 ; CHECK-CVT-NEXT: csetm w9, ge
1377 ; CHECK-CVT-NEXT: fcmp s2, s3
1378 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
1379 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
1380 ; CHECK-CVT-NEXT: fcvt s2, h2
1381 ; CHECK-CVT-NEXT: fcvt s3, h3
1382 ; CHECK-CVT-NEXT: mov v4.h[1], w8
1383 ; CHECK-CVT-NEXT: csetm w8, ge
1384 ; CHECK-CVT-NEXT: fcmp s3, s2
1385 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
1386 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
1387 ; CHECK-CVT-NEXT: fcvt s2, h2
1388 ; CHECK-CVT-NEXT: fcvt s3, h3
1389 ; CHECK-CVT-NEXT: mov v4.h[2], w9
1390 ; CHECK-CVT-NEXT: csetm w9, ge
1391 ; CHECK-CVT-NEXT: fcmp s3, s2
1392 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
1393 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
1394 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1395 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1396 ; CHECK-CVT-NEXT: fcvt s2, h2
1397 ; CHECK-CVT-NEXT: fcvt s3, h3
1398 ; CHECK-CVT-NEXT: mov v4.h[3], w8
1399 ; CHECK-CVT-NEXT: fcvt s1, h1
1400 ; CHECK-CVT-NEXT: fcvt s0, h0
1401 ; CHECK-CVT-NEXT: csetm w8, ge
1402 ; CHECK-CVT-NEXT: fcmp s3, s2
1403 ; CHECK-CVT-NEXT: mov v4.h[4], w9
1404 ; CHECK-CVT-NEXT: csetm w9, ge
1405 ; CHECK-CVT-NEXT: fcmp s0, s1
1406 ; CHECK-CVT-NEXT: mov v4.h[5], w8
1407 ; CHECK-CVT-NEXT: mov v4.h[6], w9
1408 ; CHECK-CVT-NEXT: csetm w8, ge
1409 ; CHECK-CVT-NEXT: mov v4.h[7], w8
1410 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
1411 ; CHECK-CVT-NEXT: ret
1413 ; CHECK-FP16-LABEL: test_fcmp_oge:
1414 ; CHECK-FP16: // %bb.0:
1415 ; CHECK-FP16-NEXT: fcmge v0.8h, v0.8h, v1.8h
1416 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1417 ; CHECK-FP16-NEXT: ret
1418 %1 = fcmp oge <8 x half> %a, %b
1422 define <8 x i1> @test_fcmp_olt(<8 x half> %a, <8 x half> %b) #0 {
1423 ; CHECK-CVT-LABEL: test_fcmp_olt:
1424 ; CHECK-CVT: // %bb.0:
1425 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1426 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1427 ; CHECK-CVT-NEXT: fcvt s2, h2
1428 ; CHECK-CVT-NEXT: fcvt s3, h3
1429 ; CHECK-CVT-NEXT: fcvt s4, h1
1430 ; CHECK-CVT-NEXT: fcmp s3, s2
1431 ; CHECK-CVT-NEXT: fcvt s2, h0
1432 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
1433 ; CHECK-CVT-NEXT: csetm w8, mi
1434 ; CHECK-CVT-NEXT: fcmp s2, s4
1435 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1436 ; CHECK-CVT-NEXT: fcvt s3, h3
1437 ; CHECK-CVT-NEXT: fcvt s2, h2
1438 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
1439 ; CHECK-CVT-NEXT: csetm w9, mi
1440 ; CHECK-CVT-NEXT: fcmp s2, s3
1441 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
1442 ; CHECK-CVT-NEXT: fcvt s3, h4
1443 ; CHECK-CVT-NEXT: fcvt s2, h2
1444 ; CHECK-CVT-NEXT: fmov s4, w9
1445 ; CHECK-CVT-NEXT: csetm w9, mi
1446 ; CHECK-CVT-NEXT: fcmp s2, s3
1447 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
1448 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
1449 ; CHECK-CVT-NEXT: fcvt s2, h2
1450 ; CHECK-CVT-NEXT: fcvt s3, h3
1451 ; CHECK-CVT-NEXT: mov v4.h[1], w8
1452 ; CHECK-CVT-NEXT: csetm w8, mi
1453 ; CHECK-CVT-NEXT: fcmp s3, s2
1454 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
1455 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
1456 ; CHECK-CVT-NEXT: fcvt s2, h2
1457 ; CHECK-CVT-NEXT: fcvt s3, h3
1458 ; CHECK-CVT-NEXT: mov v4.h[2], w9
1459 ; CHECK-CVT-NEXT: csetm w9, mi
1460 ; CHECK-CVT-NEXT: fcmp s3, s2
1461 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
1462 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
1463 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1464 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1465 ; CHECK-CVT-NEXT: fcvt s2, h2
1466 ; CHECK-CVT-NEXT: fcvt s3, h3
1467 ; CHECK-CVT-NEXT: mov v4.h[3], w8
1468 ; CHECK-CVT-NEXT: fcvt s1, h1
1469 ; CHECK-CVT-NEXT: fcvt s0, h0
1470 ; CHECK-CVT-NEXT: csetm w8, mi
1471 ; CHECK-CVT-NEXT: fcmp s3, s2
1472 ; CHECK-CVT-NEXT: mov v4.h[4], w9
1473 ; CHECK-CVT-NEXT: csetm w9, mi
1474 ; CHECK-CVT-NEXT: fcmp s0, s1
1475 ; CHECK-CVT-NEXT: mov v4.h[5], w8
1476 ; CHECK-CVT-NEXT: mov v4.h[6], w9
1477 ; CHECK-CVT-NEXT: csetm w8, mi
1478 ; CHECK-CVT-NEXT: mov v4.h[7], w8
1479 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
1480 ; CHECK-CVT-NEXT: ret
1482 ; CHECK-FP16-LABEL: test_fcmp_olt:
1483 ; CHECK-FP16: // %bb.0:
1484 ; CHECK-FP16-NEXT: fcmgt v0.8h, v1.8h, v0.8h
1485 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1486 ; CHECK-FP16-NEXT: ret
1487 %1 = fcmp olt <8 x half> %a, %b
1491 define <8 x i1> @test_fcmp_ole(<8 x half> %a, <8 x half> %b) #0 {
1492 ; CHECK-CVT-LABEL: test_fcmp_ole:
1493 ; CHECK-CVT: // %bb.0:
1494 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1495 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1496 ; CHECK-CVT-NEXT: fcvt s2, h2
1497 ; CHECK-CVT-NEXT: fcvt s3, h3
1498 ; CHECK-CVT-NEXT: fcvt s4, h1
1499 ; CHECK-CVT-NEXT: fcmp s3, s2
1500 ; CHECK-CVT-NEXT: fcvt s2, h0
1501 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
1502 ; CHECK-CVT-NEXT: csetm w8, ls
1503 ; CHECK-CVT-NEXT: fcmp s2, s4
1504 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1505 ; CHECK-CVT-NEXT: fcvt s3, h3
1506 ; CHECK-CVT-NEXT: fcvt s2, h2
1507 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
1508 ; CHECK-CVT-NEXT: csetm w9, ls
1509 ; CHECK-CVT-NEXT: fcmp s2, s3
1510 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
1511 ; CHECK-CVT-NEXT: fcvt s3, h4
1512 ; CHECK-CVT-NEXT: fcvt s2, h2
1513 ; CHECK-CVT-NEXT: fmov s4, w9
1514 ; CHECK-CVT-NEXT: csetm w9, ls
1515 ; CHECK-CVT-NEXT: fcmp s2, s3
1516 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
1517 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
1518 ; CHECK-CVT-NEXT: fcvt s2, h2
1519 ; CHECK-CVT-NEXT: fcvt s3, h3
1520 ; CHECK-CVT-NEXT: mov v4.h[1], w8
1521 ; CHECK-CVT-NEXT: csetm w8, ls
1522 ; CHECK-CVT-NEXT: fcmp s3, s2
1523 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
1524 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
1525 ; CHECK-CVT-NEXT: fcvt s2, h2
1526 ; CHECK-CVT-NEXT: fcvt s3, h3
1527 ; CHECK-CVT-NEXT: mov v4.h[2], w9
1528 ; CHECK-CVT-NEXT: csetm w9, ls
1529 ; CHECK-CVT-NEXT: fcmp s3, s2
1530 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
1531 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
1532 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1533 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1534 ; CHECK-CVT-NEXT: fcvt s2, h2
1535 ; CHECK-CVT-NEXT: fcvt s3, h3
1536 ; CHECK-CVT-NEXT: mov v4.h[3], w8
1537 ; CHECK-CVT-NEXT: fcvt s1, h1
1538 ; CHECK-CVT-NEXT: fcvt s0, h0
1539 ; CHECK-CVT-NEXT: csetm w8, ls
1540 ; CHECK-CVT-NEXT: fcmp s3, s2
1541 ; CHECK-CVT-NEXT: mov v4.h[4], w9
1542 ; CHECK-CVT-NEXT: csetm w9, ls
1543 ; CHECK-CVT-NEXT: fcmp s0, s1
1544 ; CHECK-CVT-NEXT: mov v4.h[5], w8
1545 ; CHECK-CVT-NEXT: mov v4.h[6], w9
1546 ; CHECK-CVT-NEXT: csetm w8, ls
1547 ; CHECK-CVT-NEXT: mov v4.h[7], w8
1548 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
1549 ; CHECK-CVT-NEXT: ret
1551 ; CHECK-FP16-LABEL: test_fcmp_ole:
1552 ; CHECK-FP16: // %bb.0:
1553 ; CHECK-FP16-NEXT: fcmge v0.8h, v1.8h, v0.8h
1554 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1555 ; CHECK-FP16-NEXT: ret
1556 %1 = fcmp ole <8 x half> %a, %b
1560 define <8 x i1> @test_fcmp_ord(<8 x half> %a, <8 x half> %b) #0 {
1561 ; CHECK-CVT-LABEL: test_fcmp_ord:
1562 ; CHECK-CVT: // %bb.0:
1563 ; CHECK-CVT-NEXT: mov h2, v1.h[1]
1564 ; CHECK-CVT-NEXT: mov h3, v0.h[1]
1565 ; CHECK-CVT-NEXT: fcvt s2, h2
1566 ; CHECK-CVT-NEXT: fcvt s3, h3
1567 ; CHECK-CVT-NEXT: fcvt s4, h1
1568 ; CHECK-CVT-NEXT: fcmp s3, s2
1569 ; CHECK-CVT-NEXT: fcvt s2, h0
1570 ; CHECK-CVT-NEXT: mov h3, v1.h[2]
1571 ; CHECK-CVT-NEXT: csetm w8, vc
1572 ; CHECK-CVT-NEXT: fcmp s2, s4
1573 ; CHECK-CVT-NEXT: mov h2, v0.h[2]
1574 ; CHECK-CVT-NEXT: fcvt s3, h3
1575 ; CHECK-CVT-NEXT: fcvt s2, h2
1576 ; CHECK-CVT-NEXT: mov h4, v1.h[3]
1577 ; CHECK-CVT-NEXT: csetm w9, vc
1578 ; CHECK-CVT-NEXT: fcmp s2, s3
1579 ; CHECK-CVT-NEXT: mov h2, v0.h[3]
1580 ; CHECK-CVT-NEXT: fcvt s3, h4
1581 ; CHECK-CVT-NEXT: fcvt s2, h2
1582 ; CHECK-CVT-NEXT: fmov s4, w9
1583 ; CHECK-CVT-NEXT: csetm w9, vc
1584 ; CHECK-CVT-NEXT: fcmp s2, s3
1585 ; CHECK-CVT-NEXT: mov h2, v1.h[4]
1586 ; CHECK-CVT-NEXT: mov h3, v0.h[4]
1587 ; CHECK-CVT-NEXT: fcvt s2, h2
1588 ; CHECK-CVT-NEXT: fcvt s3, h3
1589 ; CHECK-CVT-NEXT: mov v4.h[1], w8
1590 ; CHECK-CVT-NEXT: csetm w8, vc
1591 ; CHECK-CVT-NEXT: fcmp s3, s2
1592 ; CHECK-CVT-NEXT: mov h2, v1.h[5]
1593 ; CHECK-CVT-NEXT: mov h3, v0.h[5]
1594 ; CHECK-CVT-NEXT: fcvt s2, h2
1595 ; CHECK-CVT-NEXT: fcvt s3, h3
1596 ; CHECK-CVT-NEXT: mov v4.h[2], w9
1597 ; CHECK-CVT-NEXT: csetm w9, vc
1598 ; CHECK-CVT-NEXT: fcmp s3, s2
1599 ; CHECK-CVT-NEXT: mov h2, v1.h[6]
1600 ; CHECK-CVT-NEXT: mov h3, v0.h[6]
1601 ; CHECK-CVT-NEXT: mov h1, v1.h[7]
1602 ; CHECK-CVT-NEXT: mov h0, v0.h[7]
1603 ; CHECK-CVT-NEXT: fcvt s2, h2
1604 ; CHECK-CVT-NEXT: fcvt s3, h3
1605 ; CHECK-CVT-NEXT: mov v4.h[3], w8
1606 ; CHECK-CVT-NEXT: fcvt s1, h1
1607 ; CHECK-CVT-NEXT: fcvt s0, h0
1608 ; CHECK-CVT-NEXT: csetm w8, vc
1609 ; CHECK-CVT-NEXT: fcmp s3, s2
1610 ; CHECK-CVT-NEXT: mov v4.h[4], w9
1611 ; CHECK-CVT-NEXT: csetm w9, vc
1612 ; CHECK-CVT-NEXT: fcmp s0, s1
1613 ; CHECK-CVT-NEXT: mov v4.h[5], w8
1614 ; CHECK-CVT-NEXT: mov v4.h[6], w9
1615 ; CHECK-CVT-NEXT: csetm w8, vc
1616 ; CHECK-CVT-NEXT: mov v4.h[7], w8
1617 ; CHECK-CVT-NEXT: xtn v0.8b, v4.8h
1618 ; CHECK-CVT-NEXT: ret
1620 ; CHECK-FP16-LABEL: test_fcmp_ord:
1621 ; CHECK-FP16: // %bb.0:
1622 ; CHECK-FP16-NEXT: fcmge v2.8h, v0.8h, v1.8h
1623 ; CHECK-FP16-NEXT: fcmgt v0.8h, v1.8h, v0.8h
1624 ; CHECK-FP16-NEXT: orr v0.16b, v0.16b, v2.16b
1625 ; CHECK-FP16-NEXT: xtn v0.8b, v0.8h
1626 ; CHECK-FP16-NEXT: ret
1627 %1 = fcmp ord <8 x half> %a, %b
1631 attributes #0 = { nounwind }