1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v,+m,+zfh,+zvfh -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
4 ; RUN: llc -mtriple=riscv64 -mattr=+v,+m,+zfh,+zvfh -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
6 ; RUN: llc -mtriple=riscv32 -mattr=+v,+m,+zfh,+zvfhmin -target-abi=ilp32d \
7 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
8 ; RUN: llc -mtriple=riscv64 -mattr=+v,+m,+zfh,+zvfhmin -target-abi=lp64d \
9 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
11 declare <7 x i1> @llvm.vp.fcmp.v7f16(<7 x half>, <7 x half>, metadata, <7 x i1>, i32)
13 define <7 x i1> @fcmp_oeq_vv_v7f16(<7 x half> %va, <7 x half> %vb, <7 x i1> %m, i32 zeroext %evl) {
14 ; ZVFH-LABEL: fcmp_oeq_vv_v7f16:
16 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
17 ; ZVFH-NEXT: vmfeq.vv v0, v8, v9, v0.t
20 ; ZVFHMIN-LABEL: fcmp_oeq_vv_v7f16:
22 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
23 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
24 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
25 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
26 ; ZVFHMIN-NEXT: vmfeq.vv v8, v12, v10, v0.t
27 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
29 %v = call <7 x i1> @llvm.vp.fcmp.v7f16(<7 x half> %va, <7 x half> %vb, metadata !"oeq", <7 x i1> %m, i32 %evl)
33 declare <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half>, <8 x half>, metadata, <8 x i1>, i32)
35 define <8 x i1> @fcmp_oeq_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
36 ; ZVFH-LABEL: fcmp_oeq_vv_v8f16:
38 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
39 ; ZVFH-NEXT: vmfeq.vv v0, v8, v9, v0.t
42 ; ZVFHMIN-LABEL: fcmp_oeq_vv_v8f16:
44 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
45 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
46 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
47 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
48 ; ZVFHMIN-NEXT: vmfeq.vv v8, v12, v10, v0.t
49 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
51 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"oeq", <8 x i1> %m, i32 %evl)
55 define <8 x i1> @fcmp_oeq_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
56 ; ZVFH-LABEL: fcmp_oeq_vf_v8f16:
58 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
59 ; ZVFH-NEXT: vmfeq.vf v0, v8, fa0, v0.t
62 ; ZVFHMIN-LABEL: fcmp_oeq_vf_v8f16:
64 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
65 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
66 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
67 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
68 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
69 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
70 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
71 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
72 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
73 ; ZVFHMIN-NEXT: vmfeq.vv v8, v10, v12, v0.t
74 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
76 %elt.head = insertelement <8 x half> poison, half %b, i32 0
77 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
78 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"oeq", <8 x i1> %m, i32 %evl)
82 define <8 x i1> @fcmp_oeq_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
83 ; ZVFH-LABEL: fcmp_oeq_vf_swap_v8f16:
85 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
86 ; ZVFH-NEXT: vmfeq.vf v0, v8, fa0, v0.t
89 ; ZVFHMIN-LABEL: fcmp_oeq_vf_swap_v8f16:
91 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
92 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
93 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
94 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
95 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
96 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
97 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
98 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
99 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
100 ; ZVFHMIN-NEXT: vmfeq.vv v8, v12, v10, v0.t
101 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
103 %elt.head = insertelement <8 x half> poison, half %b, i32 0
104 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
105 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"oeq", <8 x i1> %m, i32 %evl)
109 define <8 x i1> @fcmp_ogt_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
110 ; ZVFH-LABEL: fcmp_ogt_vv_v8f16:
112 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
113 ; ZVFH-NEXT: vmflt.vv v0, v9, v8, v0.t
116 ; ZVFHMIN-LABEL: fcmp_ogt_vv_v8f16:
118 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
119 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
120 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
121 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
122 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v10, v0.t
123 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
125 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ogt", <8 x i1> %m, i32 %evl)
129 define <8 x i1> @fcmp_ogt_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
130 ; ZVFH-LABEL: fcmp_ogt_vf_v8f16:
132 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
133 ; ZVFH-NEXT: vmfgt.vf v0, v8, fa0, v0.t
136 ; ZVFHMIN-LABEL: fcmp_ogt_vf_v8f16:
138 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
139 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
140 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
141 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
142 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
143 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
144 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
145 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
146 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
147 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v10, v0.t
148 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
150 %elt.head = insertelement <8 x half> poison, half %b, i32 0
151 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
152 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ogt", <8 x i1> %m, i32 %evl)
156 define <8 x i1> @fcmp_ogt_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
157 ; ZVFH-LABEL: fcmp_ogt_vf_swap_v8f16:
159 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
160 ; ZVFH-NEXT: vmflt.vf v0, v8, fa0, v0.t
163 ; ZVFHMIN-LABEL: fcmp_ogt_vf_swap_v8f16:
165 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
166 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
167 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
168 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
169 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
170 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
171 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
172 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
173 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
174 ; ZVFHMIN-NEXT: vmflt.vv v8, v10, v12, v0.t
175 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
177 %elt.head = insertelement <8 x half> poison, half %b, i32 0
178 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
179 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"ogt", <8 x i1> %m, i32 %evl)
183 define <8 x i1> @fcmp_oge_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
184 ; ZVFH-LABEL: fcmp_oge_vv_v8f16:
186 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
187 ; ZVFH-NEXT: vmfle.vv v0, v9, v8, v0.t
190 ; ZVFHMIN-LABEL: fcmp_oge_vv_v8f16:
192 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
193 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
194 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
195 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
196 ; ZVFHMIN-NEXT: vmfle.vv v8, v12, v10, v0.t
197 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
199 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"oge", <8 x i1> %m, i32 %evl)
203 define <8 x i1> @fcmp_oge_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
204 ; ZVFH-LABEL: fcmp_oge_vf_v8f16:
206 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
207 ; ZVFH-NEXT: vmfge.vf v0, v8, fa0, v0.t
210 ; ZVFHMIN-LABEL: fcmp_oge_vf_v8f16:
212 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
213 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
214 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
215 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
216 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
217 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
218 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
219 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
220 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
221 ; ZVFHMIN-NEXT: vmfle.vv v8, v12, v10, v0.t
222 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
224 %elt.head = insertelement <8 x half> poison, half %b, i32 0
225 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
226 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"oge", <8 x i1> %m, i32 %evl)
230 define <8 x i1> @fcmp_oge_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
231 ; ZVFH-LABEL: fcmp_oge_vf_swap_v8f16:
233 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
234 ; ZVFH-NEXT: vmfle.vf v0, v8, fa0, v0.t
237 ; ZVFHMIN-LABEL: fcmp_oge_vf_swap_v8f16:
239 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
240 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
241 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
242 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
243 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
244 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
245 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
246 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
247 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
248 ; ZVFHMIN-NEXT: vmfle.vv v8, v10, v12, v0.t
249 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
251 %elt.head = insertelement <8 x half> poison, half %b, i32 0
252 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
253 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"oge", <8 x i1> %m, i32 %evl)
257 define <8 x i1> @fcmp_olt_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
258 ; ZVFH-LABEL: fcmp_olt_vv_v8f16:
260 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
261 ; ZVFH-NEXT: vmflt.vv v0, v8, v9, v0.t
264 ; ZVFHMIN-LABEL: fcmp_olt_vv_v8f16:
266 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
267 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
268 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
269 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
270 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v10, v0.t
271 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
273 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"olt", <8 x i1> %m, i32 %evl)
277 define <8 x i1> @fcmp_olt_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
278 ; ZVFH-LABEL: fcmp_olt_vf_v8f16:
280 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
281 ; ZVFH-NEXT: vmflt.vf v0, v8, fa0, v0.t
284 ; ZVFHMIN-LABEL: fcmp_olt_vf_v8f16:
286 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
287 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
288 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
289 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
290 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
291 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
292 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
293 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
294 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
295 ; ZVFHMIN-NEXT: vmflt.vv v8, v10, v12, v0.t
296 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
298 %elt.head = insertelement <8 x half> poison, half %b, i32 0
299 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
300 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"olt", <8 x i1> %m, i32 %evl)
304 define <8 x i1> @fcmp_olt_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
305 ; ZVFH-LABEL: fcmp_olt_vf_swap_v8f16:
307 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
308 ; ZVFH-NEXT: vmfgt.vf v0, v8, fa0, v0.t
311 ; ZVFHMIN-LABEL: fcmp_olt_vf_swap_v8f16:
313 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
314 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
315 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
316 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
317 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
318 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
319 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
320 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
321 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
322 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v10, v0.t
323 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
325 %elt.head = insertelement <8 x half> poison, half %b, i32 0
326 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
327 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"olt", <8 x i1> %m, i32 %evl)
331 define <8 x i1> @fcmp_ole_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
332 ; ZVFH-LABEL: fcmp_ole_vv_v8f16:
334 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
335 ; ZVFH-NEXT: vmfle.vv v0, v8, v9, v0.t
338 ; ZVFHMIN-LABEL: fcmp_ole_vv_v8f16:
340 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
341 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
342 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
343 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
344 ; ZVFHMIN-NEXT: vmfle.vv v8, v12, v10, v0.t
345 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
347 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ole", <8 x i1> %m, i32 %evl)
351 define <8 x i1> @fcmp_ole_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
352 ; ZVFH-LABEL: fcmp_ole_vf_v8f16:
354 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
355 ; ZVFH-NEXT: vmfle.vf v0, v8, fa0, v0.t
358 ; ZVFHMIN-LABEL: fcmp_ole_vf_v8f16:
360 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
361 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
362 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
363 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
364 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
365 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
366 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
367 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
368 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
369 ; ZVFHMIN-NEXT: vmfle.vv v8, v10, v12, v0.t
370 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
372 %elt.head = insertelement <8 x half> poison, half %b, i32 0
373 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
374 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ole", <8 x i1> %m, i32 %evl)
378 define <8 x i1> @fcmp_ole_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
379 ; ZVFH-LABEL: fcmp_ole_vf_swap_v8f16:
381 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
382 ; ZVFH-NEXT: vmfge.vf v0, v8, fa0, v0.t
385 ; ZVFHMIN-LABEL: fcmp_ole_vf_swap_v8f16:
387 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
388 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
389 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
390 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
391 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
392 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
393 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
394 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
395 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
396 ; ZVFHMIN-NEXT: vmfle.vv v8, v12, v10, v0.t
397 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
399 %elt.head = insertelement <8 x half> poison, half %b, i32 0
400 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
401 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"ole", <8 x i1> %m, i32 %evl)
405 define <8 x i1> @fcmp_one_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
406 ; ZVFH-LABEL: fcmp_one_vv_v8f16:
408 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
409 ; ZVFH-NEXT: vmflt.vv v10, v8, v9, v0.t
410 ; ZVFH-NEXT: vmflt.vv v8, v9, v8, v0.t
411 ; ZVFH-NEXT: vmor.mm v0, v8, v10
414 ; ZVFHMIN-LABEL: fcmp_one_vv_v8f16:
416 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
417 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
418 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
419 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
420 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v10, v0.t
421 ; ZVFHMIN-NEXT: vmflt.vv v9, v10, v12, v0.t
422 ; ZVFHMIN-NEXT: vmor.mm v0, v9, v8
424 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"one", <8 x i1> %m, i32 %evl)
428 define <8 x i1> @fcmp_one_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
429 ; ZVFH-LABEL: fcmp_one_vf_v8f16:
431 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
432 ; ZVFH-NEXT: vmflt.vf v9, v8, fa0, v0.t
433 ; ZVFH-NEXT: vmfgt.vf v8, v8, fa0, v0.t
434 ; ZVFH-NEXT: vmor.mm v0, v8, v9
437 ; ZVFHMIN-LABEL: fcmp_one_vf_v8f16:
439 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
440 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
441 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
442 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
443 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
444 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
445 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
446 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
447 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
448 ; ZVFHMIN-NEXT: vmflt.vv v8, v10, v12, v0.t
449 ; ZVFHMIN-NEXT: vmflt.vv v9, v12, v10, v0.t
450 ; ZVFHMIN-NEXT: vmor.mm v0, v9, v8
452 %elt.head = insertelement <8 x half> poison, half %b, i32 0
453 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
454 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"one", <8 x i1> %m, i32 %evl)
458 define <8 x i1> @fcmp_one_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
459 ; ZVFH-LABEL: fcmp_one_vf_swap_v8f16:
461 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
462 ; ZVFH-NEXT: vmfgt.vf v9, v8, fa0, v0.t
463 ; ZVFH-NEXT: vmflt.vf v8, v8, fa0, v0.t
464 ; ZVFH-NEXT: vmor.mm v0, v8, v9
467 ; ZVFHMIN-LABEL: fcmp_one_vf_swap_v8f16:
469 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
470 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
471 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
472 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
473 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
474 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
475 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
476 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
477 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
478 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v10, v0.t
479 ; ZVFHMIN-NEXT: vmflt.vv v9, v10, v12, v0.t
480 ; ZVFHMIN-NEXT: vmor.mm v0, v9, v8
482 %elt.head = insertelement <8 x half> poison, half %b, i32 0
483 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
484 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"one", <8 x i1> %m, i32 %evl)
488 define <8 x i1> @fcmp_ord_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
489 ; ZVFH-LABEL: fcmp_ord_vv_v8f16:
491 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
492 ; ZVFH-NEXT: vmfeq.vv v9, v9, v9, v0.t
493 ; ZVFH-NEXT: vmfeq.vv v8, v8, v8, v0.t
494 ; ZVFH-NEXT: vmand.mm v0, v8, v9
497 ; ZVFHMIN-LABEL: fcmp_ord_vv_v8f16:
499 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
500 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
501 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
502 ; ZVFHMIN-NEXT: vmfeq.vv v9, v10, v10, v0.t
503 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
504 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
505 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
506 ; ZVFHMIN-NEXT: vmfeq.vv v8, v10, v10, v0.t
507 ; ZVFHMIN-NEXT: vmand.mm v0, v8, v9
509 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ord", <8 x i1> %m, i32 %evl)
513 define <8 x i1> @fcmp_ord_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
514 ; ZVFH-LABEL: fcmp_ord_vf_v8f16:
516 ; ZVFH-NEXT: vsetivli zero, 8, e16, m1, ta, ma
517 ; ZVFH-NEXT: vfmv.v.f v9, fa0
518 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
519 ; ZVFH-NEXT: vmfeq.vf v9, v9, fa0, v0.t
520 ; ZVFH-NEXT: vmfeq.vv v8, v8, v8, v0.t
521 ; ZVFH-NEXT: vmand.mm v0, v8, v9
524 ; ZVFHMIN-LABEL: fcmp_ord_vf_v8f16:
526 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
527 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
528 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
529 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
530 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
531 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
532 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
533 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
534 ; ZVFHMIN-NEXT: vmfeq.vv v8, v10, v10, v0.t
535 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
536 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
537 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
538 ; ZVFHMIN-NEXT: vmfeq.vv v9, v10, v10, v0.t
539 ; ZVFHMIN-NEXT: vmand.mm v0, v8, v9
541 %elt.head = insertelement <8 x half> poison, half %b, i32 0
542 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
543 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ord", <8 x i1> %m, i32 %evl)
547 define <8 x i1> @fcmp_ord_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
548 ; ZVFH-LABEL: fcmp_ord_vf_swap_v8f16:
550 ; ZVFH-NEXT: vsetivli zero, 8, e16, m1, ta, ma
551 ; ZVFH-NEXT: vfmv.v.f v9, fa0
552 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
553 ; ZVFH-NEXT: vmfeq.vf v9, v9, fa0, v0.t
554 ; ZVFH-NEXT: vmfeq.vv v8, v8, v8, v0.t
555 ; ZVFH-NEXT: vmand.mm v0, v9, v8
558 ; ZVFHMIN-LABEL: fcmp_ord_vf_swap_v8f16:
560 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
561 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
562 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
563 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
564 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
565 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
566 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
567 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
568 ; ZVFHMIN-NEXT: vmfeq.vv v8, v10, v10, v0.t
569 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
570 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
571 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
572 ; ZVFHMIN-NEXT: vmfeq.vv v9, v10, v10, v0.t
573 ; ZVFHMIN-NEXT: vmand.mm v0, v9, v8
575 %elt.head = insertelement <8 x half> poison, half %b, i32 0
576 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
577 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"ord", <8 x i1> %m, i32 %evl)
581 define <8 x i1> @fcmp_ueq_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
582 ; ZVFH-LABEL: fcmp_ueq_vv_v8f16:
584 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
585 ; ZVFH-NEXT: vmflt.vv v10, v8, v9, v0.t
586 ; ZVFH-NEXT: vmflt.vv v8, v9, v8, v0.t
587 ; ZVFH-NEXT: vmnor.mm v0, v8, v10
590 ; ZVFHMIN-LABEL: fcmp_ueq_vv_v8f16:
592 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
593 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
594 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
595 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
596 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v10, v0.t
597 ; ZVFHMIN-NEXT: vmflt.vv v9, v10, v12, v0.t
598 ; ZVFHMIN-NEXT: vmnor.mm v0, v9, v8
600 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ueq", <8 x i1> %m, i32 %evl)
604 define <8 x i1> @fcmp_ueq_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
605 ; ZVFH-LABEL: fcmp_ueq_vf_v8f16:
607 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
608 ; ZVFH-NEXT: vmflt.vf v9, v8, fa0, v0.t
609 ; ZVFH-NEXT: vmfgt.vf v8, v8, fa0, v0.t
610 ; ZVFH-NEXT: vmnor.mm v0, v8, v9
613 ; ZVFHMIN-LABEL: fcmp_ueq_vf_v8f16:
615 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
616 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
617 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
618 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
619 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
620 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
621 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
622 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
623 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
624 ; ZVFHMIN-NEXT: vmflt.vv v8, v10, v12, v0.t
625 ; ZVFHMIN-NEXT: vmflt.vv v9, v12, v10, v0.t
626 ; ZVFHMIN-NEXT: vmnor.mm v0, v9, v8
628 %elt.head = insertelement <8 x half> poison, half %b, i32 0
629 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
630 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ueq", <8 x i1> %m, i32 %evl)
634 define <8 x i1> @fcmp_ueq_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
635 ; ZVFH-LABEL: fcmp_ueq_vf_swap_v8f16:
637 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
638 ; ZVFH-NEXT: vmfgt.vf v9, v8, fa0, v0.t
639 ; ZVFH-NEXT: vmflt.vf v8, v8, fa0, v0.t
640 ; ZVFH-NEXT: vmnor.mm v0, v8, v9
643 ; ZVFHMIN-LABEL: fcmp_ueq_vf_swap_v8f16:
645 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
646 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
647 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
648 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
649 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
650 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
651 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
652 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
653 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
654 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v10, v0.t
655 ; ZVFHMIN-NEXT: vmflt.vv v9, v10, v12, v0.t
656 ; ZVFHMIN-NEXT: vmnor.mm v0, v9, v8
658 %elt.head = insertelement <8 x half> poison, half %b, i32 0
659 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
660 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"ueq", <8 x i1> %m, i32 %evl)
664 define <8 x i1> @fcmp_ugt_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
665 ; ZVFH-LABEL: fcmp_ugt_vv_v8f16:
667 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
668 ; ZVFH-NEXT: vmfle.vv v8, v8, v9, v0.t
669 ; ZVFH-NEXT: vmnot.m v0, v8
672 ; ZVFHMIN-LABEL: fcmp_ugt_vv_v8f16:
674 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
675 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
676 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
677 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
678 ; ZVFHMIN-NEXT: vmfle.vv v8, v12, v10, v0.t
679 ; ZVFHMIN-NEXT: vmnot.m v0, v8
681 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ugt", <8 x i1> %m, i32 %evl)
685 define <8 x i1> @fcmp_ugt_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
686 ; ZVFH-LABEL: fcmp_ugt_vf_v8f16:
688 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
689 ; ZVFH-NEXT: vmfle.vf v8, v8, fa0, v0.t
690 ; ZVFH-NEXT: vmnot.m v0, v8
693 ; ZVFHMIN-LABEL: fcmp_ugt_vf_v8f16:
695 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
696 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
697 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
698 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
699 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
700 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
701 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
702 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
703 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
704 ; ZVFHMIN-NEXT: vmfle.vv v8, v10, v12, v0.t
705 ; ZVFHMIN-NEXT: vmnot.m v0, v8
707 %elt.head = insertelement <8 x half> poison, half %b, i32 0
708 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
709 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ugt", <8 x i1> %m, i32 %evl)
713 define <8 x i1> @fcmp_ugt_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
714 ; ZVFH-LABEL: fcmp_ugt_vf_swap_v8f16:
716 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
717 ; ZVFH-NEXT: vmfge.vf v8, v8, fa0, v0.t
718 ; ZVFH-NEXT: vmnot.m v0, v8
721 ; ZVFHMIN-LABEL: fcmp_ugt_vf_swap_v8f16:
723 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
724 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
725 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
726 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
727 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
728 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
729 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
730 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
731 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
732 ; ZVFHMIN-NEXT: vmfle.vv v8, v12, v10, v0.t
733 ; ZVFHMIN-NEXT: vmnot.m v0, v8
735 %elt.head = insertelement <8 x half> poison, half %b, i32 0
736 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
737 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"ugt", <8 x i1> %m, i32 %evl)
741 define <8 x i1> @fcmp_uge_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
742 ; ZVFH-LABEL: fcmp_uge_vv_v8f16:
744 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
745 ; ZVFH-NEXT: vmflt.vv v8, v8, v9, v0.t
746 ; ZVFH-NEXT: vmnot.m v0, v8
749 ; ZVFHMIN-LABEL: fcmp_uge_vv_v8f16:
751 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
752 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
753 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
754 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
755 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v10, v0.t
756 ; ZVFHMIN-NEXT: vmnot.m v0, v8
758 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"uge", <8 x i1> %m, i32 %evl)
762 define <8 x i1> @fcmp_uge_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
763 ; ZVFH-LABEL: fcmp_uge_vf_v8f16:
765 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
766 ; ZVFH-NEXT: vmflt.vf v8, v8, fa0, v0.t
767 ; ZVFH-NEXT: vmnot.m v0, v8
770 ; ZVFHMIN-LABEL: fcmp_uge_vf_v8f16:
772 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
773 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
774 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
775 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
776 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
777 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
778 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
779 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
780 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
781 ; ZVFHMIN-NEXT: vmflt.vv v8, v10, v12, v0.t
782 ; ZVFHMIN-NEXT: vmnot.m v0, v8
784 %elt.head = insertelement <8 x half> poison, half %b, i32 0
785 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
786 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"uge", <8 x i1> %m, i32 %evl)
790 define <8 x i1> @fcmp_uge_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
791 ; ZVFH-LABEL: fcmp_uge_vf_swap_v8f16:
793 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
794 ; ZVFH-NEXT: vmfgt.vf v8, v8, fa0, v0.t
795 ; ZVFH-NEXT: vmnot.m v0, v8
798 ; ZVFHMIN-LABEL: fcmp_uge_vf_swap_v8f16:
800 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
801 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
802 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
803 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
804 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
805 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
806 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
807 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
808 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
809 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v10, v0.t
810 ; ZVFHMIN-NEXT: vmnot.m v0, v8
812 %elt.head = insertelement <8 x half> poison, half %b, i32 0
813 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
814 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"uge", <8 x i1> %m, i32 %evl)
818 define <8 x i1> @fcmp_ult_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
819 ; ZVFH-LABEL: fcmp_ult_vv_v8f16:
821 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
822 ; ZVFH-NEXT: vmfle.vv v8, v9, v8, v0.t
823 ; ZVFH-NEXT: vmnot.m v0, v8
826 ; ZVFHMIN-LABEL: fcmp_ult_vv_v8f16:
828 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
829 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
830 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
831 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
832 ; ZVFHMIN-NEXT: vmfle.vv v8, v12, v10, v0.t
833 ; ZVFHMIN-NEXT: vmnot.m v0, v8
835 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ult", <8 x i1> %m, i32 %evl)
839 define <8 x i1> @fcmp_ult_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
840 ; ZVFH-LABEL: fcmp_ult_vf_v8f16:
842 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
843 ; ZVFH-NEXT: vmfge.vf v8, v8, fa0, v0.t
844 ; ZVFH-NEXT: vmnot.m v0, v8
847 ; ZVFHMIN-LABEL: fcmp_ult_vf_v8f16:
849 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
850 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
851 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
852 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
853 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
854 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
855 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
856 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
857 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
858 ; ZVFHMIN-NEXT: vmfle.vv v8, v12, v10, v0.t
859 ; ZVFHMIN-NEXT: vmnot.m v0, v8
861 %elt.head = insertelement <8 x half> poison, half %b, i32 0
862 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
863 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ult", <8 x i1> %m, i32 %evl)
867 define <8 x i1> @fcmp_ult_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
868 ; ZVFH-LABEL: fcmp_ult_vf_swap_v8f16:
870 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
871 ; ZVFH-NEXT: vmfle.vf v8, v8, fa0, v0.t
872 ; ZVFH-NEXT: vmnot.m v0, v8
875 ; ZVFHMIN-LABEL: fcmp_ult_vf_swap_v8f16:
877 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
878 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
879 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
880 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
881 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
882 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
883 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
884 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
885 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
886 ; ZVFHMIN-NEXT: vmfle.vv v8, v10, v12, v0.t
887 ; ZVFHMIN-NEXT: vmnot.m v0, v8
889 %elt.head = insertelement <8 x half> poison, half %b, i32 0
890 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
891 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"ult", <8 x i1> %m, i32 %evl)
895 define <8 x i1> @fcmp_ule_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
896 ; ZVFH-LABEL: fcmp_ule_vv_v8f16:
898 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
899 ; ZVFH-NEXT: vmflt.vv v8, v9, v8, v0.t
900 ; ZVFH-NEXT: vmnot.m v0, v8
903 ; ZVFHMIN-LABEL: fcmp_ule_vv_v8f16:
905 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
906 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
907 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
908 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
909 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v10, v0.t
910 ; ZVFHMIN-NEXT: vmnot.m v0, v8
912 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ule", <8 x i1> %m, i32 %evl)
916 define <8 x i1> @fcmp_ule_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
917 ; ZVFH-LABEL: fcmp_ule_vf_v8f16:
919 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
920 ; ZVFH-NEXT: vmfgt.vf v8, v8, fa0, v0.t
921 ; ZVFH-NEXT: vmnot.m v0, v8
924 ; ZVFHMIN-LABEL: fcmp_ule_vf_v8f16:
926 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
927 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
928 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
929 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
930 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
931 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
932 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
933 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
934 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
935 ; ZVFHMIN-NEXT: vmflt.vv v8, v12, v10, v0.t
936 ; ZVFHMIN-NEXT: vmnot.m v0, v8
938 %elt.head = insertelement <8 x half> poison, half %b, i32 0
939 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
940 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"ule", <8 x i1> %m, i32 %evl)
944 define <8 x i1> @fcmp_ule_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
945 ; ZVFH-LABEL: fcmp_ule_vf_swap_v8f16:
947 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
948 ; ZVFH-NEXT: vmflt.vf v8, v8, fa0, v0.t
949 ; ZVFH-NEXT: vmnot.m v0, v8
952 ; ZVFHMIN-LABEL: fcmp_ule_vf_swap_v8f16:
954 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
955 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
956 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
957 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
958 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
959 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
960 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
961 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
962 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
963 ; ZVFHMIN-NEXT: vmflt.vv v8, v10, v12, v0.t
964 ; ZVFHMIN-NEXT: vmnot.m v0, v8
966 %elt.head = insertelement <8 x half> poison, half %b, i32 0
967 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
968 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"ule", <8 x i1> %m, i32 %evl)
972 define <8 x i1> @fcmp_une_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
973 ; ZVFH-LABEL: fcmp_une_vv_v8f16:
975 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
976 ; ZVFH-NEXT: vmfne.vv v0, v8, v9, v0.t
979 ; ZVFHMIN-LABEL: fcmp_une_vv_v8f16:
981 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
982 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
983 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
984 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
985 ; ZVFHMIN-NEXT: vmfne.vv v8, v12, v10, v0.t
986 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
988 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"une", <8 x i1> %m, i32 %evl)
992 define <8 x i1> @fcmp_une_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
993 ; ZVFH-LABEL: fcmp_une_vf_v8f16:
995 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
996 ; ZVFH-NEXT: vmfne.vf v0, v8, fa0, v0.t
999 ; ZVFHMIN-LABEL: fcmp_une_vf_v8f16:
1001 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1002 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
1003 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
1004 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1005 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
1006 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1007 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
1008 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
1009 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1010 ; ZVFHMIN-NEXT: vmfne.vv v8, v10, v12, v0.t
1011 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
1013 %elt.head = insertelement <8 x half> poison, half %b, i32 0
1014 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
1015 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"une", <8 x i1> %m, i32 %evl)
1019 define <8 x i1> @fcmp_une_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
1020 ; ZVFH-LABEL: fcmp_une_vf_swap_v8f16:
1022 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1023 ; ZVFH-NEXT: vmfne.vf v0, v8, fa0, v0.t
1026 ; ZVFHMIN-LABEL: fcmp_une_vf_swap_v8f16:
1028 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1029 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
1030 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
1031 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1032 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
1033 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1034 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
1035 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
1036 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1037 ; ZVFHMIN-NEXT: vmfne.vv v8, v12, v10, v0.t
1038 ; ZVFHMIN-NEXT: vmv1r.v v0, v8
1040 %elt.head = insertelement <8 x half> poison, half %b, i32 0
1041 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
1042 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"une", <8 x i1> %m, i32 %evl)
1046 define <8 x i1> @fcmp_uno_vv_v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 zeroext %evl) {
1047 ; ZVFH-LABEL: fcmp_uno_vv_v8f16:
1049 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1050 ; ZVFH-NEXT: vmfne.vv v9, v9, v9, v0.t
1051 ; ZVFH-NEXT: vmfne.vv v8, v8, v8, v0.t
1052 ; ZVFH-NEXT: vmor.mm v0, v8, v9
1055 ; ZVFHMIN-LABEL: fcmp_uno_vv_v8f16:
1057 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1058 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
1059 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1060 ; ZVFHMIN-NEXT: vmfne.vv v9, v10, v10, v0.t
1061 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1062 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
1063 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1064 ; ZVFHMIN-NEXT: vmfne.vv v8, v10, v10, v0.t
1065 ; ZVFHMIN-NEXT: vmor.mm v0, v8, v9
1067 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"uno", <8 x i1> %m, i32 %evl)
1071 define <8 x i1> @fcmp_uno_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
1072 ; ZVFH-LABEL: fcmp_uno_vf_v8f16:
1074 ; ZVFH-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1075 ; ZVFH-NEXT: vfmv.v.f v9, fa0
1076 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1077 ; ZVFH-NEXT: vmfne.vf v9, v9, fa0, v0.t
1078 ; ZVFH-NEXT: vmfne.vv v8, v8, v8, v0.t
1079 ; ZVFH-NEXT: vmor.mm v0, v8, v9
1082 ; ZVFHMIN-LABEL: fcmp_uno_vf_v8f16:
1084 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1085 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
1086 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
1087 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1088 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
1089 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1090 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
1091 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1092 ; ZVFHMIN-NEXT: vmfne.vv v8, v10, v10, v0.t
1093 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1094 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
1095 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1096 ; ZVFHMIN-NEXT: vmfne.vv v9, v10, v10, v0.t
1097 ; ZVFHMIN-NEXT: vmor.mm v0, v8, v9
1099 %elt.head = insertelement <8 x half> poison, half %b, i32 0
1100 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
1101 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"uno", <8 x i1> %m, i32 %evl)
1105 define <8 x i1> @fcmp_uno_vf_swap_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
1106 ; ZVFH-LABEL: fcmp_uno_vf_swap_v8f16:
1108 ; ZVFH-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1109 ; ZVFH-NEXT: vfmv.v.f v9, fa0
1110 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1111 ; ZVFH-NEXT: vmfne.vf v9, v9, fa0, v0.t
1112 ; ZVFH-NEXT: vmfne.vv v8, v8, v8, v0.t
1113 ; ZVFH-NEXT: vmor.mm v0, v9, v8
1116 ; ZVFHMIN-LABEL: fcmp_uno_vf_swap_v8f16:
1118 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1119 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
1120 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
1121 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1122 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
1123 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1124 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
1125 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1126 ; ZVFHMIN-NEXT: vmfne.vv v8, v10, v10, v0.t
1127 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1128 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
1129 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1130 ; ZVFHMIN-NEXT: vmfne.vv v9, v10, v10, v0.t
1131 ; ZVFHMIN-NEXT: vmor.mm v0, v9, v8
1133 %elt.head = insertelement <8 x half> poison, half %b, i32 0
1134 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
1135 %v = call <8 x i1> @llvm.vp.fcmp.v8f16(<8 x half> %vb, <8 x half> %va, metadata !"uno", <8 x i1> %m, i32 %evl)
1139 declare <128 x i1> @llvm.vp.fcmp.v128f16(<128 x half>, <128 x half>, metadata, <128 x i1>, i32)
1141 define <128 x i1> @fcmp_oeq_vv_v128f16(<128 x half> %va, <128 x half> %vb, <128 x i1> %m, i32 zeroext %evl) {
1142 %v = call <128 x i1> @llvm.vp.fcmp.v128f16(<128 x half> %va, <128 x half> %vb, metadata !"oeq", <128 x i1> %m, i32 %evl)
1146 declare <7 x i1> @llvm.vp.fcmp.v7f64(<7 x double>, <7 x double>, metadata, <7 x i1>, i32)
1148 define <7 x i1> @fcmp_oeq_vv_v7f64(<7 x double> %va, <7 x double> %vb, <7 x i1> %m, i32 zeroext %evl) {
1149 ; CHECK-LABEL: fcmp_oeq_vv_v7f64:
1151 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1152 ; CHECK-NEXT: vmfeq.vv v16, v8, v12, v0.t
1153 ; CHECK-NEXT: vmv1r.v v0, v16
1155 %v = call <7 x i1> @llvm.vp.fcmp.v7f64(<7 x double> %va, <7 x double> %vb, metadata !"oeq", <7 x i1> %m, i32 %evl)
1159 declare <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double>, <8 x double>, metadata, <8 x i1>, i32)
1161 define <8 x i1> @fcmp_oeq_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1162 ; CHECK-LABEL: fcmp_oeq_vv_v8f64:
1164 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1165 ; CHECK-NEXT: vmfeq.vv v16, v8, v12, v0.t
1166 ; CHECK-NEXT: vmv1r.v v0, v16
1168 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"oeq", <8 x i1> %m, i32 %evl)
1172 define <8 x i1> @fcmp_oeq_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1173 ; CHECK-LABEL: fcmp_oeq_vf_v8f64:
1175 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1176 ; CHECK-NEXT: vmfeq.vf v12, v8, fa0, v0.t
1177 ; CHECK-NEXT: vmv1r.v v0, v12
1179 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1180 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1181 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"oeq", <8 x i1> %m, i32 %evl)
1185 define <8 x i1> @fcmp_oeq_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1186 ; CHECK-LABEL: fcmp_oeq_vf_swap_v8f64:
1188 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1189 ; CHECK-NEXT: vmfeq.vf v12, v8, fa0, v0.t
1190 ; CHECK-NEXT: vmv1r.v v0, v12
1192 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1193 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1194 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"oeq", <8 x i1> %m, i32 %evl)
1198 define <8 x i1> @fcmp_ogt_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1199 ; CHECK-LABEL: fcmp_ogt_vv_v8f64:
1201 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1202 ; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t
1203 ; CHECK-NEXT: vmv1r.v v0, v16
1205 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ogt", <8 x i1> %m, i32 %evl)
1209 define <8 x i1> @fcmp_ogt_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1210 ; CHECK-LABEL: fcmp_ogt_vf_v8f64:
1212 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1213 ; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t
1214 ; CHECK-NEXT: vmv1r.v v0, v12
1216 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1217 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1218 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ogt", <8 x i1> %m, i32 %evl)
1222 define <8 x i1> @fcmp_ogt_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1223 ; CHECK-LABEL: fcmp_ogt_vf_swap_v8f64:
1225 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1226 ; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t
1227 ; CHECK-NEXT: vmv1r.v v0, v12
1229 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1230 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1231 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"ogt", <8 x i1> %m, i32 %evl)
1235 define <8 x i1> @fcmp_oge_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1236 ; CHECK-LABEL: fcmp_oge_vv_v8f64:
1238 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1239 ; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t
1240 ; CHECK-NEXT: vmv1r.v v0, v16
1242 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"oge", <8 x i1> %m, i32 %evl)
1246 define <8 x i1> @fcmp_oge_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1247 ; CHECK-LABEL: fcmp_oge_vf_v8f64:
1249 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1250 ; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t
1251 ; CHECK-NEXT: vmv1r.v v0, v12
1253 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1254 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1255 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"oge", <8 x i1> %m, i32 %evl)
1259 define <8 x i1> @fcmp_oge_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1260 ; CHECK-LABEL: fcmp_oge_vf_swap_v8f64:
1262 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1263 ; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t
1264 ; CHECK-NEXT: vmv1r.v v0, v12
1266 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1267 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1268 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"oge", <8 x i1> %m, i32 %evl)
1272 define <8 x i1> @fcmp_olt_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1273 ; CHECK-LABEL: fcmp_olt_vv_v8f64:
1275 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1276 ; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t
1277 ; CHECK-NEXT: vmv1r.v v0, v16
1279 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"olt", <8 x i1> %m, i32 %evl)
1283 define <8 x i1> @fcmp_olt_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1284 ; CHECK-LABEL: fcmp_olt_vf_v8f64:
1286 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1287 ; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t
1288 ; CHECK-NEXT: vmv1r.v v0, v12
1290 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1291 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1292 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"olt", <8 x i1> %m, i32 %evl)
1296 define <8 x i1> @fcmp_olt_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1297 ; CHECK-LABEL: fcmp_olt_vf_swap_v8f64:
1299 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1300 ; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t
1301 ; CHECK-NEXT: vmv1r.v v0, v12
1303 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1304 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1305 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"olt", <8 x i1> %m, i32 %evl)
1309 define <8 x i1> @fcmp_ole_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1310 ; CHECK-LABEL: fcmp_ole_vv_v8f64:
1312 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1313 ; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t
1314 ; CHECK-NEXT: vmv1r.v v0, v16
1316 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ole", <8 x i1> %m, i32 %evl)
1320 define <8 x i1> @fcmp_ole_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1321 ; CHECK-LABEL: fcmp_ole_vf_v8f64:
1323 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1324 ; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t
1325 ; CHECK-NEXT: vmv1r.v v0, v12
1327 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1328 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1329 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ole", <8 x i1> %m, i32 %evl)
1333 define <8 x i1> @fcmp_ole_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1334 ; CHECK-LABEL: fcmp_ole_vf_swap_v8f64:
1336 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1337 ; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t
1338 ; CHECK-NEXT: vmv1r.v v0, v12
1340 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1341 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1342 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"ole", <8 x i1> %m, i32 %evl)
1346 define <8 x i1> @fcmp_one_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1347 ; CHECK-LABEL: fcmp_one_vv_v8f64:
1349 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1350 ; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t
1351 ; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t
1352 ; CHECK-NEXT: vmor.mm v0, v17, v16
1354 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"one", <8 x i1> %m, i32 %evl)
1358 define <8 x i1> @fcmp_one_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1359 ; CHECK-LABEL: fcmp_one_vf_v8f64:
1361 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1362 ; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t
1363 ; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t
1364 ; CHECK-NEXT: vmor.mm v0, v13, v12
1366 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1367 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1368 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"one", <8 x i1> %m, i32 %evl)
1372 define <8 x i1> @fcmp_one_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1373 ; CHECK-LABEL: fcmp_one_vf_swap_v8f64:
1375 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1376 ; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t
1377 ; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t
1378 ; CHECK-NEXT: vmor.mm v0, v13, v12
1380 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1381 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1382 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"one", <8 x i1> %m, i32 %evl)
1386 define <8 x i1> @fcmp_ord_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1387 ; CHECK-LABEL: fcmp_ord_vv_v8f64:
1389 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1390 ; CHECK-NEXT: vmfeq.vv v16, v12, v12, v0.t
1391 ; CHECK-NEXT: vmfeq.vv v12, v8, v8, v0.t
1392 ; CHECK-NEXT: vmand.mm v0, v12, v16
1394 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ord", <8 x i1> %m, i32 %evl)
1398 define <8 x i1> @fcmp_ord_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1399 ; CHECK-LABEL: fcmp_ord_vf_v8f64:
1401 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1402 ; CHECK-NEXT: vfmv.v.f v12, fa0
1403 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1404 ; CHECK-NEXT: vmfeq.vf v16, v12, fa0, v0.t
1405 ; CHECK-NEXT: vmfeq.vv v12, v8, v8, v0.t
1406 ; CHECK-NEXT: vmand.mm v0, v12, v16
1408 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1409 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1410 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ord", <8 x i1> %m, i32 %evl)
1414 define <8 x i1> @fcmp_ord_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1415 ; CHECK-LABEL: fcmp_ord_vf_swap_v8f64:
1417 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1418 ; CHECK-NEXT: vfmv.v.f v12, fa0
1419 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1420 ; CHECK-NEXT: vmfeq.vf v16, v12, fa0, v0.t
1421 ; CHECK-NEXT: vmfeq.vv v12, v8, v8, v0.t
1422 ; CHECK-NEXT: vmand.mm v0, v16, v12
1424 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1425 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1426 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"ord", <8 x i1> %m, i32 %evl)
1430 define <8 x i1> @fcmp_ueq_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1431 ; CHECK-LABEL: fcmp_ueq_vv_v8f64:
1433 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1434 ; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t
1435 ; CHECK-NEXT: vmflt.vv v17, v12, v8, v0.t
1436 ; CHECK-NEXT: vmnor.mm v0, v17, v16
1438 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ueq", <8 x i1> %m, i32 %evl)
1442 define <8 x i1> @fcmp_ueq_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1443 ; CHECK-LABEL: fcmp_ueq_vf_v8f64:
1445 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1446 ; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t
1447 ; CHECK-NEXT: vmfgt.vf v13, v8, fa0, v0.t
1448 ; CHECK-NEXT: vmnor.mm v0, v13, v12
1450 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1451 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1452 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ueq", <8 x i1> %m, i32 %evl)
1456 define <8 x i1> @fcmp_ueq_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1457 ; CHECK-LABEL: fcmp_ueq_vf_swap_v8f64:
1459 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1460 ; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t
1461 ; CHECK-NEXT: vmflt.vf v13, v8, fa0, v0.t
1462 ; CHECK-NEXT: vmnor.mm v0, v13, v12
1464 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1465 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1466 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"ueq", <8 x i1> %m, i32 %evl)
1470 define <8 x i1> @fcmp_ugt_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1471 ; CHECK-LABEL: fcmp_ugt_vv_v8f64:
1473 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1474 ; CHECK-NEXT: vmfle.vv v16, v8, v12, v0.t
1475 ; CHECK-NEXT: vmnot.m v0, v16
1477 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ugt", <8 x i1> %m, i32 %evl)
1481 define <8 x i1> @fcmp_ugt_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1482 ; CHECK-LABEL: fcmp_ugt_vf_v8f64:
1484 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1485 ; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t
1486 ; CHECK-NEXT: vmnot.m v0, v12
1488 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1489 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1490 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ugt", <8 x i1> %m, i32 %evl)
1494 define <8 x i1> @fcmp_ugt_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1495 ; CHECK-LABEL: fcmp_ugt_vf_swap_v8f64:
1497 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1498 ; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t
1499 ; CHECK-NEXT: vmnot.m v0, v12
1501 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1502 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1503 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"ugt", <8 x i1> %m, i32 %evl)
1507 define <8 x i1> @fcmp_uge_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1508 ; CHECK-LABEL: fcmp_uge_vv_v8f64:
1510 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1511 ; CHECK-NEXT: vmflt.vv v16, v8, v12, v0.t
1512 ; CHECK-NEXT: vmnot.m v0, v16
1514 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"uge", <8 x i1> %m, i32 %evl)
1518 define <8 x i1> @fcmp_uge_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1519 ; CHECK-LABEL: fcmp_uge_vf_v8f64:
1521 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1522 ; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t
1523 ; CHECK-NEXT: vmnot.m v0, v12
1525 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1526 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1527 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"uge", <8 x i1> %m, i32 %evl)
1531 define <8 x i1> @fcmp_uge_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1532 ; CHECK-LABEL: fcmp_uge_vf_swap_v8f64:
1534 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1535 ; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t
1536 ; CHECK-NEXT: vmnot.m v0, v12
1538 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1539 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1540 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"uge", <8 x i1> %m, i32 %evl)
1544 define <8 x i1> @fcmp_ult_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1545 ; CHECK-LABEL: fcmp_ult_vv_v8f64:
1547 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1548 ; CHECK-NEXT: vmfle.vv v16, v12, v8, v0.t
1549 ; CHECK-NEXT: vmnot.m v0, v16
1551 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ult", <8 x i1> %m, i32 %evl)
1555 define <8 x i1> @fcmp_ult_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1556 ; CHECK-LABEL: fcmp_ult_vf_v8f64:
1558 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1559 ; CHECK-NEXT: vmfge.vf v12, v8, fa0, v0.t
1560 ; CHECK-NEXT: vmnot.m v0, v12
1562 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1563 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1564 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ult", <8 x i1> %m, i32 %evl)
1568 define <8 x i1> @fcmp_ult_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1569 ; CHECK-LABEL: fcmp_ult_vf_swap_v8f64:
1571 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1572 ; CHECK-NEXT: vmfle.vf v12, v8, fa0, v0.t
1573 ; CHECK-NEXT: vmnot.m v0, v12
1575 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1576 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1577 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"ult", <8 x i1> %m, i32 %evl)
1581 define <8 x i1> @fcmp_ule_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1582 ; CHECK-LABEL: fcmp_ule_vv_v8f64:
1584 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1585 ; CHECK-NEXT: vmflt.vv v16, v12, v8, v0.t
1586 ; CHECK-NEXT: vmnot.m v0, v16
1588 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ule", <8 x i1> %m, i32 %evl)
1592 define <8 x i1> @fcmp_ule_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1593 ; CHECK-LABEL: fcmp_ule_vf_v8f64:
1595 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1596 ; CHECK-NEXT: vmfgt.vf v12, v8, fa0, v0.t
1597 ; CHECK-NEXT: vmnot.m v0, v12
1599 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1600 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1601 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"ule", <8 x i1> %m, i32 %evl)
1605 define <8 x i1> @fcmp_ule_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1606 ; CHECK-LABEL: fcmp_ule_vf_swap_v8f64:
1608 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1609 ; CHECK-NEXT: vmflt.vf v12, v8, fa0, v0.t
1610 ; CHECK-NEXT: vmnot.m v0, v12
1612 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1613 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1614 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"ule", <8 x i1> %m, i32 %evl)
1618 define <8 x i1> @fcmp_une_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1619 ; CHECK-LABEL: fcmp_une_vv_v8f64:
1621 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1622 ; CHECK-NEXT: vmfne.vv v16, v8, v12, v0.t
1623 ; CHECK-NEXT: vmv1r.v v0, v16
1625 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"une", <8 x i1> %m, i32 %evl)
1629 define <8 x i1> @fcmp_une_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1630 ; CHECK-LABEL: fcmp_une_vf_v8f64:
1632 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1633 ; CHECK-NEXT: vmfne.vf v12, v8, fa0, v0.t
1634 ; CHECK-NEXT: vmv1r.v v0, v12
1636 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1637 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1638 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"une", <8 x i1> %m, i32 %evl)
1642 define <8 x i1> @fcmp_une_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1643 ; CHECK-LABEL: fcmp_une_vf_swap_v8f64:
1645 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1646 ; CHECK-NEXT: vmfne.vf v12, v8, fa0, v0.t
1647 ; CHECK-NEXT: vmv1r.v v0, v12
1649 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1650 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1651 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"une", <8 x i1> %m, i32 %evl)
1655 define <8 x i1> @fcmp_uno_vv_v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 zeroext %evl) {
1656 ; CHECK-LABEL: fcmp_uno_vv_v8f64:
1658 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1659 ; CHECK-NEXT: vmfne.vv v16, v12, v12, v0.t
1660 ; CHECK-NEXT: vmfne.vv v12, v8, v8, v0.t
1661 ; CHECK-NEXT: vmor.mm v0, v12, v16
1663 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"uno", <8 x i1> %m, i32 %evl)
1667 define <8 x i1> @fcmp_uno_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1668 ; CHECK-LABEL: fcmp_uno_vf_v8f64:
1670 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1671 ; CHECK-NEXT: vfmv.v.f v12, fa0
1672 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1673 ; CHECK-NEXT: vmfne.vf v16, v12, fa0, v0.t
1674 ; CHECK-NEXT: vmfne.vv v12, v8, v8, v0.t
1675 ; CHECK-NEXT: vmor.mm v0, v12, v16
1677 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1678 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1679 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"uno", <8 x i1> %m, i32 %evl)
1683 define <8 x i1> @fcmp_uno_vf_swap_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
1684 ; CHECK-LABEL: fcmp_uno_vf_swap_v8f64:
1686 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1687 ; CHECK-NEXT: vfmv.v.f v12, fa0
1688 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1689 ; CHECK-NEXT: vmfne.vf v16, v12, fa0, v0.t
1690 ; CHECK-NEXT: vmfne.vv v12, v8, v8, v0.t
1691 ; CHECK-NEXT: vmor.mm v0, v16, v12
1693 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1694 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1695 %v = call <8 x i1> @llvm.vp.fcmp.v8f64(<8 x double> %vb, <8 x double> %va, metadata !"uno", <8 x i1> %m, i32 %evl)
1699 declare <32 x i1> @llvm.vp.fcmp.v32f64(<32 x double>, <32 x double>, metadata, <32 x i1>, i32)
1701 define <32 x i1> @fcmp_oeq_vv_v32f64(<32 x double> %va, <32 x double> %vb, <32 x i1> %m, i32 zeroext %evl) {
1702 ; CHECK-LABEL: fcmp_oeq_vv_v32f64:
1704 ; CHECK-NEXT: addi sp, sp, -16
1705 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1706 ; CHECK-NEXT: csrr a1, vlenb
1707 ; CHECK-NEXT: slli a1, a1, 4
1708 ; CHECK-NEXT: sub sp, sp, a1
1709 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
1710 ; CHECK-NEXT: addi a1, a0, 128
1711 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
1712 ; CHECK-NEXT: vle64.v v24, (a1)
1713 ; CHECK-NEXT: csrr a1, vlenb
1714 ; CHECK-NEXT: slli a1, a1, 3
1715 ; CHECK-NEXT: add a1, sp, a1
1716 ; CHECK-NEXT: addi a1, a1, 16
1717 ; CHECK-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill
1718 ; CHECK-NEXT: vsetivli zero, 2, e8, mf4, ta, ma
1719 ; CHECK-NEXT: vslidedown.vi v1, v0, 2
1720 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
1721 ; CHECK-NEXT: vle64.v v24, (a0)
1722 ; CHECK-NEXT: addi a0, sp, 16
1723 ; CHECK-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
1724 ; CHECK-NEXT: li a1, 16
1725 ; CHECK-NEXT: mv a0, a2
1726 ; CHECK-NEXT: bltu a2, a1, .LBB87_2
1727 ; CHECK-NEXT: # %bb.1:
1728 ; CHECK-NEXT: li a0, 16
1729 ; CHECK-NEXT: .LBB87_2:
1730 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1731 ; CHECK-NEXT: addi a0, sp, 16
1732 ; CHECK-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
1733 ; CHECK-NEXT: vmfeq.vv v2, v8, v24, v0.t
1734 ; CHECK-NEXT: addi a0, a2, -16
1735 ; CHECK-NEXT: sltu a1, a2, a0
1736 ; CHECK-NEXT: addi a1, a1, -1
1737 ; CHECK-NEXT: and a0, a1, a0
1738 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1739 ; CHECK-NEXT: vmv1r.v v0, v1
1740 ; CHECK-NEXT: csrr a0, vlenb
1741 ; CHECK-NEXT: slli a0, a0, 3
1742 ; CHECK-NEXT: add a0, sp, a0
1743 ; CHECK-NEXT: addi a0, a0, 16
1744 ; CHECK-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
1745 ; CHECK-NEXT: vmfeq.vv v24, v16, v8, v0.t
1746 ; CHECK-NEXT: vsetivli zero, 4, e8, mf4, ta, ma
1747 ; CHECK-NEXT: vslideup.vi v2, v24, 2
1748 ; CHECK-NEXT: vmv1r.v v0, v2
1749 ; CHECK-NEXT: csrr a0, vlenb
1750 ; CHECK-NEXT: slli a0, a0, 4
1751 ; CHECK-NEXT: add sp, sp, a0
1752 ; CHECK-NEXT: addi sp, sp, 16
1754 %v = call <32 x i1> @llvm.vp.fcmp.v32f64(<32 x double> %va, <32 x double> %vb, metadata !"oeq", <32 x i1> %m, i32 %evl)