1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -target-abi=ilp32d -mattr=+v,+zfh,+zvfh,+f,+d -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
3 ; RUN: llc -mtriple=riscv64 -target-abi=lp64d -mattr=+v,+zfh,+zvfh,+f,+d -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
4 ; RUN: llc -mtriple=riscv32 -target-abi=ilp32d -mattr=+v,+zfh,+zvfhmin,+f,+d -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
5 ; RUN: llc -mtriple=riscv64 -target-abi=lp64d -mattr=+v,+zfh,+zvfhmin,+f,+d -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
7 define void @fcmp_oeq_vv_v8f16(ptr %x, ptr %y, ptr %z) {
8 ; ZVFH-LABEL: fcmp_oeq_vv_v8f16:
10 ; ZVFH-NEXT: vsetivli zero, 8, e16, m1, ta, ma
11 ; ZVFH-NEXT: vle16.v v8, (a0)
12 ; ZVFH-NEXT: vle16.v v9, (a1)
13 ; ZVFH-NEXT: vmfeq.vv v8, v8, v9
14 ; ZVFH-NEXT: vsm.v v8, (a2)
17 ; ZVFHMIN-LABEL: fcmp_oeq_vv_v8f16:
19 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
20 ; ZVFHMIN-NEXT: vle16.v v8, (a1)
21 ; ZVFHMIN-NEXT: vle16.v v9, (a0)
22 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
23 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
24 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
25 ; ZVFHMIN-NEXT: vmfeq.vv v8, v12, v10
26 ; ZVFHMIN-NEXT: vsm.v v8, (a2)
28 %a = load <8 x half>, ptr %x
29 %b = load <8 x half>, ptr %y
30 %c = fcmp oeq <8 x half> %a, %b
31 store <8 x i1> %c, ptr %z
35 define void @fcmp_oeq_vv_v8f16_nonans(ptr %x, ptr %y, ptr %z) {
36 ; ZVFH-LABEL: fcmp_oeq_vv_v8f16_nonans:
38 ; ZVFH-NEXT: vsetivli zero, 8, e16, m1, ta, ma
39 ; ZVFH-NEXT: vle16.v v8, (a0)
40 ; ZVFH-NEXT: vle16.v v9, (a1)
41 ; ZVFH-NEXT: vmfeq.vv v8, v8, v9
42 ; ZVFH-NEXT: vsm.v v8, (a2)
45 ; ZVFHMIN-LABEL: fcmp_oeq_vv_v8f16_nonans:
47 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
48 ; ZVFHMIN-NEXT: vle16.v v8, (a1)
49 ; ZVFHMIN-NEXT: vle16.v v9, (a0)
50 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
51 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
52 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
53 ; ZVFHMIN-NEXT: vmfeq.vv v8, v12, v10
54 ; ZVFHMIN-NEXT: vsm.v v8, (a2)
56 %a = load <8 x half>, ptr %x
57 %b = load <8 x half>, ptr %y
58 %c = fcmp nnan oeq <8 x half> %a, %b
59 store <8 x i1> %c, ptr %z
63 define void @fcmp_une_vv_v4f32(ptr %x, ptr %y, ptr %z) {
64 ; CHECK-LABEL: fcmp_une_vv_v4f32:
66 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
67 ; CHECK-NEXT: vle32.v v8, (a0)
68 ; CHECK-NEXT: vle32.v v9, (a1)
69 ; CHECK-NEXT: vmfne.vv v0, v8, v9
70 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
71 ; CHECK-NEXT: vmv.v.i v8, 0
72 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
73 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
74 ; CHECK-NEXT: vmv.v.i v9, 0
75 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
76 ; CHECK-NEXT: vmv.v.v v9, v8
77 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
78 ; CHECK-NEXT: vmsne.vi v8, v9, 0
79 ; CHECK-NEXT: vsm.v v8, (a2)
81 %a = load <4 x float>, ptr %x
82 %b = load <4 x float>, ptr %y
83 %c = fcmp une <4 x float> %a, %b
84 store <4 x i1> %c, ptr %z
88 define void @fcmp_une_vv_v4f32_nonans(ptr %x, ptr %y, ptr %z) {
89 ; CHECK-LABEL: fcmp_une_vv_v4f32_nonans:
91 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
92 ; CHECK-NEXT: vle32.v v8, (a0)
93 ; CHECK-NEXT: vle32.v v9, (a1)
94 ; CHECK-NEXT: vmfne.vv v0, v8, v9
95 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
96 ; CHECK-NEXT: vmv.v.i v8, 0
97 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
98 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
99 ; CHECK-NEXT: vmv.v.i v9, 0
100 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
101 ; CHECK-NEXT: vmv.v.v v9, v8
102 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
103 ; CHECK-NEXT: vmsne.vi v8, v9, 0
104 ; CHECK-NEXT: vsm.v v8, (a2)
106 %a = load <4 x float>, ptr %x
107 %b = load <4 x float>, ptr %y
108 %c = fcmp nnan une <4 x float> %a, %b
109 store <4 x i1> %c, ptr %z
113 define void @fcmp_ogt_vv_v2f64(ptr %x, ptr %y, ptr %z) {
114 ; CHECK-LABEL: fcmp_ogt_vv_v2f64:
116 ; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma
117 ; CHECK-NEXT: vle64.v v8, (a0)
118 ; CHECK-NEXT: vle64.v v9, (a1)
119 ; CHECK-NEXT: vmflt.vv v0, v9, v8
120 ; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
121 ; CHECK-NEXT: vmv.v.i v8, 0
122 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
123 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
124 ; CHECK-NEXT: vmv.v.i v9, 0
125 ; CHECK-NEXT: vsetivli zero, 2, e8, mf2, tu, ma
126 ; CHECK-NEXT: vmv.v.v v9, v8
127 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
128 ; CHECK-NEXT: vmsne.vi v8, v9, 0
129 ; CHECK-NEXT: vsm.v v8, (a2)
131 %a = load <2 x double>, ptr %x
132 %b = load <2 x double>, ptr %y
133 %c = fcmp ogt <2 x double> %a, %b
134 store <2 x i1> %c, ptr %z
138 define void @fcmp_ogt_vv_v2f64_nonans(ptr %x, ptr %y, ptr %z) {
139 ; CHECK-LABEL: fcmp_ogt_vv_v2f64_nonans:
141 ; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma
142 ; CHECK-NEXT: vle64.v v8, (a0)
143 ; CHECK-NEXT: vle64.v v9, (a1)
144 ; CHECK-NEXT: vmflt.vv v0, v9, v8
145 ; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
146 ; CHECK-NEXT: vmv.v.i v8, 0
147 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
148 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
149 ; CHECK-NEXT: vmv.v.i v9, 0
150 ; CHECK-NEXT: vsetivli zero, 2, e8, mf2, tu, ma
151 ; CHECK-NEXT: vmv.v.v v9, v8
152 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
153 ; CHECK-NEXT: vmsne.vi v8, v9, 0
154 ; CHECK-NEXT: vsm.v v8, (a2)
156 %a = load <2 x double>, ptr %x
157 %b = load <2 x double>, ptr %y
158 %c = fcmp nnan ogt <2 x double> %a, %b
159 store <2 x i1> %c, ptr %z
163 define void @fcmp_olt_vv_v16f16(ptr %x, ptr %y, ptr %z) {
164 ; ZVFH-LABEL: fcmp_olt_vv_v16f16:
166 ; ZVFH-NEXT: vsetivli zero, 16, e16, m2, ta, ma
167 ; ZVFH-NEXT: vle16.v v8, (a0)
168 ; ZVFH-NEXT: vle16.v v10, (a1)
169 ; ZVFH-NEXT: vmflt.vv v12, v8, v10
170 ; ZVFH-NEXT: vsm.v v12, (a2)
173 ; ZVFHMIN-LABEL: fcmp_olt_vv_v16f16:
175 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
176 ; ZVFHMIN-NEXT: vle16.v v8, (a1)
177 ; ZVFHMIN-NEXT: vle16.v v10, (a0)
178 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
179 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
180 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
181 ; ZVFHMIN-NEXT: vmflt.vv v8, v16, v12
182 ; ZVFHMIN-NEXT: vsm.v v8, (a2)
184 %a = load <16 x half>, ptr %x
185 %b = load <16 x half>, ptr %y
186 %c = fcmp olt <16 x half> %a, %b
187 store <16 x i1> %c, ptr %z
191 define void @fcmp_olt_vv_v16f16_nonans(ptr %x, ptr %y, ptr %z) {
192 ; ZVFH-LABEL: fcmp_olt_vv_v16f16_nonans:
194 ; ZVFH-NEXT: vsetivli zero, 16, e16, m2, ta, ma
195 ; ZVFH-NEXT: vle16.v v8, (a0)
196 ; ZVFH-NEXT: vle16.v v10, (a1)
197 ; ZVFH-NEXT: vmflt.vv v12, v8, v10
198 ; ZVFH-NEXT: vsm.v v12, (a2)
201 ; ZVFHMIN-LABEL: fcmp_olt_vv_v16f16_nonans:
203 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
204 ; ZVFHMIN-NEXT: vle16.v v8, (a1)
205 ; ZVFHMIN-NEXT: vle16.v v10, (a0)
206 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
207 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
208 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
209 ; ZVFHMIN-NEXT: vmflt.vv v8, v16, v12
210 ; ZVFHMIN-NEXT: vsm.v v8, (a2)
212 %a = load <16 x half>, ptr %x
213 %b = load <16 x half>, ptr %y
214 %c = fcmp nnan olt <16 x half> %a, %b
215 store <16 x i1> %c, ptr %z
219 define void @fcmp_oge_vv_v8f32(ptr %x, ptr %y, ptr %z) {
220 ; CHECK-LABEL: fcmp_oge_vv_v8f32:
222 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
223 ; CHECK-NEXT: vle32.v v8, (a0)
224 ; CHECK-NEXT: vle32.v v10, (a1)
225 ; CHECK-NEXT: vmfle.vv v12, v10, v8
226 ; CHECK-NEXT: vsm.v v12, (a2)
228 %a = load <8 x float>, ptr %x
229 %b = load <8 x float>, ptr %y
230 %c = fcmp oge <8 x float> %a, %b
231 store <8 x i1> %c, ptr %z
235 define void @fcmp_oge_vv_v8f32_nonans(ptr %x, ptr %y, ptr %z) {
236 ; CHECK-LABEL: fcmp_oge_vv_v8f32_nonans:
238 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
239 ; CHECK-NEXT: vle32.v v8, (a0)
240 ; CHECK-NEXT: vle32.v v10, (a1)
241 ; CHECK-NEXT: vmfle.vv v12, v10, v8
242 ; CHECK-NEXT: vsm.v v12, (a2)
244 %a = load <8 x float>, ptr %x
245 %b = load <8 x float>, ptr %y
246 %c = fcmp nnan oge <8 x float> %a, %b
247 store <8 x i1> %c, ptr %z
251 define void @fcmp_ole_vv_v4f64(ptr %x, ptr %y, ptr %z) {
252 ; CHECK-LABEL: fcmp_ole_vv_v4f64:
254 ; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma
255 ; CHECK-NEXT: vle64.v v8, (a0)
256 ; CHECK-NEXT: vle64.v v10, (a1)
257 ; CHECK-NEXT: vmfle.vv v0, v8, v10
258 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
259 ; CHECK-NEXT: vmv.v.i v8, 0
260 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
261 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
262 ; CHECK-NEXT: vmv.v.i v9, 0
263 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
264 ; CHECK-NEXT: vmv.v.v v9, v8
265 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
266 ; CHECK-NEXT: vmsne.vi v8, v9, 0
267 ; CHECK-NEXT: vsm.v v8, (a2)
269 %a = load <4 x double>, ptr %x
270 %b = load <4 x double>, ptr %y
271 %c = fcmp ole <4 x double> %a, %b
272 store <4 x i1> %c, ptr %z
276 define void @fcmp_ole_vv_v4f64_nonans(ptr %x, ptr %y, ptr %z) {
277 ; CHECK-LABEL: fcmp_ole_vv_v4f64_nonans:
279 ; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma
280 ; CHECK-NEXT: vle64.v v8, (a0)
281 ; CHECK-NEXT: vle64.v v10, (a1)
282 ; CHECK-NEXT: vmfle.vv v0, v8, v10
283 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
284 ; CHECK-NEXT: vmv.v.i v8, 0
285 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
286 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
287 ; CHECK-NEXT: vmv.v.i v9, 0
288 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
289 ; CHECK-NEXT: vmv.v.v v9, v8
290 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
291 ; CHECK-NEXT: vmsne.vi v8, v9, 0
292 ; CHECK-NEXT: vsm.v v8, (a2)
294 %a = load <4 x double>, ptr %x
295 %b = load <4 x double>, ptr %y
296 %c = fcmp nnan ole <4 x double> %a, %b
297 store <4 x i1> %c, ptr %z
301 define void @fcmp_ule_vv_v32f16(ptr %x, ptr %y, ptr %z) {
302 ; ZVFH-LABEL: fcmp_ule_vv_v32f16:
304 ; ZVFH-NEXT: li a3, 32
305 ; ZVFH-NEXT: vsetvli zero, a3, e16, m4, ta, ma
306 ; ZVFH-NEXT: vle16.v v8, (a0)
307 ; ZVFH-NEXT: vle16.v v12, (a1)
308 ; ZVFH-NEXT: vmflt.vv v16, v12, v8
309 ; ZVFH-NEXT: vmnot.m v8, v16
310 ; ZVFH-NEXT: vsm.v v8, (a2)
313 ; ZVFHMIN-LABEL: fcmp_ule_vv_v32f16:
315 ; ZVFHMIN-NEXT: li a3, 32
316 ; ZVFHMIN-NEXT: vsetvli zero, a3, e16, m4, ta, ma
317 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
318 ; ZVFHMIN-NEXT: vle16.v v12, (a1)
319 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
320 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
321 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
322 ; ZVFHMIN-NEXT: vmflt.vv v8, v24, v16
323 ; ZVFHMIN-NEXT: vmnot.m v8, v8
324 ; ZVFHMIN-NEXT: vsm.v v8, (a2)
326 %a = load <32 x half>, ptr %x
327 %b = load <32 x half>, ptr %y
328 %c = fcmp ule <32 x half> %a, %b
329 store <32 x i1> %c, ptr %z
333 define void @fcmp_ule_vv_v32f16_nonans(ptr %x, ptr %y, ptr %z) {
334 ; ZVFH-LABEL: fcmp_ule_vv_v32f16_nonans:
336 ; ZVFH-NEXT: li a3, 32
337 ; ZVFH-NEXT: vsetvli zero, a3, e16, m4, ta, ma
338 ; ZVFH-NEXT: vle16.v v8, (a0)
339 ; ZVFH-NEXT: vle16.v v12, (a1)
340 ; ZVFH-NEXT: vmfle.vv v16, v8, v12
341 ; ZVFH-NEXT: vsm.v v16, (a2)
344 ; ZVFHMIN-LABEL: fcmp_ule_vv_v32f16_nonans:
346 ; ZVFHMIN-NEXT: li a3, 32
347 ; ZVFHMIN-NEXT: vsetvli zero, a3, e16, m4, ta, ma
348 ; ZVFHMIN-NEXT: vle16.v v8, (a1)
349 ; ZVFHMIN-NEXT: vle16.v v12, (a0)
350 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
351 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
352 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
353 ; ZVFHMIN-NEXT: vmfle.vv v8, v24, v16
354 ; ZVFHMIN-NEXT: vsm.v v8, (a2)
356 %a = load <32 x half>, ptr %x
357 %b = load <32 x half>, ptr %y
358 %c = fcmp nnan ule <32 x half> %a, %b
359 store <32 x i1> %c, ptr %z
363 define void @fcmp_uge_vv_v16f32(ptr %x, ptr %y, ptr %z) {
364 ; CHECK-LABEL: fcmp_uge_vv_v16f32:
366 ; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma
367 ; CHECK-NEXT: vle32.v v8, (a0)
368 ; CHECK-NEXT: vle32.v v12, (a1)
369 ; CHECK-NEXT: vmflt.vv v16, v8, v12
370 ; CHECK-NEXT: vmnot.m v8, v16
371 ; CHECK-NEXT: vsm.v v8, (a2)
373 %a = load <16 x float>, ptr %x
374 %b = load <16 x float>, ptr %y
375 %c = fcmp uge <16 x float> %a, %b
376 store <16 x i1> %c, ptr %z
380 define void @fcmp_uge_vv_v16f32_nonans(ptr %x, ptr %y, ptr %z) {
381 ; CHECK-LABEL: fcmp_uge_vv_v16f32_nonans:
383 ; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma
384 ; CHECK-NEXT: vle32.v v8, (a0)
385 ; CHECK-NEXT: vle32.v v12, (a1)
386 ; CHECK-NEXT: vmfle.vv v16, v12, v8
387 ; CHECK-NEXT: vsm.v v16, (a2)
389 %a = load <16 x float>, ptr %x
390 %b = load <16 x float>, ptr %y
391 %c = fcmp nnan uge <16 x float> %a, %b
392 store <16 x i1> %c, ptr %z
396 define void @fcmp_ult_vv_v8f64(ptr %x, ptr %y, ptr %z) {
397 ; CHECK-LABEL: fcmp_ult_vv_v8f64:
399 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
400 ; CHECK-NEXT: vle64.v v8, (a0)
401 ; CHECK-NEXT: vle64.v v12, (a1)
402 ; CHECK-NEXT: vmfle.vv v16, v12, v8
403 ; CHECK-NEXT: vmnot.m v8, v16
404 ; CHECK-NEXT: vsm.v v8, (a2)
406 %a = load <8 x double>, ptr %x
407 %b = load <8 x double>, ptr %y
408 %c = fcmp ult <8 x double> %a, %b
409 store <8 x i1> %c, ptr %z
413 define void @fcmp_ult_vv_v8f64_nonans(ptr %x, ptr %y, ptr %z) {
414 ; CHECK-LABEL: fcmp_ult_vv_v8f64_nonans:
416 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
417 ; CHECK-NEXT: vle64.v v8, (a0)
418 ; CHECK-NEXT: vle64.v v12, (a1)
419 ; CHECK-NEXT: vmflt.vv v16, v8, v12
420 ; CHECK-NEXT: vsm.v v16, (a2)
422 %a = load <8 x double>, ptr %x
423 %b = load <8 x double>, ptr %y
424 %c = fcmp nnan ult <8 x double> %a, %b
425 store <8 x i1> %c, ptr %z
429 define void @fcmp_ugt_vv_v64f16(ptr %x, ptr %y, ptr %z) {
430 ; ZVFH-LABEL: fcmp_ugt_vv_v64f16:
432 ; ZVFH-NEXT: li a3, 64
433 ; ZVFH-NEXT: vsetvli zero, a3, e16, m8, ta, ma
434 ; ZVFH-NEXT: vle16.v v8, (a0)
435 ; ZVFH-NEXT: vle16.v v16, (a1)
436 ; ZVFH-NEXT: vmfle.vv v24, v8, v16
437 ; ZVFH-NEXT: vmnot.m v8, v24
438 ; ZVFH-NEXT: vsm.v v8, (a2)
440 %a = load <64 x half>, ptr %x
441 %b = load <64 x half>, ptr %y
442 %c = fcmp ugt <64 x half> %a, %b
443 store <64 x i1> %c, ptr %z
447 define void @fcmp_ugt_vv_v64f16_nonans(ptr %x, ptr %y, ptr %z) {
448 ; ZVFH-LABEL: fcmp_ugt_vv_v64f16_nonans:
450 ; ZVFH-NEXT: li a3, 64
451 ; ZVFH-NEXT: vsetvli zero, a3, e16, m8, ta, ma
452 ; ZVFH-NEXT: vle16.v v8, (a0)
453 ; ZVFH-NEXT: vle16.v v16, (a1)
454 ; ZVFH-NEXT: vmflt.vv v24, v16, v8
455 ; ZVFH-NEXT: vsm.v v24, (a2)
457 %a = load <64 x half>, ptr %x
458 %b = load <64 x half>, ptr %y
459 %c = fcmp nnan ugt <64 x half> %a, %b
460 store <64 x i1> %c, ptr %z
464 define void @fcmp_ueq_vv_v32f32(ptr %x, ptr %y, ptr %z) {
465 ; CHECK-LABEL: fcmp_ueq_vv_v32f32:
467 ; CHECK-NEXT: li a3, 32
468 ; CHECK-NEXT: vsetvli zero, a3, e32, m8, ta, ma
469 ; CHECK-NEXT: vle32.v v8, (a0)
470 ; CHECK-NEXT: vle32.v v16, (a1)
471 ; CHECK-NEXT: vmflt.vv v24, v8, v16
472 ; CHECK-NEXT: vmflt.vv v25, v16, v8
473 ; CHECK-NEXT: vmnor.mm v8, v25, v24
474 ; CHECK-NEXT: vsm.v v8, (a2)
476 %a = load <32 x float>, ptr %x
477 %b = load <32 x float>, ptr %y
478 %c = fcmp ueq <32 x float> %a, %b
479 store <32 x i1> %c, ptr %z
483 define void @fcmp_ueq_vv_v32f32_nonans(ptr %x, ptr %y, ptr %z) {
484 ; CHECK-LABEL: fcmp_ueq_vv_v32f32_nonans:
486 ; CHECK-NEXT: li a3, 32
487 ; CHECK-NEXT: vsetvli zero, a3, e32, m8, ta, ma
488 ; CHECK-NEXT: vle32.v v8, (a0)
489 ; CHECK-NEXT: vle32.v v16, (a1)
490 ; CHECK-NEXT: vmfeq.vv v24, v8, v16
491 ; CHECK-NEXT: vsm.v v24, (a2)
493 %a = load <32 x float>, ptr %x
494 %b = load <32 x float>, ptr %y
495 %c = fcmp nnan ueq <32 x float> %a, %b
496 store <32 x i1> %c, ptr %z
500 define void @fcmp_one_vv_v8f64(ptr %x, ptr %y, ptr %z) {
501 ; CHECK-LABEL: fcmp_one_vv_v8f64:
503 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
504 ; CHECK-NEXT: vle64.v v8, (a0)
505 ; CHECK-NEXT: vle64.v v16, (a1)
506 ; CHECK-NEXT: vmflt.vv v24, v8, v16
507 ; CHECK-NEXT: vmflt.vv v25, v16, v8
508 ; CHECK-NEXT: vmor.mm v8, v25, v24
509 ; CHECK-NEXT: vsm.v v8, (a2)
511 %a = load <16 x double>, ptr %x
512 %b = load <16 x double>, ptr %y
513 %c = fcmp one <16 x double> %a, %b
514 store <16 x i1> %c, ptr %z
518 define void @fcmp_one_vv_v8f64_nonans(ptr %x, ptr %y, ptr %z) {
519 ; CHECK-LABEL: fcmp_one_vv_v8f64_nonans:
521 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
522 ; CHECK-NEXT: vle64.v v8, (a0)
523 ; CHECK-NEXT: vle64.v v16, (a1)
524 ; CHECK-NEXT: vmfne.vv v24, v8, v16
525 ; CHECK-NEXT: vsm.v v24, (a2)
527 %a = load <16 x double>, ptr %x
528 %b = load <16 x double>, ptr %y
529 %c = fcmp nnan one <16 x double> %a, %b
530 store <16 x i1> %c, ptr %z
534 define void @fcmp_ord_vv_v4f16(ptr %x, ptr %y, ptr %z) {
535 ; ZVFH-LABEL: fcmp_ord_vv_v4f16:
537 ; ZVFH-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
538 ; ZVFH-NEXT: vle16.v v8, (a1)
539 ; ZVFH-NEXT: vle16.v v9, (a0)
540 ; ZVFH-NEXT: vmfeq.vv v8, v8, v8
541 ; ZVFH-NEXT: vmfeq.vv v9, v9, v9
542 ; ZVFH-NEXT: vmand.mm v0, v9, v8
543 ; ZVFH-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
544 ; ZVFH-NEXT: vmv.v.i v8, 0
545 ; ZVFH-NEXT: vmerge.vim v8, v8, 1, v0
546 ; ZVFH-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
547 ; ZVFH-NEXT: vmv.v.i v9, 0
548 ; ZVFH-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
549 ; ZVFH-NEXT: vmv.v.v v9, v8
550 ; ZVFH-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
551 ; ZVFH-NEXT: vmsne.vi v8, v9, 0
552 ; ZVFH-NEXT: vsm.v v8, (a2)
555 ; ZVFHMIN-LABEL: fcmp_ord_vv_v4f16:
557 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
558 ; ZVFHMIN-NEXT: vle16.v v8, (a1)
559 ; ZVFHMIN-NEXT: vle16.v v9, (a0)
560 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
561 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
562 ; ZVFHMIN-NEXT: vmfeq.vv v8, v10, v10
563 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
564 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
565 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
566 ; ZVFHMIN-NEXT: vmfeq.vv v9, v10, v10
567 ; ZVFHMIN-NEXT: vmand.mm v0, v9, v8
568 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
569 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
570 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, 1, v0
571 ; ZVFHMIN-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
572 ; ZVFHMIN-NEXT: vmv.v.i v9, 0
573 ; ZVFHMIN-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
574 ; ZVFHMIN-NEXT: vmv.v.v v9, v8
575 ; ZVFHMIN-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
576 ; ZVFHMIN-NEXT: vmsne.vi v8, v9, 0
577 ; ZVFHMIN-NEXT: vsm.v v8, (a2)
579 %a = load <4 x half>, ptr %x
580 %b = load <4 x half>, ptr %y
581 %c = fcmp ord <4 x half> %a, %b
582 store <4 x i1> %c, ptr %z
586 define void @fcmp_uno_vv_v4f16(ptr %x, ptr %y, ptr %z) {
587 ; ZVFH-LABEL: fcmp_uno_vv_v4f16:
589 ; ZVFH-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
590 ; ZVFH-NEXT: vle16.v v8, (a1)
591 ; ZVFH-NEXT: vle16.v v9, (a0)
592 ; ZVFH-NEXT: vmfne.vv v8, v8, v8
593 ; ZVFH-NEXT: vmfne.vv v9, v9, v9
594 ; ZVFH-NEXT: vmor.mm v0, v9, v8
595 ; ZVFH-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
596 ; ZVFH-NEXT: vmv.v.i v8, 0
597 ; ZVFH-NEXT: vmerge.vim v8, v8, 1, v0
598 ; ZVFH-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
599 ; ZVFH-NEXT: vmv.v.i v9, 0
600 ; ZVFH-NEXT: vsetivli zero, 2, e8, mf2, tu, ma
601 ; ZVFH-NEXT: vmv.v.v v9, v8
602 ; ZVFH-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
603 ; ZVFH-NEXT: vmsne.vi v8, v9, 0
604 ; ZVFH-NEXT: vsm.v v8, (a2)
607 ; ZVFHMIN-LABEL: fcmp_uno_vv_v4f16:
609 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
610 ; ZVFHMIN-NEXT: vle16.v v8, (a1)
611 ; ZVFHMIN-NEXT: vle16.v v9, (a0)
612 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
613 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
614 ; ZVFHMIN-NEXT: vmfne.vv v8, v10, v10
615 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
616 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
617 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
618 ; ZVFHMIN-NEXT: vmfne.vv v9, v10, v10
619 ; ZVFHMIN-NEXT: vmor.mm v0, v9, v8
620 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
621 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
622 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, 1, v0
623 ; ZVFHMIN-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
624 ; ZVFHMIN-NEXT: vmv.v.i v9, 0
625 ; ZVFHMIN-NEXT: vsetivli zero, 2, e8, mf2, tu, ma
626 ; ZVFHMIN-NEXT: vmv.v.v v9, v8
627 ; ZVFHMIN-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
628 ; ZVFHMIN-NEXT: vmsne.vi v8, v9, 0
629 ; ZVFHMIN-NEXT: vsm.v v8, (a2)
631 %a = load <2 x half>, ptr %x
632 %b = load <2 x half>, ptr %y
633 %c = fcmp uno <2 x half> %a, %b
634 store <2 x i1> %c, ptr %z
638 define void @fcmp_oeq_vf_v8f16(ptr %x, half %y, ptr %z) {
639 ; ZVFH-LABEL: fcmp_oeq_vf_v8f16:
641 ; ZVFH-NEXT: vsetivli zero, 8, e16, m1, ta, ma
642 ; ZVFH-NEXT: vle16.v v8, (a0)
643 ; ZVFH-NEXT: vmfeq.vf v8, v8, fa0
644 ; ZVFH-NEXT: vsm.v v8, (a1)
647 ; ZVFHMIN-LABEL: fcmp_oeq_vf_v8f16:
649 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
650 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
651 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
652 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m2, ta, ma
653 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
654 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
655 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
656 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
657 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
658 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
659 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
660 ; ZVFHMIN-NEXT: vmfeq.vv v8, v10, v12
661 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
663 %a = load <8 x half>, ptr %x
664 %b = insertelement <8 x half> poison, half %y, i32 0
665 %c = shufflevector <8 x half> %b, <8 x half> poison, <8 x i32> zeroinitializer
666 %d = fcmp oeq <8 x half> %a, %c
667 store <8 x i1> %d, ptr %z
671 define void @fcmp_oeq_vf_v8f16_nonans(ptr %x, half %y, ptr %z) {
672 ; ZVFH-LABEL: fcmp_oeq_vf_v8f16_nonans:
674 ; ZVFH-NEXT: vsetivli zero, 8, e16, m1, ta, ma
675 ; ZVFH-NEXT: vle16.v v8, (a0)
676 ; ZVFH-NEXT: vmfeq.vf v8, v8, fa0
677 ; ZVFH-NEXT: vsm.v v8, (a1)
680 ; ZVFHMIN-LABEL: fcmp_oeq_vf_v8f16_nonans:
682 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
683 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
684 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
685 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m2, ta, ma
686 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
687 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
688 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
689 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
690 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
691 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
692 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
693 ; ZVFHMIN-NEXT: vmfeq.vv v8, v10, v12
694 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
696 %a = load <8 x half>, ptr %x
697 %b = insertelement <8 x half> poison, half %y, i32 0
698 %c = shufflevector <8 x half> %b, <8 x half> poison, <8 x i32> zeroinitializer
699 %d = fcmp nnan oeq <8 x half> %a, %c
700 store <8 x i1> %d, ptr %z
704 define void @fcmp_une_vf_v4f32(ptr %x, float %y, ptr %z) {
705 ; CHECK-LABEL: fcmp_une_vf_v4f32:
707 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
708 ; CHECK-NEXT: vle32.v v8, (a0)
709 ; CHECK-NEXT: vmfne.vf v0, v8, fa0
710 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
711 ; CHECK-NEXT: vmv.v.i v8, 0
712 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
713 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
714 ; CHECK-NEXT: vmv.v.i v9, 0
715 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
716 ; CHECK-NEXT: vmv.v.v v9, v8
717 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
718 ; CHECK-NEXT: vmsne.vi v8, v9, 0
719 ; CHECK-NEXT: vsm.v v8, (a1)
721 %a = load <4 x float>, ptr %x
722 %b = insertelement <4 x float> poison, float %y, i32 0
723 %c = shufflevector <4 x float> %b, <4 x float> poison, <4 x i32> zeroinitializer
724 %d = fcmp une <4 x float> %a, %c
725 store <4 x i1> %d, ptr %z
729 define void @fcmp_une_vf_v4f32_nonans(ptr %x, float %y, ptr %z) {
730 ; CHECK-LABEL: fcmp_une_vf_v4f32_nonans:
732 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
733 ; CHECK-NEXT: vle32.v v8, (a0)
734 ; CHECK-NEXT: vmfne.vf v0, v8, fa0
735 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
736 ; CHECK-NEXT: vmv.v.i v8, 0
737 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
738 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
739 ; CHECK-NEXT: vmv.v.i v9, 0
740 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
741 ; CHECK-NEXT: vmv.v.v v9, v8
742 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
743 ; CHECK-NEXT: vmsne.vi v8, v9, 0
744 ; CHECK-NEXT: vsm.v v8, (a1)
746 %a = load <4 x float>, ptr %x
747 %b = insertelement <4 x float> poison, float %y, i32 0
748 %c = shufflevector <4 x float> %b, <4 x float> poison, <4 x i32> zeroinitializer
749 %d = fcmp nnan une <4 x float> %a, %c
750 store <4 x i1> %d, ptr %z
754 define void @fcmp_ogt_vf_v2f64(ptr %x, double %y, ptr %z) {
755 ; CHECK-LABEL: fcmp_ogt_vf_v2f64:
757 ; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma
758 ; CHECK-NEXT: vle64.v v8, (a0)
759 ; CHECK-NEXT: vmfgt.vf v0, v8, fa0
760 ; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
761 ; CHECK-NEXT: vmv.v.i v8, 0
762 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
763 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
764 ; CHECK-NEXT: vmv.v.i v9, 0
765 ; CHECK-NEXT: vsetivli zero, 2, e8, mf2, tu, ma
766 ; CHECK-NEXT: vmv.v.v v9, v8
767 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
768 ; CHECK-NEXT: vmsne.vi v8, v9, 0
769 ; CHECK-NEXT: vsm.v v8, (a1)
771 %a = load <2 x double>, ptr %x
772 %b = insertelement <2 x double> poison, double %y, i32 0
773 %c = shufflevector <2 x double> %b, <2 x double> poison, <2 x i32> zeroinitializer
774 %d = fcmp ogt <2 x double> %a, %c
775 store <2 x i1> %d, ptr %z
779 define void @fcmp_ogt_vf_v2f64_nonans(ptr %x, double %y, ptr %z) {
780 ; CHECK-LABEL: fcmp_ogt_vf_v2f64_nonans:
782 ; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma
783 ; CHECK-NEXT: vle64.v v8, (a0)
784 ; CHECK-NEXT: vmfgt.vf v0, v8, fa0
785 ; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
786 ; CHECK-NEXT: vmv.v.i v8, 0
787 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
788 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
789 ; CHECK-NEXT: vmv.v.i v9, 0
790 ; CHECK-NEXT: vsetivli zero, 2, e8, mf2, tu, ma
791 ; CHECK-NEXT: vmv.v.v v9, v8
792 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
793 ; CHECK-NEXT: vmsne.vi v8, v9, 0
794 ; CHECK-NEXT: vsm.v v8, (a1)
796 %a = load <2 x double>, ptr %x
797 %b = insertelement <2 x double> poison, double %y, i32 0
798 %c = shufflevector <2 x double> %b, <2 x double> poison, <2 x i32> zeroinitializer
799 %d = fcmp nnan ogt <2 x double> %a, %c
800 store <2 x i1> %d, ptr %z
804 define void @fcmp_olt_vf_v16f16(ptr %x, half %y, ptr %z) {
805 ; ZVFH-LABEL: fcmp_olt_vf_v16f16:
807 ; ZVFH-NEXT: vsetivli zero, 16, e16, m2, ta, ma
808 ; ZVFH-NEXT: vle16.v v8, (a0)
809 ; ZVFH-NEXT: vmflt.vf v10, v8, fa0
810 ; ZVFH-NEXT: vsm.v v10, (a1)
813 ; ZVFHMIN-LABEL: fcmp_olt_vf_v16f16:
815 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
816 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
817 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
818 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
819 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
820 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
821 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
822 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
823 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
824 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
825 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
826 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v16
827 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
829 %a = load <16 x half>, ptr %x
830 %b = insertelement <16 x half> poison, half %y, i32 0
831 %c = shufflevector <16 x half> %b, <16 x half> poison, <16 x i32> zeroinitializer
832 %d = fcmp olt <16 x half> %a, %c
833 store <16 x i1> %d, ptr %z
837 define void @fcmp_olt_vf_v16f16_nonans(ptr %x, half %y, ptr %z) {
838 ; ZVFH-LABEL: fcmp_olt_vf_v16f16_nonans:
840 ; ZVFH-NEXT: vsetivli zero, 16, e16, m2, ta, ma
841 ; ZVFH-NEXT: vle16.v v8, (a0)
842 ; ZVFH-NEXT: vmflt.vf v10, v8, fa0
843 ; ZVFH-NEXT: vsm.v v10, (a1)
846 ; ZVFHMIN-LABEL: fcmp_olt_vf_v16f16_nonans:
848 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
849 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
850 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
851 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
852 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
853 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
854 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
855 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
856 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
857 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
858 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
859 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v16
860 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
862 %a = load <16 x half>, ptr %x
863 %b = insertelement <16 x half> poison, half %y, i32 0
864 %c = shufflevector <16 x half> %b, <16 x half> poison, <16 x i32> zeroinitializer
865 %d = fcmp nnan olt <16 x half> %a, %c
866 store <16 x i1> %d, ptr %z
870 define void @fcmp_oge_vf_v8f32(ptr %x, float %y, ptr %z) {
871 ; CHECK-LABEL: fcmp_oge_vf_v8f32:
873 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
874 ; CHECK-NEXT: vle32.v v8, (a0)
875 ; CHECK-NEXT: vmfge.vf v10, v8, fa0
876 ; CHECK-NEXT: vsm.v v10, (a1)
878 %a = load <8 x float>, ptr %x
879 %b = insertelement <8 x float> poison, float %y, i32 0
880 %c = shufflevector <8 x float> %b, <8 x float> poison, <8 x i32> zeroinitializer
881 %d = fcmp oge <8 x float> %a, %c
882 store <8 x i1> %d, ptr %z
886 define void @fcmp_oge_vf_v8f32_nonans(ptr %x, float %y, ptr %z) {
887 ; CHECK-LABEL: fcmp_oge_vf_v8f32_nonans:
889 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
890 ; CHECK-NEXT: vle32.v v8, (a0)
891 ; CHECK-NEXT: vmfge.vf v10, v8, fa0
892 ; CHECK-NEXT: vsm.v v10, (a1)
894 %a = load <8 x float>, ptr %x
895 %b = insertelement <8 x float> poison, float %y, i32 0
896 %c = shufflevector <8 x float> %b, <8 x float> poison, <8 x i32> zeroinitializer
897 %d = fcmp nnan oge <8 x float> %a, %c
898 store <8 x i1> %d, ptr %z
902 define void @fcmp_ole_vf_v4f64(ptr %x, double %y, ptr %z) {
903 ; CHECK-LABEL: fcmp_ole_vf_v4f64:
905 ; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma
906 ; CHECK-NEXT: vle64.v v8, (a0)
907 ; CHECK-NEXT: vmfle.vf v0, v8, fa0
908 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
909 ; CHECK-NEXT: vmv.v.i v8, 0
910 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
911 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
912 ; CHECK-NEXT: vmv.v.i v9, 0
913 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
914 ; CHECK-NEXT: vmv.v.v v9, v8
915 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
916 ; CHECK-NEXT: vmsne.vi v8, v9, 0
917 ; CHECK-NEXT: vsm.v v8, (a1)
919 %a = load <4 x double>, ptr %x
920 %b = insertelement <4 x double> poison, double %y, i32 0
921 %c = shufflevector <4 x double> %b, <4 x double> poison, <4 x i32> zeroinitializer
922 %d = fcmp ole <4 x double> %a, %c
923 store <4 x i1> %d, ptr %z
927 define void @fcmp_ole_vf_v4f64_nonans(ptr %x, double %y, ptr %z) {
928 ; CHECK-LABEL: fcmp_ole_vf_v4f64_nonans:
930 ; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma
931 ; CHECK-NEXT: vle64.v v8, (a0)
932 ; CHECK-NEXT: vmfle.vf v0, v8, fa0
933 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
934 ; CHECK-NEXT: vmv.v.i v8, 0
935 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
936 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
937 ; CHECK-NEXT: vmv.v.i v9, 0
938 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
939 ; CHECK-NEXT: vmv.v.v v9, v8
940 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
941 ; CHECK-NEXT: vmsne.vi v8, v9, 0
942 ; CHECK-NEXT: vsm.v v8, (a1)
944 %a = load <4 x double>, ptr %x
945 %b = insertelement <4 x double> poison, double %y, i32 0
946 %c = shufflevector <4 x double> %b, <4 x double> poison, <4 x i32> zeroinitializer
947 %d = fcmp nnan ole <4 x double> %a, %c
948 store <4 x i1> %d, ptr %z
952 define void @fcmp_ule_vf_v32f16(ptr %x, half %y, ptr %z) {
953 ; ZVFH-LABEL: fcmp_ule_vf_v32f16:
955 ; ZVFH-NEXT: li a2, 32
956 ; ZVFH-NEXT: vsetvli zero, a2, e16, m4, ta, ma
957 ; ZVFH-NEXT: vle16.v v8, (a0)
958 ; ZVFH-NEXT: vmfgt.vf v12, v8, fa0
959 ; ZVFH-NEXT: vmnot.m v8, v12
960 ; ZVFH-NEXT: vsm.v v8, (a1)
963 ; ZVFHMIN-LABEL: fcmp_ule_vf_v32f16:
965 ; ZVFHMIN-NEXT: li a2, 32
966 ; ZVFHMIN-NEXT: vsetvli zero, a2, e16, m4, ta, ma
967 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
968 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
969 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
970 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
971 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
972 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
973 ; ZVFHMIN-NEXT: vsetvli zero, a2, e16, m4, ta, ma
974 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
975 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
976 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
977 ; ZVFHMIN-NEXT: vmflt.vv v8, v24, v16
978 ; ZVFHMIN-NEXT: vmnot.m v8, v8
979 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
981 %a = load <32 x half>, ptr %x
982 %b = insertelement <32 x half> poison, half %y, i32 0
983 %c = shufflevector <32 x half> %b, <32 x half> poison, <32 x i32> zeroinitializer
984 %d = fcmp ule <32 x half> %a, %c
985 store <32 x i1> %d, ptr %z
989 define void @fcmp_ule_vf_v32f16_nonans(ptr %x, half %y, ptr %z) {
990 ; ZVFH-LABEL: fcmp_ule_vf_v32f16_nonans:
992 ; ZVFH-NEXT: li a2, 32
993 ; ZVFH-NEXT: vsetvli zero, a2, e16, m4, ta, ma
994 ; ZVFH-NEXT: vle16.v v8, (a0)
995 ; ZVFH-NEXT: vmfle.vf v12, v8, fa0
996 ; ZVFH-NEXT: vsm.v v12, (a1)
999 ; ZVFHMIN-LABEL: fcmp_ule_vf_v32f16_nonans:
1001 ; ZVFHMIN-NEXT: li a2, 32
1002 ; ZVFHMIN-NEXT: vsetvli zero, a2, e16, m4, ta, ma
1003 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
1004 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1005 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1006 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
1007 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1008 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1009 ; ZVFHMIN-NEXT: vsetvli zero, a2, e16, m4, ta, ma
1010 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
1011 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
1012 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1013 ; ZVFHMIN-NEXT: vmfle.vv v8, v16, v24
1014 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
1016 %a = load <32 x half>, ptr %x
1017 %b = insertelement <32 x half> poison, half %y, i32 0
1018 %c = shufflevector <32 x half> %b, <32 x half> poison, <32 x i32> zeroinitializer
1019 %d = fcmp nnan ule <32 x half> %a, %c
1020 store <32 x i1> %d, ptr %z
1024 define void @fcmp_uge_vf_v16f32(ptr %x, float %y, ptr %z) {
1025 ; CHECK-LABEL: fcmp_uge_vf_v16f32:
1027 ; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma
1028 ; CHECK-NEXT: vle32.v v8, (a0)
1029 ; CHECK-NEXT: vmflt.vf v12, v8, fa0
1030 ; CHECK-NEXT: vmnot.m v8, v12
1031 ; CHECK-NEXT: vsm.v v8, (a1)
1033 %a = load <16 x float>, ptr %x
1034 %b = insertelement <16 x float> poison, float %y, i32 0
1035 %c = shufflevector <16 x float> %b, <16 x float> poison, <16 x i32> zeroinitializer
1036 %d = fcmp uge <16 x float> %a, %c
1037 store <16 x i1> %d, ptr %z
1041 define void @fcmp_uge_vf_v16f32_nonans(ptr %x, float %y, ptr %z) {
1042 ; CHECK-LABEL: fcmp_uge_vf_v16f32_nonans:
1044 ; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma
1045 ; CHECK-NEXT: vle32.v v8, (a0)
1046 ; CHECK-NEXT: vmfge.vf v12, v8, fa0
1047 ; CHECK-NEXT: vsm.v v12, (a1)
1049 %a = load <16 x float>, ptr %x
1050 %b = insertelement <16 x float> poison, float %y, i32 0
1051 %c = shufflevector <16 x float> %b, <16 x float> poison, <16 x i32> zeroinitializer
1052 %d = fcmp nnan uge <16 x float> %a, %c
1053 store <16 x i1> %d, ptr %z
1057 define void @fcmp_ult_vf_v8f64(ptr %x, double %y, ptr %z) {
1058 ; CHECK-LABEL: fcmp_ult_vf_v8f64:
1060 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1061 ; CHECK-NEXT: vle64.v v8, (a0)
1062 ; CHECK-NEXT: vmfge.vf v12, v8, fa0
1063 ; CHECK-NEXT: vmnot.m v8, v12
1064 ; CHECK-NEXT: vsm.v v8, (a1)
1066 %a = load <8 x double>, ptr %x
1067 %b = insertelement <8 x double> poison, double %y, i32 0
1068 %c = shufflevector <8 x double> %b, <8 x double> poison, <8 x i32> zeroinitializer
1069 %d = fcmp ult <8 x double> %a, %c
1070 store <8 x i1> %d, ptr %z
1074 define void @fcmp_ult_vf_v8f64_nonans(ptr %x, double %y, ptr %z) {
1075 ; CHECK-LABEL: fcmp_ult_vf_v8f64_nonans:
1077 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1078 ; CHECK-NEXT: vle64.v v8, (a0)
1079 ; CHECK-NEXT: vmflt.vf v12, v8, fa0
1080 ; CHECK-NEXT: vsm.v v12, (a1)
1082 %a = load <8 x double>, ptr %x
1083 %b = insertelement <8 x double> poison, double %y, i32 0
1084 %c = shufflevector <8 x double> %b, <8 x double> poison, <8 x i32> zeroinitializer
1085 %d = fcmp nnan ult <8 x double> %a, %c
1086 store <8 x i1> %d, ptr %z
1090 define void @fcmp_ugt_vf_v64f16(ptr %x, half %y, ptr %z) {
1091 ; ZVFH-LABEL: fcmp_ugt_vf_v64f16:
1093 ; ZVFH-NEXT: li a2, 64
1094 ; ZVFH-NEXT: vsetvli zero, a2, e16, m8, ta, ma
1095 ; ZVFH-NEXT: vle16.v v8, (a0)
1096 ; ZVFH-NEXT: vmfle.vf v16, v8, fa0
1097 ; ZVFH-NEXT: vmnot.m v8, v16
1098 ; ZVFH-NEXT: vsm.v v8, (a1)
1100 %a = load <64 x half>, ptr %x
1101 %b = insertelement <64 x half> poison, half %y, i32 0
1102 %c = shufflevector <64 x half> %b, <64 x half> poison, <64 x i32> zeroinitializer
1103 %d = fcmp ugt <64 x half> %a, %c
1104 store <64 x i1> %d, ptr %z
1108 define void @fcmp_ugt_vf_v64f16_nonans(ptr %x, half %y, ptr %z) {
1109 ; ZVFH-LABEL: fcmp_ugt_vf_v64f16_nonans:
1111 ; ZVFH-NEXT: li a2, 64
1112 ; ZVFH-NEXT: vsetvli zero, a2, e16, m8, ta, ma
1113 ; ZVFH-NEXT: vle16.v v8, (a0)
1114 ; ZVFH-NEXT: vmfgt.vf v16, v8, fa0
1115 ; ZVFH-NEXT: vsm.v v16, (a1)
1117 %a = load <64 x half>, ptr %x
1118 %b = insertelement <64 x half> poison, half %y, i32 0
1119 %c = shufflevector <64 x half> %b, <64 x half> poison, <64 x i32> zeroinitializer
1120 %d = fcmp nnan ugt <64 x half> %a, %c
1121 store <64 x i1> %d, ptr %z
1125 define void @fcmp_ueq_vf_v32f32(ptr %x, float %y, ptr %z) {
1126 ; CHECK-LABEL: fcmp_ueq_vf_v32f32:
1128 ; CHECK-NEXT: li a2, 32
1129 ; CHECK-NEXT: vsetvli zero, a2, e32, m8, ta, ma
1130 ; CHECK-NEXT: vle32.v v8, (a0)
1131 ; CHECK-NEXT: vmflt.vf v16, v8, fa0
1132 ; CHECK-NEXT: vmfgt.vf v17, v8, fa0
1133 ; CHECK-NEXT: vmnor.mm v8, v17, v16
1134 ; CHECK-NEXT: vsm.v v8, (a1)
1136 %a = load <32 x float>, ptr %x
1137 %b = insertelement <32 x float> poison, float %y, i32 0
1138 %c = shufflevector <32 x float> %b, <32 x float> poison, <32 x i32> zeroinitializer
1139 %d = fcmp ueq <32 x float> %a, %c
1140 store <32 x i1> %d, ptr %z
1144 define void @fcmp_ueq_vf_v32f32_nonans(ptr %x, float %y, ptr %z) {
1145 ; CHECK-LABEL: fcmp_ueq_vf_v32f32_nonans:
1147 ; CHECK-NEXT: li a2, 32
1148 ; CHECK-NEXT: vsetvli zero, a2, e32, m8, ta, ma
1149 ; CHECK-NEXT: vle32.v v8, (a0)
1150 ; CHECK-NEXT: vmfeq.vf v16, v8, fa0
1151 ; CHECK-NEXT: vsm.v v16, (a1)
1153 %a = load <32 x float>, ptr %x
1154 %b = insertelement <32 x float> poison, float %y, i32 0
1155 %c = shufflevector <32 x float> %b, <32 x float> poison, <32 x i32> zeroinitializer
1156 %d = fcmp nnan ueq <32 x float> %a, %c
1157 store <32 x i1> %d, ptr %z
1161 define void @fcmp_one_vf_v8f64(ptr %x, double %y, ptr %z) {
1162 ; CHECK-LABEL: fcmp_one_vf_v8f64:
1164 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
1165 ; CHECK-NEXT: vle64.v v8, (a0)
1166 ; CHECK-NEXT: vmflt.vf v16, v8, fa0
1167 ; CHECK-NEXT: vmfgt.vf v17, v8, fa0
1168 ; CHECK-NEXT: vmor.mm v8, v17, v16
1169 ; CHECK-NEXT: vsm.v v8, (a1)
1171 %a = load <16 x double>, ptr %x
1172 %b = insertelement <16 x double> poison, double %y, i32 0
1173 %c = shufflevector <16 x double> %b, <16 x double> poison, <16 x i32> zeroinitializer
1174 %d = fcmp one <16 x double> %a, %c
1175 store <16 x i1> %d, ptr %z
1179 define void @fcmp_one_vf_v8f64_nonans(ptr %x, double %y, ptr %z) {
1180 ; CHECK-LABEL: fcmp_one_vf_v8f64_nonans:
1182 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
1183 ; CHECK-NEXT: vle64.v v8, (a0)
1184 ; CHECK-NEXT: vmfne.vf v16, v8, fa0
1185 ; CHECK-NEXT: vsm.v v16, (a1)
1187 %a = load <16 x double>, ptr %x
1188 %b = insertelement <16 x double> poison, double %y, i32 0
1189 %c = shufflevector <16 x double> %b, <16 x double> poison, <16 x i32> zeroinitializer
1190 %d = fcmp nnan one <16 x double> %a, %c
1191 store <16 x i1> %d, ptr %z
1195 define void @fcmp_ord_vf_v4f16(ptr %x, half %y, ptr %z) {
1196 ; ZVFH-LABEL: fcmp_ord_vf_v4f16:
1198 ; ZVFH-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1199 ; ZVFH-NEXT: vle16.v v8, (a0)
1200 ; ZVFH-NEXT: vfmv.v.f v9, fa0
1201 ; ZVFH-NEXT: vmfeq.vf v9, v9, fa0
1202 ; ZVFH-NEXT: vmfeq.vv v8, v8, v8
1203 ; ZVFH-NEXT: vmand.mm v0, v8, v9
1204 ; ZVFH-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
1205 ; ZVFH-NEXT: vmv.v.i v8, 0
1206 ; ZVFH-NEXT: vmerge.vim v8, v8, 1, v0
1207 ; ZVFH-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1208 ; ZVFH-NEXT: vmv.v.i v9, 0
1209 ; ZVFH-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
1210 ; ZVFH-NEXT: vmv.v.v v9, v8
1211 ; ZVFH-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1212 ; ZVFH-NEXT: vmsne.vi v8, v9, 0
1213 ; ZVFH-NEXT: vsm.v v8, (a1)
1216 ; ZVFHMIN-LABEL: fcmp_ord_vf_v4f16:
1218 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1219 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
1220 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1221 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1222 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
1223 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
1224 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
1225 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1226 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
1227 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1228 ; ZVFHMIN-NEXT: vmfeq.vv v8, v9, v9
1229 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
1230 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
1231 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1232 ; ZVFHMIN-NEXT: vmfeq.vv v9, v9, v9
1233 ; ZVFHMIN-NEXT: vmand.mm v0, v8, v9
1234 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
1235 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
1236 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, 1, v0
1237 ; ZVFHMIN-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1238 ; ZVFHMIN-NEXT: vmv.v.i v9, 0
1239 ; ZVFHMIN-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
1240 ; ZVFHMIN-NEXT: vmv.v.v v9, v8
1241 ; ZVFHMIN-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1242 ; ZVFHMIN-NEXT: vmsne.vi v8, v9, 0
1243 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
1245 %a = load <4 x half>, ptr %x
1246 %b = insertelement <4 x half> poison, half %y, i32 0
1247 %c = shufflevector <4 x half> %b, <4 x half> poison, <4 x i32> zeroinitializer
1248 %d = fcmp ord <4 x half> %a, %c
1249 store <4 x i1> %d, ptr %z
1253 define void @fcmp_uno_vf_v4f16(ptr %x, half %y, ptr %z) {
1254 ; ZVFH-LABEL: fcmp_uno_vf_v4f16:
1256 ; ZVFH-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1257 ; ZVFH-NEXT: vle16.v v8, (a0)
1258 ; ZVFH-NEXT: vfmv.v.f v9, fa0
1259 ; ZVFH-NEXT: vmfne.vf v9, v9, fa0
1260 ; ZVFH-NEXT: vmfne.vv v8, v8, v8
1261 ; ZVFH-NEXT: vmor.mm v0, v8, v9
1262 ; ZVFH-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
1263 ; ZVFH-NEXT: vmv.v.i v8, 0
1264 ; ZVFH-NEXT: vmerge.vim v8, v8, 1, v0
1265 ; ZVFH-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1266 ; ZVFH-NEXT: vmv.v.i v9, 0
1267 ; ZVFH-NEXT: vsetivli zero, 2, e8, mf2, tu, ma
1268 ; ZVFH-NEXT: vmv.v.v v9, v8
1269 ; ZVFH-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1270 ; ZVFH-NEXT: vmsne.vi v8, v9, 0
1271 ; ZVFH-NEXT: vsm.v v8, (a1)
1274 ; ZVFHMIN-LABEL: fcmp_uno_vf_v4f16:
1276 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1277 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
1278 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1279 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1280 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
1281 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
1282 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
1283 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1284 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
1285 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1286 ; ZVFHMIN-NEXT: vmfne.vv v8, v9, v9
1287 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
1288 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
1289 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1290 ; ZVFHMIN-NEXT: vmfne.vv v9, v9, v9
1291 ; ZVFHMIN-NEXT: vmor.mm v0, v8, v9
1292 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
1293 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
1294 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, 1, v0
1295 ; ZVFHMIN-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1296 ; ZVFHMIN-NEXT: vmv.v.i v9, 0
1297 ; ZVFHMIN-NEXT: vsetivli zero, 2, e8, mf2, tu, ma
1298 ; ZVFHMIN-NEXT: vmv.v.v v9, v8
1299 ; ZVFHMIN-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1300 ; ZVFHMIN-NEXT: vmsne.vi v8, v9, 0
1301 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
1303 %a = load <2 x half>, ptr %x
1304 %b = insertelement <2 x half> poison, half %y, i32 0
1305 %c = shufflevector <2 x half> %b, <2 x half> poison, <2 x i32> zeroinitializer
1306 %d = fcmp uno <2 x half> %a, %c
1307 store <2 x i1> %d, ptr %z
1311 define void @fcmp_oeq_fv_v8f16(ptr %x, half %y, ptr %z) {
1312 ; ZVFH-LABEL: fcmp_oeq_fv_v8f16:
1314 ; ZVFH-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1315 ; ZVFH-NEXT: vle16.v v8, (a0)
1316 ; ZVFH-NEXT: vmfeq.vf v8, v8, fa0
1317 ; ZVFH-NEXT: vsm.v v8, (a1)
1320 ; ZVFHMIN-LABEL: fcmp_oeq_fv_v8f16:
1322 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1323 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
1324 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1325 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1326 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
1327 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1328 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
1329 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1330 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
1331 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
1332 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
1333 ; ZVFHMIN-NEXT: vmfeq.vv v8, v12, v10
1334 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
1336 %a = load <8 x half>, ptr %x
1337 %b = insertelement <8 x half> poison, half %y, i32 0
1338 %c = shufflevector <8 x half> %b, <8 x half> poison, <8 x i32> zeroinitializer
1339 %d = fcmp oeq <8 x half> %c, %a
1340 store <8 x i1> %d, ptr %z
1344 define void @fcmp_oeq_fv_v8f16_nonans(ptr %x, half %y, ptr %z) {
1345 ; ZVFH-LABEL: fcmp_oeq_fv_v8f16_nonans:
1347 ; ZVFH-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1348 ; ZVFH-NEXT: vle16.v v8, (a0)
1349 ; ZVFH-NEXT: vmfeq.vf v8, v8, fa0
1350 ; ZVFH-NEXT: vsm.v v8, (a1)
1353 ; ZVFHMIN-LABEL: fcmp_oeq_fv_v8f16_nonans:
1355 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1356 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
1357 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1358 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1359 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
1360 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1361 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
1362 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1363 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
1364 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
1365 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
1366 ; ZVFHMIN-NEXT: vmfeq.vv v8, v12, v10
1367 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
1369 %a = load <8 x half>, ptr %x
1370 %b = insertelement <8 x half> poison, half %y, i32 0
1371 %c = shufflevector <8 x half> %b, <8 x half> poison, <8 x i32> zeroinitializer
1372 %d = fcmp nnan oeq <8 x half> %c, %a
1373 store <8 x i1> %d, ptr %z
1377 define void @fcmp_une_fv_v4f32(ptr %x, float %y, ptr %z) {
1378 ; CHECK-LABEL: fcmp_une_fv_v4f32:
1380 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1381 ; CHECK-NEXT: vle32.v v8, (a0)
1382 ; CHECK-NEXT: vmfne.vf v0, v8, fa0
1383 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
1384 ; CHECK-NEXT: vmv.v.i v8, 0
1385 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
1386 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1387 ; CHECK-NEXT: vmv.v.i v9, 0
1388 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
1389 ; CHECK-NEXT: vmv.v.v v9, v8
1390 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1391 ; CHECK-NEXT: vmsne.vi v8, v9, 0
1392 ; CHECK-NEXT: vsm.v v8, (a1)
1394 %a = load <4 x float>, ptr %x
1395 %b = insertelement <4 x float> poison, float %y, i32 0
1396 %c = shufflevector <4 x float> %b, <4 x float> poison, <4 x i32> zeroinitializer
1397 %d = fcmp une <4 x float> %c, %a
1398 store <4 x i1> %d, ptr %z
1402 define void @fcmp_une_fv_v4f32_nonans(ptr %x, float %y, ptr %z) {
1403 ; CHECK-LABEL: fcmp_une_fv_v4f32_nonans:
1405 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1406 ; CHECK-NEXT: vle32.v v8, (a0)
1407 ; CHECK-NEXT: vmfne.vf v0, v8, fa0
1408 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
1409 ; CHECK-NEXT: vmv.v.i v8, 0
1410 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
1411 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1412 ; CHECK-NEXT: vmv.v.i v9, 0
1413 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
1414 ; CHECK-NEXT: vmv.v.v v9, v8
1415 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1416 ; CHECK-NEXT: vmsne.vi v8, v9, 0
1417 ; CHECK-NEXT: vsm.v v8, (a1)
1419 %a = load <4 x float>, ptr %x
1420 %b = insertelement <4 x float> poison, float %y, i32 0
1421 %c = shufflevector <4 x float> %b, <4 x float> poison, <4 x i32> zeroinitializer
1422 %d = fcmp nnan une <4 x float> %c, %a
1423 store <4 x i1> %d, ptr %z
1427 define void @fcmp_ogt_fv_v2f64(ptr %x, double %y, ptr %z) {
1428 ; CHECK-LABEL: fcmp_ogt_fv_v2f64:
1430 ; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma
1431 ; CHECK-NEXT: vle64.v v8, (a0)
1432 ; CHECK-NEXT: vmflt.vf v0, v8, fa0
1433 ; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
1434 ; CHECK-NEXT: vmv.v.i v8, 0
1435 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
1436 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1437 ; CHECK-NEXT: vmv.v.i v9, 0
1438 ; CHECK-NEXT: vsetivli zero, 2, e8, mf2, tu, ma
1439 ; CHECK-NEXT: vmv.v.v v9, v8
1440 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1441 ; CHECK-NEXT: vmsne.vi v8, v9, 0
1442 ; CHECK-NEXT: vsm.v v8, (a1)
1444 %a = load <2 x double>, ptr %x
1445 %b = insertelement <2 x double> poison, double %y, i32 0
1446 %c = shufflevector <2 x double> %b, <2 x double> poison, <2 x i32> zeroinitializer
1447 %d = fcmp ogt <2 x double> %c, %a
1448 store <2 x i1> %d, ptr %z
1452 define void @fcmp_ogt_fv_v2f64_nonans(ptr %x, double %y, ptr %z) {
1453 ; CHECK-LABEL: fcmp_ogt_fv_v2f64_nonans:
1455 ; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma
1456 ; CHECK-NEXT: vle64.v v8, (a0)
1457 ; CHECK-NEXT: vmflt.vf v0, v8, fa0
1458 ; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
1459 ; CHECK-NEXT: vmv.v.i v8, 0
1460 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
1461 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1462 ; CHECK-NEXT: vmv.v.i v9, 0
1463 ; CHECK-NEXT: vsetivli zero, 2, e8, mf2, tu, ma
1464 ; CHECK-NEXT: vmv.v.v v9, v8
1465 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1466 ; CHECK-NEXT: vmsne.vi v8, v9, 0
1467 ; CHECK-NEXT: vsm.v v8, (a1)
1469 %a = load <2 x double>, ptr %x
1470 %b = insertelement <2 x double> poison, double %y, i32 0
1471 %c = shufflevector <2 x double> %b, <2 x double> poison, <2 x i32> zeroinitializer
1472 %d = fcmp nnan ogt <2 x double> %c, %a
1473 store <2 x i1> %d, ptr %z
1477 define void @fcmp_olt_fv_v16f16(ptr %x, half %y, ptr %z) {
1478 ; ZVFH-LABEL: fcmp_olt_fv_v16f16:
1480 ; ZVFH-NEXT: vsetivli zero, 16, e16, m2, ta, ma
1481 ; ZVFH-NEXT: vle16.v v8, (a0)
1482 ; ZVFH-NEXT: vmfgt.vf v10, v8, fa0
1483 ; ZVFH-NEXT: vsm.v v10, (a1)
1486 ; ZVFHMIN-LABEL: fcmp_olt_fv_v16f16:
1488 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
1489 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
1490 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1491 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1492 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
1493 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
1494 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
1495 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
1496 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
1497 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
1498 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
1499 ; ZVFHMIN-NEXT: vmflt.vv v8, v16, v12
1500 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
1502 %a = load <16 x half>, ptr %x
1503 %b = insertelement <16 x half> poison, half %y, i32 0
1504 %c = shufflevector <16 x half> %b, <16 x half> poison, <16 x i32> zeroinitializer
1505 %d = fcmp olt <16 x half> %c, %a
1506 store <16 x i1> %d, ptr %z
1510 define void @fcmp_olt_fv_v16f16_nonans(ptr %x, half %y, ptr %z) {
1511 ; ZVFH-LABEL: fcmp_olt_fv_v16f16_nonans:
1513 ; ZVFH-NEXT: vsetivli zero, 16, e16, m2, ta, ma
1514 ; ZVFH-NEXT: vle16.v v8, (a0)
1515 ; ZVFH-NEXT: vmfgt.vf v10, v8, fa0
1516 ; ZVFH-NEXT: vsm.v v10, (a1)
1519 ; ZVFHMIN-LABEL: fcmp_olt_fv_v16f16_nonans:
1521 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
1522 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
1523 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1524 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1525 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
1526 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
1527 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
1528 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
1529 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
1530 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
1531 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
1532 ; ZVFHMIN-NEXT: vmflt.vv v8, v16, v12
1533 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
1535 %a = load <16 x half>, ptr %x
1536 %b = insertelement <16 x half> poison, half %y, i32 0
1537 %c = shufflevector <16 x half> %b, <16 x half> poison, <16 x i32> zeroinitializer
1538 %d = fcmp nnan olt <16 x half> %c, %a
1539 store <16 x i1> %d, ptr %z
1543 define void @fcmp_oge_fv_v8f32(ptr %x, float %y, ptr %z) {
1544 ; CHECK-LABEL: fcmp_oge_fv_v8f32:
1546 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1547 ; CHECK-NEXT: vle32.v v8, (a0)
1548 ; CHECK-NEXT: vmfle.vf v10, v8, fa0
1549 ; CHECK-NEXT: vsm.v v10, (a1)
1551 %a = load <8 x float>, ptr %x
1552 %b = insertelement <8 x float> poison, float %y, i32 0
1553 %c = shufflevector <8 x float> %b, <8 x float> poison, <8 x i32> zeroinitializer
1554 %d = fcmp oge <8 x float> %c, %a
1555 store <8 x i1> %d, ptr %z
1559 define void @fcmp_oge_fv_v8f32_nonans(ptr %x, float %y, ptr %z) {
1560 ; CHECK-LABEL: fcmp_oge_fv_v8f32_nonans:
1562 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1563 ; CHECK-NEXT: vle32.v v8, (a0)
1564 ; CHECK-NEXT: vmfle.vf v10, v8, fa0
1565 ; CHECK-NEXT: vsm.v v10, (a1)
1567 %a = load <8 x float>, ptr %x
1568 %b = insertelement <8 x float> poison, float %y, i32 0
1569 %c = shufflevector <8 x float> %b, <8 x float> poison, <8 x i32> zeroinitializer
1570 %d = fcmp nnan oge <8 x float> %c, %a
1571 store <8 x i1> %d, ptr %z
1575 define void @fcmp_ole_fv_v4f64(ptr %x, double %y, ptr %z) {
1576 ; CHECK-LABEL: fcmp_ole_fv_v4f64:
1578 ; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma
1579 ; CHECK-NEXT: vle64.v v8, (a0)
1580 ; CHECK-NEXT: vmfge.vf v0, v8, fa0
1581 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
1582 ; CHECK-NEXT: vmv.v.i v8, 0
1583 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
1584 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1585 ; CHECK-NEXT: vmv.v.i v9, 0
1586 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
1587 ; CHECK-NEXT: vmv.v.v v9, v8
1588 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1589 ; CHECK-NEXT: vmsne.vi v8, v9, 0
1590 ; CHECK-NEXT: vsm.v v8, (a1)
1592 %a = load <4 x double>, ptr %x
1593 %b = insertelement <4 x double> poison, double %y, i32 0
1594 %c = shufflevector <4 x double> %b, <4 x double> poison, <4 x i32> zeroinitializer
1595 %d = fcmp ole <4 x double> %c, %a
1596 store <4 x i1> %d, ptr %z
1600 define void @fcmp_ole_fv_v4f64_nonans(ptr %x, double %y, ptr %z) {
1601 ; CHECK-LABEL: fcmp_ole_fv_v4f64_nonans:
1603 ; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma
1604 ; CHECK-NEXT: vle64.v v8, (a0)
1605 ; CHECK-NEXT: vmfge.vf v0, v8, fa0
1606 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
1607 ; CHECK-NEXT: vmv.v.i v8, 0
1608 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
1609 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1610 ; CHECK-NEXT: vmv.v.i v9, 0
1611 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
1612 ; CHECK-NEXT: vmv.v.v v9, v8
1613 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1614 ; CHECK-NEXT: vmsne.vi v8, v9, 0
1615 ; CHECK-NEXT: vsm.v v8, (a1)
1617 %a = load <4 x double>, ptr %x
1618 %b = insertelement <4 x double> poison, double %y, i32 0
1619 %c = shufflevector <4 x double> %b, <4 x double> poison, <4 x i32> zeroinitializer
1620 %d = fcmp nnan ole <4 x double> %c, %a
1621 store <4 x i1> %d, ptr %z
1625 define void @fcmp_ule_fv_v32f16(ptr %x, half %y, ptr %z) {
1626 ; ZVFH-LABEL: fcmp_ule_fv_v32f16:
1628 ; ZVFH-NEXT: li a2, 32
1629 ; ZVFH-NEXT: vsetvli zero, a2, e16, m4, ta, ma
1630 ; ZVFH-NEXT: vle16.v v8, (a0)
1631 ; ZVFH-NEXT: vmflt.vf v12, v8, fa0
1632 ; ZVFH-NEXT: vmnot.m v8, v12
1633 ; ZVFH-NEXT: vsm.v v8, (a1)
1636 ; ZVFHMIN-LABEL: fcmp_ule_fv_v32f16:
1638 ; ZVFHMIN-NEXT: li a2, 32
1639 ; ZVFHMIN-NEXT: vsetvli zero, a2, e16, m4, ta, ma
1640 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
1641 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1642 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1643 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
1644 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1645 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1646 ; ZVFHMIN-NEXT: vsetvli zero, a2, e16, m4, ta, ma
1647 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
1648 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
1649 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1650 ; ZVFHMIN-NEXT: vmflt.vv v8, v16, v24
1651 ; ZVFHMIN-NEXT: vmnot.m v8, v8
1652 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
1654 %a = load <32 x half>, ptr %x
1655 %b = insertelement <32 x half> poison, half %y, i32 0
1656 %c = shufflevector <32 x half> %b, <32 x half> poison, <32 x i32> zeroinitializer
1657 %d = fcmp ule <32 x half> %c, %a
1658 store <32 x i1> %d, ptr %z
1662 define void @fcmp_ule_fv_v32f16_nonans(ptr %x, half %y, ptr %z) {
1663 ; ZVFH-LABEL: fcmp_ule_fv_v32f16_nonans:
1665 ; ZVFH-NEXT: li a2, 32
1666 ; ZVFH-NEXT: vsetvli zero, a2, e16, m4, ta, ma
1667 ; ZVFH-NEXT: vle16.v v8, (a0)
1668 ; ZVFH-NEXT: vmfge.vf v12, v8, fa0
1669 ; ZVFH-NEXT: vsm.v v12, (a1)
1672 ; ZVFHMIN-LABEL: fcmp_ule_fv_v32f16_nonans:
1674 ; ZVFHMIN-NEXT: li a2, 32
1675 ; ZVFHMIN-NEXT: vsetvli zero, a2, e16, m4, ta, ma
1676 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
1677 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1678 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1679 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
1680 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1681 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1682 ; ZVFHMIN-NEXT: vsetvli zero, a2, e16, m4, ta, ma
1683 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
1684 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
1685 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1686 ; ZVFHMIN-NEXT: vmfle.vv v8, v24, v16
1687 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
1689 %a = load <32 x half>, ptr %x
1690 %b = insertelement <32 x half> poison, half %y, i32 0
1691 %c = shufflevector <32 x half> %b, <32 x half> poison, <32 x i32> zeroinitializer
1692 %d = fcmp nnan ule <32 x half> %c, %a
1693 store <32 x i1> %d, ptr %z
1697 define void @fcmp_uge_fv_v16f32(ptr %x, float %y, ptr %z) {
1698 ; CHECK-LABEL: fcmp_uge_fv_v16f32:
1700 ; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma
1701 ; CHECK-NEXT: vle32.v v8, (a0)
1702 ; CHECK-NEXT: vmfgt.vf v12, v8, fa0
1703 ; CHECK-NEXT: vmnot.m v8, v12
1704 ; CHECK-NEXT: vsm.v v8, (a1)
1706 %a = load <16 x float>, ptr %x
1707 %b = insertelement <16 x float> poison, float %y, i32 0
1708 %c = shufflevector <16 x float> %b, <16 x float> poison, <16 x i32> zeroinitializer
1709 %d = fcmp uge <16 x float> %c, %a
1710 store <16 x i1> %d, ptr %z
1714 define void @fcmp_uge_fv_v16f32_nonans(ptr %x, float %y, ptr %z) {
1715 ; CHECK-LABEL: fcmp_uge_fv_v16f32_nonans:
1717 ; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma
1718 ; CHECK-NEXT: vle32.v v8, (a0)
1719 ; CHECK-NEXT: vmfle.vf v12, v8, fa0
1720 ; CHECK-NEXT: vsm.v v12, (a1)
1722 %a = load <16 x float>, ptr %x
1723 %b = insertelement <16 x float> poison, float %y, i32 0
1724 %c = shufflevector <16 x float> %b, <16 x float> poison, <16 x i32> zeroinitializer
1725 %d = fcmp nnan uge <16 x float> %c, %a
1726 store <16 x i1> %d, ptr %z
1730 define void @fcmp_ult_fv_v8f64(ptr %x, double %y, ptr %z) {
1731 ; CHECK-LABEL: fcmp_ult_fv_v8f64:
1733 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1734 ; CHECK-NEXT: vle64.v v8, (a0)
1735 ; CHECK-NEXT: vmfle.vf v12, v8, fa0
1736 ; CHECK-NEXT: vmnot.m v8, v12
1737 ; CHECK-NEXT: vsm.v v8, (a1)
1739 %a = load <8 x double>, ptr %x
1740 %b = insertelement <8 x double> poison, double %y, i32 0
1741 %c = shufflevector <8 x double> %b, <8 x double> poison, <8 x i32> zeroinitializer
1742 %d = fcmp ult <8 x double> %c, %a
1743 store <8 x i1> %d, ptr %z
1747 define void @fcmp_ult_fv_v8f64_nonans(ptr %x, double %y, ptr %z) {
1748 ; CHECK-LABEL: fcmp_ult_fv_v8f64_nonans:
1750 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1751 ; CHECK-NEXT: vle64.v v8, (a0)
1752 ; CHECK-NEXT: vmfgt.vf v12, v8, fa0
1753 ; CHECK-NEXT: vsm.v v12, (a1)
1755 %a = load <8 x double>, ptr %x
1756 %b = insertelement <8 x double> poison, double %y, i32 0
1757 %c = shufflevector <8 x double> %b, <8 x double> poison, <8 x i32> zeroinitializer
1758 %d = fcmp nnan ult <8 x double> %c, %a
1759 store <8 x i1> %d, ptr %z
1763 define void @fcmp_ugt_fv_v64f16(ptr %x, half %y, ptr %z) {
1764 ; ZVFH-LABEL: fcmp_ugt_fv_v64f16:
1766 ; ZVFH-NEXT: li a2, 64
1767 ; ZVFH-NEXT: vsetvli zero, a2, e16, m8, ta, ma
1768 ; ZVFH-NEXT: vle16.v v8, (a0)
1769 ; ZVFH-NEXT: vmfge.vf v16, v8, fa0
1770 ; ZVFH-NEXT: vmnot.m v8, v16
1771 ; ZVFH-NEXT: vsm.v v8, (a1)
1773 %a = load <64 x half>, ptr %x
1774 %b = insertelement <64 x half> poison, half %y, i32 0
1775 %c = shufflevector <64 x half> %b, <64 x half> poison, <64 x i32> zeroinitializer
1776 %d = fcmp ugt <64 x half> %c, %a
1777 store <64 x i1> %d, ptr %z
1781 define void @fcmp_ugt_fv_v64f16_nonans(ptr %x, half %y, ptr %z) {
1782 ; ZVFH-LABEL: fcmp_ugt_fv_v64f16_nonans:
1784 ; ZVFH-NEXT: li a2, 64
1785 ; ZVFH-NEXT: vsetvli zero, a2, e16, m8, ta, ma
1786 ; ZVFH-NEXT: vle16.v v8, (a0)
1787 ; ZVFH-NEXT: vmflt.vf v16, v8, fa0
1788 ; ZVFH-NEXT: vsm.v v16, (a1)
1790 %a = load <64 x half>, ptr %x
1791 %b = insertelement <64 x half> poison, half %y, i32 0
1792 %c = shufflevector <64 x half> %b, <64 x half> poison, <64 x i32> zeroinitializer
1793 %d = fcmp nnan ugt <64 x half> %c, %a
1794 store <64 x i1> %d, ptr %z
1798 define void @fcmp_ueq_fv_v32f32(ptr %x, float %y, ptr %z) {
1799 ; CHECK-LABEL: fcmp_ueq_fv_v32f32:
1801 ; CHECK-NEXT: li a2, 32
1802 ; CHECK-NEXT: vsetvli zero, a2, e32, m8, ta, ma
1803 ; CHECK-NEXT: vle32.v v8, (a0)
1804 ; CHECK-NEXT: vmfgt.vf v16, v8, fa0
1805 ; CHECK-NEXT: vmflt.vf v17, v8, fa0
1806 ; CHECK-NEXT: vmnor.mm v8, v17, v16
1807 ; CHECK-NEXT: vsm.v v8, (a1)
1809 %a = load <32 x float>, ptr %x
1810 %b = insertelement <32 x float> poison, float %y, i32 0
1811 %c = shufflevector <32 x float> %b, <32 x float> poison, <32 x i32> zeroinitializer
1812 %d = fcmp ueq <32 x float> %c, %a
1813 store <32 x i1> %d, ptr %z
1817 define void @fcmp_ueq_fv_v32f32_nonans(ptr %x, float %y, ptr %z) {
1818 ; CHECK-LABEL: fcmp_ueq_fv_v32f32_nonans:
1820 ; CHECK-NEXT: li a2, 32
1821 ; CHECK-NEXT: vsetvli zero, a2, e32, m8, ta, ma
1822 ; CHECK-NEXT: vle32.v v8, (a0)
1823 ; CHECK-NEXT: vmfeq.vf v16, v8, fa0
1824 ; CHECK-NEXT: vsm.v v16, (a1)
1826 %a = load <32 x float>, ptr %x
1827 %b = insertelement <32 x float> poison, float %y, i32 0
1828 %c = shufflevector <32 x float> %b, <32 x float> poison, <32 x i32> zeroinitializer
1829 %d = fcmp nnan ueq <32 x float> %c, %a
1830 store <32 x i1> %d, ptr %z
1834 define void @fcmp_one_fv_v8f64(ptr %x, double %y, ptr %z) {
1835 ; CHECK-LABEL: fcmp_one_fv_v8f64:
1837 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
1838 ; CHECK-NEXT: vle64.v v8, (a0)
1839 ; CHECK-NEXT: vmfgt.vf v16, v8, fa0
1840 ; CHECK-NEXT: vmflt.vf v17, v8, fa0
1841 ; CHECK-NEXT: vmor.mm v8, v17, v16
1842 ; CHECK-NEXT: vsm.v v8, (a1)
1844 %a = load <16 x double>, ptr %x
1845 %b = insertelement <16 x double> poison, double %y, i32 0
1846 %c = shufflevector <16 x double> %b, <16 x double> poison, <16 x i32> zeroinitializer
1847 %d = fcmp one <16 x double> %c, %a
1848 store <16 x i1> %d, ptr %z
1852 define void @fcmp_one_fv_v8f64_nonans(ptr %x, double %y, ptr %z) {
1853 ; CHECK-LABEL: fcmp_one_fv_v8f64_nonans:
1855 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
1856 ; CHECK-NEXT: vle64.v v8, (a0)
1857 ; CHECK-NEXT: vmfne.vf v16, v8, fa0
1858 ; CHECK-NEXT: vsm.v v16, (a1)
1860 %a = load <16 x double>, ptr %x
1861 %b = insertelement <16 x double> poison, double %y, i32 0
1862 %c = shufflevector <16 x double> %b, <16 x double> poison, <16 x i32> zeroinitializer
1863 %d = fcmp nnan one <16 x double> %c, %a
1864 store <16 x i1> %d, ptr %z
1868 define void @fcmp_ord_fv_v4f16(ptr %x, half %y, ptr %z) {
1869 ; ZVFH-LABEL: fcmp_ord_fv_v4f16:
1871 ; ZVFH-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1872 ; ZVFH-NEXT: vle16.v v8, (a0)
1873 ; ZVFH-NEXT: vfmv.v.f v9, fa0
1874 ; ZVFH-NEXT: vmfeq.vf v9, v9, fa0
1875 ; ZVFH-NEXT: vmfeq.vv v8, v8, v8
1876 ; ZVFH-NEXT: vmand.mm v0, v9, v8
1877 ; ZVFH-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
1878 ; ZVFH-NEXT: vmv.v.i v8, 0
1879 ; ZVFH-NEXT: vmerge.vim v8, v8, 1, v0
1880 ; ZVFH-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1881 ; ZVFH-NEXT: vmv.v.i v9, 0
1882 ; ZVFH-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
1883 ; ZVFH-NEXT: vmv.v.v v9, v8
1884 ; ZVFH-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1885 ; ZVFH-NEXT: vmsne.vi v8, v9, 0
1886 ; ZVFH-NEXT: vsm.v v8, (a1)
1889 ; ZVFHMIN-LABEL: fcmp_ord_fv_v4f16:
1891 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1892 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
1893 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1894 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1895 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
1896 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
1897 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
1898 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1899 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
1900 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1901 ; ZVFHMIN-NEXT: vmfeq.vv v8, v9, v9
1902 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
1903 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
1904 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1905 ; ZVFHMIN-NEXT: vmfeq.vv v9, v9, v9
1906 ; ZVFHMIN-NEXT: vmand.mm v0, v9, v8
1907 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
1908 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
1909 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, 1, v0
1910 ; ZVFHMIN-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1911 ; ZVFHMIN-NEXT: vmv.v.i v9, 0
1912 ; ZVFHMIN-NEXT: vsetivli zero, 4, e8, mf2, tu, ma
1913 ; ZVFHMIN-NEXT: vmv.v.v v9, v8
1914 ; ZVFHMIN-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1915 ; ZVFHMIN-NEXT: vmsne.vi v8, v9, 0
1916 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
1918 %a = load <4 x half>, ptr %x
1919 %b = insertelement <4 x half> poison, half %y, i32 0
1920 %c = shufflevector <4 x half> %b, <4 x half> poison, <4 x i32> zeroinitializer
1921 %d = fcmp ord <4 x half> %c, %a
1922 store <4 x i1> %d, ptr %z
1926 define void @fcmp_uno_fv_v4f16(ptr %x, half %y, ptr %z) {
1927 ; ZVFH-LABEL: fcmp_uno_fv_v4f16:
1929 ; ZVFH-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1930 ; ZVFH-NEXT: vle16.v v8, (a0)
1931 ; ZVFH-NEXT: vfmv.v.f v9, fa0
1932 ; ZVFH-NEXT: vmfne.vf v9, v9, fa0
1933 ; ZVFH-NEXT: vmfne.vv v8, v8, v8
1934 ; ZVFH-NEXT: vmor.mm v0, v9, v8
1935 ; ZVFH-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
1936 ; ZVFH-NEXT: vmv.v.i v8, 0
1937 ; ZVFH-NEXT: vmerge.vim v8, v8, 1, v0
1938 ; ZVFH-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1939 ; ZVFH-NEXT: vmv.v.i v9, 0
1940 ; ZVFH-NEXT: vsetivli zero, 2, e8, mf2, tu, ma
1941 ; ZVFH-NEXT: vmv.v.v v9, v8
1942 ; ZVFH-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1943 ; ZVFH-NEXT: vmsne.vi v8, v9, 0
1944 ; ZVFH-NEXT: vsm.v v8, (a1)
1947 ; ZVFHMIN-LABEL: fcmp_uno_fv_v4f16:
1949 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1950 ; ZVFHMIN-NEXT: vle16.v v8, (a0)
1951 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1952 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1953 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
1954 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
1955 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
1956 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1957 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
1958 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1959 ; ZVFHMIN-NEXT: vmfne.vv v8, v9, v9
1960 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
1961 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
1962 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1963 ; ZVFHMIN-NEXT: vmfne.vv v9, v9, v9
1964 ; ZVFHMIN-NEXT: vmor.mm v0, v9, v8
1965 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
1966 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
1967 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, 1, v0
1968 ; ZVFHMIN-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1969 ; ZVFHMIN-NEXT: vmv.v.i v9, 0
1970 ; ZVFHMIN-NEXT: vsetivli zero, 2, e8, mf2, tu, ma
1971 ; ZVFHMIN-NEXT: vmv.v.v v9, v8
1972 ; ZVFHMIN-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1973 ; ZVFHMIN-NEXT: vmsne.vi v8, v9, 0
1974 ; ZVFHMIN-NEXT: vsm.v v8, (a1)
1976 %a = load <2 x half>, ptr %x
1977 %b = insertelement <2 x half> poison, half %y, i32 0
1978 %c = shufflevector <2 x half> %b, <2 x half> poison, <2 x i32> zeroinitializer
1979 %d = fcmp uno <2 x half> %c, %a
1980 store <2 x i1> %d, ptr %z