1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
6 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfhmin,+v -target-abi=ilp32d \
7 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
8 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfhmin,+v -target-abi=lp64d \
9 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
11 define <vscale x 1 x i1> @vfptosi_nxv1f16_nxv1i1(<vscale x 1 x half> %va) {
12 ; ZVFH-LABEL: vfptosi_nxv1f16_nxv1i1:
14 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
15 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v9, v8
16 ; ZVFH-NEXT: vand.vi v8, v9, 1
17 ; ZVFH-NEXT: vmsne.vi v0, v8, 0
20 ; ZVFHMIN-LABEL: vfptosi_nxv1f16_nxv1i1:
22 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
23 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
24 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v9
25 ; ZVFHMIN-NEXT: vand.vi v8, v8, 1
26 ; ZVFHMIN-NEXT: vmsne.vi v0, v8, 0
28 %evec = fptosi <vscale x 1 x half> %va to <vscale x 1 x i1>
29 ret <vscale x 1 x i1> %evec
32 define <vscale x 1 x i7> @vfptosi_nxv1f16_nxv1i7(<vscale x 1 x half> %va) {
33 ; ZVFH-LABEL: vfptosi_nxv1f16_nxv1i7:
35 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
36 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v9, v8
37 ; ZVFH-NEXT: vmv1r.v v8, v9
40 ; ZVFHMIN-LABEL: vfptosi_nxv1f16_nxv1i7:
42 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
43 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
44 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v9
45 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
46 ; ZVFHMIN-NEXT: vnsrl.wi v8, v8, 0
48 %evec = fptosi <vscale x 1 x half> %va to <vscale x 1 x i7>
49 ret <vscale x 1 x i7> %evec
52 define <vscale x 1 x i7> @vfptoui_nxv1f16_nxv1i7(<vscale x 1 x half> %va) {
53 ; ZVFH-LABEL: vfptoui_nxv1f16_nxv1i7:
55 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
56 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v9, v8
57 ; ZVFH-NEXT: vmv1r.v v8, v9
60 ; ZVFHMIN-LABEL: vfptoui_nxv1f16_nxv1i7:
62 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
63 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
64 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v9
65 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
66 ; ZVFHMIN-NEXT: vnsrl.wi v8, v8, 0
68 %evec = fptoui <vscale x 1 x half> %va to <vscale x 1 x i7>
69 ret <vscale x 1 x i7> %evec
72 define <vscale x 1 x i1> @vfptoui_nxv1f16_nxv1i1(<vscale x 1 x half> %va) {
73 ; ZVFH-LABEL: vfptoui_nxv1f16_nxv1i1:
75 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
76 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v9, v8
77 ; ZVFH-NEXT: vand.vi v8, v9, 1
78 ; ZVFH-NEXT: vmsne.vi v0, v8, 0
81 ; ZVFHMIN-LABEL: vfptoui_nxv1f16_nxv1i1:
83 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
84 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
85 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v9
86 ; ZVFHMIN-NEXT: vand.vi v8, v8, 1
87 ; ZVFHMIN-NEXT: vmsne.vi v0, v8, 0
89 %evec = fptoui <vscale x 1 x half> %va to <vscale x 1 x i1>
90 ret <vscale x 1 x i1> %evec
93 define <vscale x 1 x i8> @vfptosi_nxv1f16_nxv1i8(<vscale x 1 x half> %va) {
94 ; ZVFH-LABEL: vfptosi_nxv1f16_nxv1i8:
96 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
97 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v9, v8
98 ; ZVFH-NEXT: vmv1r.v v8, v9
101 ; ZVFHMIN-LABEL: vfptosi_nxv1f16_nxv1i8:
103 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
104 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
105 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v9
106 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
107 ; ZVFHMIN-NEXT: vnsrl.wi v8, v8, 0
109 %evec = fptosi <vscale x 1 x half> %va to <vscale x 1 x i8>
110 ret <vscale x 1 x i8> %evec
113 define <vscale x 1 x i8> @vfptoui_nxv1f16_nxv1i8(<vscale x 1 x half> %va) {
114 ; ZVFH-LABEL: vfptoui_nxv1f16_nxv1i8:
116 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
117 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v9, v8
118 ; ZVFH-NEXT: vmv1r.v v8, v9
121 ; ZVFHMIN-LABEL: vfptoui_nxv1f16_nxv1i8:
123 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
124 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
125 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v9
126 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
127 ; ZVFHMIN-NEXT: vnsrl.wi v8, v8, 0
129 %evec = fptoui <vscale x 1 x half> %va to <vscale x 1 x i8>
130 ret <vscale x 1 x i8> %evec
133 define <vscale x 1 x i16> @vfptosi_nxv1f16_nxv1i16(<vscale x 1 x half> %va) {
134 ; ZVFH-LABEL: vfptosi_nxv1f16_nxv1i16:
136 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
137 ; ZVFH-NEXT: vfcvt.rtz.x.f.v v8, v8
140 ; ZVFHMIN-LABEL: vfptosi_nxv1f16_nxv1i16:
142 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
143 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
144 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v9
146 %evec = fptosi <vscale x 1 x half> %va to <vscale x 1 x i16>
147 ret <vscale x 1 x i16> %evec
150 define <vscale x 1 x i16> @vfptoui_nxv1f16_nxv1i16(<vscale x 1 x half> %va) {
151 ; ZVFH-LABEL: vfptoui_nxv1f16_nxv1i16:
153 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
154 ; ZVFH-NEXT: vfcvt.rtz.xu.f.v v8, v8
157 ; ZVFHMIN-LABEL: vfptoui_nxv1f16_nxv1i16:
159 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
160 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
161 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v9
163 %evec = fptoui <vscale x 1 x half> %va to <vscale x 1 x i16>
164 ret <vscale x 1 x i16> %evec
167 define <vscale x 1 x i32> @vfptosi_nxv1f16_nxv1i32(<vscale x 1 x half> %va) {
168 ; ZVFH-LABEL: vfptosi_nxv1f16_nxv1i32:
170 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
171 ; ZVFH-NEXT: vfwcvt.rtz.x.f.v v9, v8
172 ; ZVFH-NEXT: vmv1r.v v8, v9
175 ; ZVFHMIN-LABEL: vfptosi_nxv1f16_nxv1i32:
177 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
178 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
179 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
180 ; ZVFHMIN-NEXT: vfcvt.rtz.x.f.v v8, v9
182 %evec = fptosi <vscale x 1 x half> %va to <vscale x 1 x i32>
183 ret <vscale x 1 x i32> %evec
186 define <vscale x 1 x i32> @vfptoui_nxv1f16_nxv1i32(<vscale x 1 x half> %va) {
187 ; ZVFH-LABEL: vfptoui_nxv1f16_nxv1i32:
189 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
190 ; ZVFH-NEXT: vfwcvt.rtz.xu.f.v v9, v8
191 ; ZVFH-NEXT: vmv1r.v v8, v9
194 ; ZVFHMIN-LABEL: vfptoui_nxv1f16_nxv1i32:
196 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
197 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
198 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
199 ; ZVFHMIN-NEXT: vfcvt.rtz.xu.f.v v8, v9
201 %evec = fptoui <vscale x 1 x half> %va to <vscale x 1 x i32>
202 ret <vscale x 1 x i32> %evec
205 define <vscale x 1 x i64> @vfptosi_nxv1f16_nxv1i64(<vscale x 1 x half> %va) {
206 ; CHECK-LABEL: vfptosi_nxv1f16_nxv1i64:
208 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
209 ; CHECK-NEXT: vfwcvt.f.f.v v9, v8
210 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
211 ; CHECK-NEXT: vfwcvt.rtz.x.f.v v8, v9
213 %evec = fptosi <vscale x 1 x half> %va to <vscale x 1 x i64>
214 ret <vscale x 1 x i64> %evec
217 define <vscale x 1 x i64> @vfptoui_nxv1f16_nxv1i64(<vscale x 1 x half> %va) {
218 ; CHECK-LABEL: vfptoui_nxv1f16_nxv1i64:
220 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
221 ; CHECK-NEXT: vfwcvt.f.f.v v9, v8
222 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
223 ; CHECK-NEXT: vfwcvt.rtz.xu.f.v v8, v9
225 %evec = fptoui <vscale x 1 x half> %va to <vscale x 1 x i64>
226 ret <vscale x 1 x i64> %evec
229 define <vscale x 2 x i1> @vfptosi_nxv2f16_nxv2i1(<vscale x 2 x half> %va) {
230 ; ZVFH-LABEL: vfptosi_nxv2f16_nxv2i1:
232 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
233 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v9, v8
234 ; ZVFH-NEXT: vand.vi v8, v9, 1
235 ; ZVFH-NEXT: vmsne.vi v0, v8, 0
238 ; ZVFHMIN-LABEL: vfptosi_nxv2f16_nxv2i1:
240 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
241 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
242 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v9
243 ; ZVFHMIN-NEXT: vand.vi v8, v8, 1
244 ; ZVFHMIN-NEXT: vmsne.vi v0, v8, 0
246 %evec = fptosi <vscale x 2 x half> %va to <vscale x 2 x i1>
247 ret <vscale x 2 x i1> %evec
250 define <vscale x 2 x i1> @vfptoui_nxv2f16_nxv2i1(<vscale x 2 x half> %va) {
251 ; ZVFH-LABEL: vfptoui_nxv2f16_nxv2i1:
253 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
254 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v9, v8
255 ; ZVFH-NEXT: vand.vi v8, v9, 1
256 ; ZVFH-NEXT: vmsne.vi v0, v8, 0
259 ; ZVFHMIN-LABEL: vfptoui_nxv2f16_nxv2i1:
261 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
262 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
263 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v9
264 ; ZVFHMIN-NEXT: vand.vi v8, v8, 1
265 ; ZVFHMIN-NEXT: vmsne.vi v0, v8, 0
267 %evec = fptoui <vscale x 2 x half> %va to <vscale x 2 x i1>
268 ret <vscale x 2 x i1> %evec
271 define <vscale x 2 x i8> @vfptosi_nxv2f16_nxv2i8(<vscale x 2 x half> %va) {
272 ; ZVFH-LABEL: vfptosi_nxv2f16_nxv2i8:
274 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
275 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v9, v8
276 ; ZVFH-NEXT: vmv1r.v v8, v9
279 ; ZVFHMIN-LABEL: vfptosi_nxv2f16_nxv2i8:
281 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
282 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
283 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v9
284 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
285 ; ZVFHMIN-NEXT: vnsrl.wi v8, v8, 0
287 %evec = fptosi <vscale x 2 x half> %va to <vscale x 2 x i8>
288 ret <vscale x 2 x i8> %evec
291 define <vscale x 2 x i8> @vfptoui_nxv2f16_nxv2i8(<vscale x 2 x half> %va) {
292 ; ZVFH-LABEL: vfptoui_nxv2f16_nxv2i8:
294 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
295 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v9, v8
296 ; ZVFH-NEXT: vmv1r.v v8, v9
299 ; ZVFHMIN-LABEL: vfptoui_nxv2f16_nxv2i8:
301 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
302 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
303 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v9
304 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
305 ; ZVFHMIN-NEXT: vnsrl.wi v8, v8, 0
307 %evec = fptoui <vscale x 2 x half> %va to <vscale x 2 x i8>
308 ret <vscale x 2 x i8> %evec
311 define <vscale x 2 x i16> @vfptosi_nxv2f16_nxv2i16(<vscale x 2 x half> %va) {
312 ; ZVFH-LABEL: vfptosi_nxv2f16_nxv2i16:
314 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
315 ; ZVFH-NEXT: vfcvt.rtz.x.f.v v8, v8
318 ; ZVFHMIN-LABEL: vfptosi_nxv2f16_nxv2i16:
320 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
321 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
322 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v9
324 %evec = fptosi <vscale x 2 x half> %va to <vscale x 2 x i16>
325 ret <vscale x 2 x i16> %evec
328 define <vscale x 2 x i16> @vfptoui_nxv2f16_nxv2i16(<vscale x 2 x half> %va) {
329 ; ZVFH-LABEL: vfptoui_nxv2f16_nxv2i16:
331 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
332 ; ZVFH-NEXT: vfcvt.rtz.xu.f.v v8, v8
335 ; ZVFHMIN-LABEL: vfptoui_nxv2f16_nxv2i16:
337 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
338 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
339 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v9
341 %evec = fptoui <vscale x 2 x half> %va to <vscale x 2 x i16>
342 ret <vscale x 2 x i16> %evec
345 define <vscale x 2 x i32> @vfptosi_nxv2f16_nxv2i32(<vscale x 2 x half> %va) {
346 ; ZVFH-LABEL: vfptosi_nxv2f16_nxv2i32:
348 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
349 ; ZVFH-NEXT: vfwcvt.rtz.x.f.v v9, v8
350 ; ZVFH-NEXT: vmv1r.v v8, v9
353 ; ZVFHMIN-LABEL: vfptosi_nxv2f16_nxv2i32:
355 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
356 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
357 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
358 ; ZVFHMIN-NEXT: vfcvt.rtz.x.f.v v8, v9
360 %evec = fptosi <vscale x 2 x half> %va to <vscale x 2 x i32>
361 ret <vscale x 2 x i32> %evec
364 define <vscale x 2 x i32> @vfptoui_nxv2f16_nxv2i32(<vscale x 2 x half> %va) {
365 ; ZVFH-LABEL: vfptoui_nxv2f16_nxv2i32:
367 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
368 ; ZVFH-NEXT: vfwcvt.rtz.xu.f.v v9, v8
369 ; ZVFH-NEXT: vmv1r.v v8, v9
372 ; ZVFHMIN-LABEL: vfptoui_nxv2f16_nxv2i32:
374 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
375 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
376 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
377 ; ZVFHMIN-NEXT: vfcvt.rtz.xu.f.v v8, v9
379 %evec = fptoui <vscale x 2 x half> %va to <vscale x 2 x i32>
380 ret <vscale x 2 x i32> %evec
383 define <vscale x 2 x i64> @vfptosi_nxv2f16_nxv2i64(<vscale x 2 x half> %va) {
384 ; CHECK-LABEL: vfptosi_nxv2f16_nxv2i64:
386 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
387 ; CHECK-NEXT: vfwcvt.f.f.v v10, v8
388 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
389 ; CHECK-NEXT: vfwcvt.rtz.x.f.v v8, v10
391 %evec = fptosi <vscale x 2 x half> %va to <vscale x 2 x i64>
392 ret <vscale x 2 x i64> %evec
395 define <vscale x 2 x i64> @vfptoui_nxv2f16_nxv2i64(<vscale x 2 x half> %va) {
396 ; CHECK-LABEL: vfptoui_nxv2f16_nxv2i64:
398 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
399 ; CHECK-NEXT: vfwcvt.f.f.v v10, v8
400 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
401 ; CHECK-NEXT: vfwcvt.rtz.xu.f.v v8, v10
403 %evec = fptoui <vscale x 2 x half> %va to <vscale x 2 x i64>
404 ret <vscale x 2 x i64> %evec
407 define <vscale x 4 x i1> @vfptosi_nxv4f16_nxv4i1(<vscale x 4 x half> %va) {
408 ; ZVFH-LABEL: vfptosi_nxv4f16_nxv4i1:
410 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
411 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v9, v8
412 ; ZVFH-NEXT: vand.vi v8, v9, 1
413 ; ZVFH-NEXT: vmsne.vi v0, v8, 0
416 ; ZVFHMIN-LABEL: vfptosi_nxv4f16_nxv4i1:
418 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
419 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
420 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v10
421 ; ZVFHMIN-NEXT: vand.vi v8, v8, 1
422 ; ZVFHMIN-NEXT: vmsne.vi v0, v8, 0
424 %evec = fptosi <vscale x 4 x half> %va to <vscale x 4 x i1>
425 ret <vscale x 4 x i1> %evec
428 define <vscale x 4 x i1> @vfptoui_nxv4f16_nxv4i1(<vscale x 4 x half> %va) {
429 ; ZVFH-LABEL: vfptoui_nxv4f16_nxv4i1:
431 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
432 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v9, v8
433 ; ZVFH-NEXT: vand.vi v8, v9, 1
434 ; ZVFH-NEXT: vmsne.vi v0, v8, 0
437 ; ZVFHMIN-LABEL: vfptoui_nxv4f16_nxv4i1:
439 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
440 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
441 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v10
442 ; ZVFHMIN-NEXT: vand.vi v8, v8, 1
443 ; ZVFHMIN-NEXT: vmsne.vi v0, v8, 0
445 %evec = fptoui <vscale x 4 x half> %va to <vscale x 4 x i1>
446 ret <vscale x 4 x i1> %evec
449 define <vscale x 4 x i8> @vfptosi_nxv4f16_nxv4i8(<vscale x 4 x half> %va) {
450 ; ZVFH-LABEL: vfptosi_nxv4f16_nxv4i8:
452 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
453 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v9, v8
454 ; ZVFH-NEXT: vmv1r.v v8, v9
457 ; ZVFHMIN-LABEL: vfptosi_nxv4f16_nxv4i8:
459 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
460 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
461 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v10
462 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf2, ta, ma
463 ; ZVFHMIN-NEXT: vnsrl.wi v8, v8, 0
465 %evec = fptosi <vscale x 4 x half> %va to <vscale x 4 x i8>
466 ret <vscale x 4 x i8> %evec
469 define <vscale x 4 x i8> @vfptoui_nxv4f16_nxv4i8(<vscale x 4 x half> %va) {
470 ; ZVFH-LABEL: vfptoui_nxv4f16_nxv4i8:
472 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
473 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v9, v8
474 ; ZVFH-NEXT: vmv1r.v v8, v9
477 ; ZVFHMIN-LABEL: vfptoui_nxv4f16_nxv4i8:
479 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
480 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
481 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v10
482 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf2, ta, ma
483 ; ZVFHMIN-NEXT: vnsrl.wi v8, v8, 0
485 %evec = fptoui <vscale x 4 x half> %va to <vscale x 4 x i8>
486 ret <vscale x 4 x i8> %evec
489 define <vscale x 4 x i16> @vfptosi_nxv4f16_nxv4i16(<vscale x 4 x half> %va) {
490 ; ZVFH-LABEL: vfptosi_nxv4f16_nxv4i16:
492 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
493 ; ZVFH-NEXT: vfcvt.rtz.x.f.v v8, v8
496 ; ZVFHMIN-LABEL: vfptosi_nxv4f16_nxv4i16:
498 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
499 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
500 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v10
502 %evec = fptosi <vscale x 4 x half> %va to <vscale x 4 x i16>
503 ret <vscale x 4 x i16> %evec
506 define <vscale x 4 x i16> @vfptoui_nxv4f16_nxv4i16(<vscale x 4 x half> %va) {
507 ; ZVFH-LABEL: vfptoui_nxv4f16_nxv4i16:
509 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
510 ; ZVFH-NEXT: vfcvt.rtz.xu.f.v v8, v8
513 ; ZVFHMIN-LABEL: vfptoui_nxv4f16_nxv4i16:
515 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
516 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
517 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v10
519 %evec = fptoui <vscale x 4 x half> %va to <vscale x 4 x i16>
520 ret <vscale x 4 x i16> %evec
523 define <vscale x 4 x i32> @vfptosi_nxv4f16_nxv4i32(<vscale x 4 x half> %va) {
524 ; ZVFH-LABEL: vfptosi_nxv4f16_nxv4i32:
526 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
527 ; ZVFH-NEXT: vfwcvt.rtz.x.f.v v10, v8
528 ; ZVFH-NEXT: vmv2r.v v8, v10
531 ; ZVFHMIN-LABEL: vfptosi_nxv4f16_nxv4i32:
533 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
534 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
535 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
536 ; ZVFHMIN-NEXT: vfcvt.rtz.x.f.v v8, v10
538 %evec = fptosi <vscale x 4 x half> %va to <vscale x 4 x i32>
539 ret <vscale x 4 x i32> %evec
542 define <vscale x 4 x i32> @vfptoui_nxv4f16_nxv4i32(<vscale x 4 x half> %va) {
543 ; ZVFH-LABEL: vfptoui_nxv4f16_nxv4i32:
545 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
546 ; ZVFH-NEXT: vfwcvt.rtz.xu.f.v v10, v8
547 ; ZVFH-NEXT: vmv2r.v v8, v10
550 ; ZVFHMIN-LABEL: vfptoui_nxv4f16_nxv4i32:
552 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
553 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
554 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
555 ; ZVFHMIN-NEXT: vfcvt.rtz.xu.f.v v8, v10
557 %evec = fptoui <vscale x 4 x half> %va to <vscale x 4 x i32>
558 ret <vscale x 4 x i32> %evec
561 define <vscale x 4 x i64> @vfptosi_nxv4f16_nxv4i64(<vscale x 4 x half> %va) {
562 ; CHECK-LABEL: vfptosi_nxv4f16_nxv4i64:
564 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
565 ; CHECK-NEXT: vfwcvt.f.f.v v12, v8
566 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
567 ; CHECK-NEXT: vfwcvt.rtz.x.f.v v8, v12
569 %evec = fptosi <vscale x 4 x half> %va to <vscale x 4 x i64>
570 ret <vscale x 4 x i64> %evec
573 define <vscale x 4 x i64> @vfptoui_nxv4f16_nxv4i64(<vscale x 4 x half> %va) {
574 ; CHECK-LABEL: vfptoui_nxv4f16_nxv4i64:
576 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
577 ; CHECK-NEXT: vfwcvt.f.f.v v12, v8
578 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
579 ; CHECK-NEXT: vfwcvt.rtz.xu.f.v v8, v12
581 %evec = fptoui <vscale x 4 x half> %va to <vscale x 4 x i64>
582 ret <vscale x 4 x i64> %evec
585 define <vscale x 8 x i1> @vfptosi_nxv8f16_nxv8i1(<vscale x 8 x half> %va) {
586 ; ZVFH-LABEL: vfptosi_nxv8f16_nxv8i1:
588 ; ZVFH-NEXT: vsetvli a0, zero, e8, m1, ta, ma
589 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v10, v8
590 ; ZVFH-NEXT: vand.vi v8, v10, 1
591 ; ZVFH-NEXT: vmsne.vi v0, v8, 0
594 ; ZVFHMIN-LABEL: vfptosi_nxv8f16_nxv8i1:
596 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
597 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
598 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v12
599 ; ZVFHMIN-NEXT: vand.vi v8, v8, 1
600 ; ZVFHMIN-NEXT: vmsne.vi v0, v8, 0
602 %evec = fptosi <vscale x 8 x half> %va to <vscale x 8 x i1>
603 ret <vscale x 8 x i1> %evec
606 define <vscale x 8 x i1> @vfptoui_nxv8f16_nxv8i1(<vscale x 8 x half> %va) {
607 ; ZVFH-LABEL: vfptoui_nxv8f16_nxv8i1:
609 ; ZVFH-NEXT: vsetvli a0, zero, e8, m1, ta, ma
610 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v10, v8
611 ; ZVFH-NEXT: vand.vi v8, v10, 1
612 ; ZVFH-NEXT: vmsne.vi v0, v8, 0
615 ; ZVFHMIN-LABEL: vfptoui_nxv8f16_nxv8i1:
617 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
618 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
619 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v12
620 ; ZVFHMIN-NEXT: vand.vi v8, v8, 1
621 ; ZVFHMIN-NEXT: vmsne.vi v0, v8, 0
623 %evec = fptoui <vscale x 8 x half> %va to <vscale x 8 x i1>
624 ret <vscale x 8 x i1> %evec
627 define <vscale x 8 x i8> @vfptosi_nxv8f16_nxv8i8(<vscale x 8 x half> %va) {
628 ; ZVFH-LABEL: vfptosi_nxv8f16_nxv8i8:
630 ; ZVFH-NEXT: vsetvli a0, zero, e8, m1, ta, ma
631 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v10, v8
632 ; ZVFH-NEXT: vmv.v.v v8, v10
635 ; ZVFHMIN-LABEL: vfptosi_nxv8f16_nxv8i8:
637 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
638 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
639 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v10, v12
640 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, m1, ta, ma
641 ; ZVFHMIN-NEXT: vnsrl.wi v8, v10, 0
643 %evec = fptosi <vscale x 8 x half> %va to <vscale x 8 x i8>
644 ret <vscale x 8 x i8> %evec
647 define <vscale x 8 x i8> @vfptoui_nxv8f16_nxv8i8(<vscale x 8 x half> %va) {
648 ; ZVFH-LABEL: vfptoui_nxv8f16_nxv8i8:
650 ; ZVFH-NEXT: vsetvli a0, zero, e8, m1, ta, ma
651 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v10, v8
652 ; ZVFH-NEXT: vmv.v.v v8, v10
655 ; ZVFHMIN-LABEL: vfptoui_nxv8f16_nxv8i8:
657 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
658 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
659 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v10, v12
660 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, m1, ta, ma
661 ; ZVFHMIN-NEXT: vnsrl.wi v8, v10, 0
663 %evec = fptoui <vscale x 8 x half> %va to <vscale x 8 x i8>
664 ret <vscale x 8 x i8> %evec
667 define <vscale x 8 x i16> @vfptosi_nxv8f16_nxv8i16(<vscale x 8 x half> %va) {
668 ; ZVFH-LABEL: vfptosi_nxv8f16_nxv8i16:
670 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
671 ; ZVFH-NEXT: vfcvt.rtz.x.f.v v8, v8
674 ; ZVFHMIN-LABEL: vfptosi_nxv8f16_nxv8i16:
676 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
677 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
678 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v12
680 %evec = fptosi <vscale x 8 x half> %va to <vscale x 8 x i16>
681 ret <vscale x 8 x i16> %evec
684 define <vscale x 8 x i16> @vfptoui_nxv8f16_nxv8i16(<vscale x 8 x half> %va) {
685 ; ZVFH-LABEL: vfptoui_nxv8f16_nxv8i16:
687 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
688 ; ZVFH-NEXT: vfcvt.rtz.xu.f.v v8, v8
691 ; ZVFHMIN-LABEL: vfptoui_nxv8f16_nxv8i16:
693 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
694 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
695 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v12
697 %evec = fptoui <vscale x 8 x half> %va to <vscale x 8 x i16>
698 ret <vscale x 8 x i16> %evec
701 define <vscale x 8 x i32> @vfptosi_nxv8f16_nxv8i32(<vscale x 8 x half> %va) {
702 ; ZVFH-LABEL: vfptosi_nxv8f16_nxv8i32:
704 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
705 ; ZVFH-NEXT: vfwcvt.rtz.x.f.v v12, v8
706 ; ZVFH-NEXT: vmv4r.v v8, v12
709 ; ZVFHMIN-LABEL: vfptosi_nxv8f16_nxv8i32:
711 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
712 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
713 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
714 ; ZVFHMIN-NEXT: vfcvt.rtz.x.f.v v8, v12
716 %evec = fptosi <vscale x 8 x half> %va to <vscale x 8 x i32>
717 ret <vscale x 8 x i32> %evec
720 define <vscale x 8 x i32> @vfptoui_nxv8f16_nxv8i32(<vscale x 8 x half> %va) {
721 ; ZVFH-LABEL: vfptoui_nxv8f16_nxv8i32:
723 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
724 ; ZVFH-NEXT: vfwcvt.rtz.xu.f.v v12, v8
725 ; ZVFH-NEXT: vmv4r.v v8, v12
728 ; ZVFHMIN-LABEL: vfptoui_nxv8f16_nxv8i32:
730 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
731 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
732 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
733 ; ZVFHMIN-NEXT: vfcvt.rtz.xu.f.v v8, v12
735 %evec = fptoui <vscale x 8 x half> %va to <vscale x 8 x i32>
736 ret <vscale x 8 x i32> %evec
739 define <vscale x 8 x i64> @vfptosi_nxv8f16_nxv8i64(<vscale x 8 x half> %va) {
740 ; CHECK-LABEL: vfptosi_nxv8f16_nxv8i64:
742 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
743 ; CHECK-NEXT: vfwcvt.f.f.v v16, v8
744 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, ma
745 ; CHECK-NEXT: vfwcvt.rtz.x.f.v v8, v16
747 %evec = fptosi <vscale x 8 x half> %va to <vscale x 8 x i64>
748 ret <vscale x 8 x i64> %evec
751 define <vscale x 8 x i64> @vfptoui_nxv8f16_nxv8i64(<vscale x 8 x half> %va) {
752 ; CHECK-LABEL: vfptoui_nxv8f16_nxv8i64:
754 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
755 ; CHECK-NEXT: vfwcvt.f.f.v v16, v8
756 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, ma
757 ; CHECK-NEXT: vfwcvt.rtz.xu.f.v v8, v16
759 %evec = fptoui <vscale x 8 x half> %va to <vscale x 8 x i64>
760 ret <vscale x 8 x i64> %evec
763 define <vscale x 16 x i1> @vfptosi_nxv16f16_nxv16i1(<vscale x 16 x half> %va) {
764 ; ZVFH-LABEL: vfptosi_nxv16f16_nxv16i1:
766 ; ZVFH-NEXT: vsetvli a0, zero, e8, m2, ta, ma
767 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v12, v8
768 ; ZVFH-NEXT: vand.vi v8, v12, 1
769 ; ZVFH-NEXT: vmsne.vi v0, v8, 0
772 ; ZVFHMIN-LABEL: vfptosi_nxv16f16_nxv16i1:
774 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
775 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
776 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v16
777 ; ZVFHMIN-NEXT: vand.vi v8, v8, 1
778 ; ZVFHMIN-NEXT: vmsne.vi v0, v8, 0
780 %evec = fptosi <vscale x 16 x half> %va to <vscale x 16 x i1>
781 ret <vscale x 16 x i1> %evec
784 define <vscale x 16 x i1> @vfptoui_nxv16f16_nxv16i1(<vscale x 16 x half> %va) {
785 ; ZVFH-LABEL: vfptoui_nxv16f16_nxv16i1:
787 ; ZVFH-NEXT: vsetvli a0, zero, e8, m2, ta, ma
788 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v12, v8
789 ; ZVFH-NEXT: vand.vi v8, v12, 1
790 ; ZVFH-NEXT: vmsne.vi v0, v8, 0
793 ; ZVFHMIN-LABEL: vfptoui_nxv16f16_nxv16i1:
795 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
796 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
797 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v16
798 ; ZVFHMIN-NEXT: vand.vi v8, v8, 1
799 ; ZVFHMIN-NEXT: vmsne.vi v0, v8, 0
801 %evec = fptoui <vscale x 16 x half> %va to <vscale x 16 x i1>
802 ret <vscale x 16 x i1> %evec
805 define <vscale x 16 x i8> @vfptosi_nxv16f16_nxv16i8(<vscale x 16 x half> %va) {
806 ; ZVFH-LABEL: vfptosi_nxv16f16_nxv16i8:
808 ; ZVFH-NEXT: vsetvli a0, zero, e8, m2, ta, ma
809 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v12, v8
810 ; ZVFH-NEXT: vmv.v.v v8, v12
813 ; ZVFHMIN-LABEL: vfptosi_nxv16f16_nxv16i8:
815 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
816 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
817 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v12, v16
818 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, m2, ta, ma
819 ; ZVFHMIN-NEXT: vnsrl.wi v8, v12, 0
821 %evec = fptosi <vscale x 16 x half> %va to <vscale x 16 x i8>
822 ret <vscale x 16 x i8> %evec
825 define <vscale x 16 x i8> @vfptoui_nxv16f16_nxv16i8(<vscale x 16 x half> %va) {
826 ; ZVFH-LABEL: vfptoui_nxv16f16_nxv16i8:
828 ; ZVFH-NEXT: vsetvli a0, zero, e8, m2, ta, ma
829 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v12, v8
830 ; ZVFH-NEXT: vmv.v.v v8, v12
833 ; ZVFHMIN-LABEL: vfptoui_nxv16f16_nxv16i8:
835 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
836 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
837 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v12, v16
838 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, m2, ta, ma
839 ; ZVFHMIN-NEXT: vnsrl.wi v8, v12, 0
841 %evec = fptoui <vscale x 16 x half> %va to <vscale x 16 x i8>
842 ret <vscale x 16 x i8> %evec
845 define <vscale x 16 x i16> @vfptosi_nxv16f16_nxv16i16(<vscale x 16 x half> %va) {
846 ; ZVFH-LABEL: vfptosi_nxv16f16_nxv16i16:
848 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
849 ; ZVFH-NEXT: vfcvt.rtz.x.f.v v8, v8
852 ; ZVFHMIN-LABEL: vfptosi_nxv16f16_nxv16i16:
854 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
855 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
856 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v16
858 %evec = fptosi <vscale x 16 x half> %va to <vscale x 16 x i16>
859 ret <vscale x 16 x i16> %evec
862 define <vscale x 16 x i16> @vfptoui_nxv16f16_nxv16i16(<vscale x 16 x half> %va) {
863 ; ZVFH-LABEL: vfptoui_nxv16f16_nxv16i16:
865 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
866 ; ZVFH-NEXT: vfcvt.rtz.xu.f.v v8, v8
869 ; ZVFHMIN-LABEL: vfptoui_nxv16f16_nxv16i16:
871 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
872 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
873 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v16
875 %evec = fptoui <vscale x 16 x half> %va to <vscale x 16 x i16>
876 ret <vscale x 16 x i16> %evec
879 define <vscale x 16 x i32> @vfptosi_nxv16f16_nxv16i32(<vscale x 16 x half> %va) {
880 ; ZVFH-LABEL: vfptosi_nxv16f16_nxv16i32:
882 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
883 ; ZVFH-NEXT: vfwcvt.rtz.x.f.v v16, v8
884 ; ZVFH-NEXT: vmv8r.v v8, v16
887 ; ZVFHMIN-LABEL: vfptosi_nxv16f16_nxv16i32:
889 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
890 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
891 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
892 ; ZVFHMIN-NEXT: vfcvt.rtz.x.f.v v8, v16
894 %evec = fptosi <vscale x 16 x half> %va to <vscale x 16 x i32>
895 ret <vscale x 16 x i32> %evec
898 define <vscale x 16 x i32> @vfptoui_nxv16f16_nxv16i32(<vscale x 16 x half> %va) {
899 ; ZVFH-LABEL: vfptoui_nxv16f16_nxv16i32:
901 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
902 ; ZVFH-NEXT: vfwcvt.rtz.xu.f.v v16, v8
903 ; ZVFH-NEXT: vmv8r.v v8, v16
906 ; ZVFHMIN-LABEL: vfptoui_nxv16f16_nxv16i32:
908 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
909 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
910 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
911 ; ZVFHMIN-NEXT: vfcvt.rtz.xu.f.v v8, v16
913 %evec = fptoui <vscale x 16 x half> %va to <vscale x 16 x i32>
914 ret <vscale x 16 x i32> %evec
917 define <vscale x 32 x i1> @vfptosi_nxv32f16_nxv32i1(<vscale x 32 x half> %va) {
918 ; ZVFH-LABEL: vfptosi_nxv32f16_nxv32i1:
920 ; ZVFH-NEXT: vsetvli a0, zero, e8, m4, ta, ma
921 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v16, v8
922 ; ZVFH-NEXT: vand.vi v8, v16, 1
923 ; ZVFH-NEXT: vmsne.vi v0, v8, 0
926 ; ZVFHMIN-LABEL: vfptosi_nxv32f16_nxv32i1:
928 ; ZVFHMIN-NEXT: csrr a0, vlenb
929 ; ZVFHMIN-NEXT: srli a0, a0, 2
930 ; ZVFHMIN-NEXT: add a1, a0, a0
931 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
932 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
933 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v12, v16
934 ; ZVFHMIN-NEXT: vand.vi v12, v12, 1
935 ; ZVFHMIN-NEXT: vmsne.vi v16, v12, 0
936 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
937 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v24
938 ; ZVFHMIN-NEXT: vand.vi v8, v8, 1
939 ; ZVFHMIN-NEXT: vmsne.vi v0, v8, 0
940 ; ZVFHMIN-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
941 ; ZVFHMIN-NEXT: vslideup.vx v0, v16, a0
943 %evec = fptosi <vscale x 32 x half> %va to <vscale x 32 x i1>
944 ret <vscale x 32 x i1> %evec
947 define <vscale x 32 x i1> @vfptoui_nxv32f16_nxv32i1(<vscale x 32 x half> %va) {
948 ; ZVFH-LABEL: vfptoui_nxv32f16_nxv32i1:
950 ; ZVFH-NEXT: vsetvli a0, zero, e8, m4, ta, ma
951 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v16, v8
952 ; ZVFH-NEXT: vand.vi v8, v16, 1
953 ; ZVFH-NEXT: vmsne.vi v0, v8, 0
956 ; ZVFHMIN-LABEL: vfptoui_nxv32f16_nxv32i1:
958 ; ZVFHMIN-NEXT: csrr a0, vlenb
959 ; ZVFHMIN-NEXT: srli a0, a0, 2
960 ; ZVFHMIN-NEXT: add a1, a0, a0
961 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
962 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
963 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v12, v16
964 ; ZVFHMIN-NEXT: vand.vi v12, v12, 1
965 ; ZVFHMIN-NEXT: vmsne.vi v16, v12, 0
966 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
967 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v24
968 ; ZVFHMIN-NEXT: vand.vi v8, v8, 1
969 ; ZVFHMIN-NEXT: vmsne.vi v0, v8, 0
970 ; ZVFHMIN-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
971 ; ZVFHMIN-NEXT: vslideup.vx v0, v16, a0
973 %evec = fptoui <vscale x 32 x half> %va to <vscale x 32 x i1>
974 ret <vscale x 32 x i1> %evec
977 define <vscale x 32 x i8> @vfptosi_nxv32f16_nxv32i8(<vscale x 32 x half> %va) {
978 ; ZVFH-LABEL: vfptosi_nxv32f16_nxv32i8:
980 ; ZVFH-NEXT: vsetvli a0, zero, e8, m4, ta, ma
981 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v16, v8
982 ; ZVFH-NEXT: vmv.v.v v8, v16
985 ; ZVFHMIN-LABEL: vfptosi_nxv32f16_nxv32i8:
987 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
988 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
989 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v24, v16
990 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, m2, ta, ma
991 ; ZVFHMIN-NEXT: vnsrl.wi v8, v24, 0
992 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
993 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
994 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v12, v16
995 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, m2, ta, ma
996 ; ZVFHMIN-NEXT: vnsrl.wi v10, v12, 0
998 %evec = fptosi <vscale x 32 x half> %va to <vscale x 32 x i8>
999 ret <vscale x 32 x i8> %evec
1002 define <vscale x 32 x i8> @vfptoui_nxv32f16_nxv32i8(<vscale x 32 x half> %va) {
1003 ; ZVFH-LABEL: vfptoui_nxv32f16_nxv32i8:
1005 ; ZVFH-NEXT: vsetvli a0, zero, e8, m4, ta, ma
1006 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v16, v8
1007 ; ZVFH-NEXT: vmv.v.v v8, v16
1010 ; ZVFHMIN-LABEL: vfptoui_nxv32f16_nxv32i8:
1012 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1013 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
1014 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v24, v16
1015 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, m2, ta, ma
1016 ; ZVFHMIN-NEXT: vnsrl.wi v8, v24, 0
1017 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1018 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
1019 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v12, v16
1020 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, m2, ta, ma
1021 ; ZVFHMIN-NEXT: vnsrl.wi v10, v12, 0
1023 %evec = fptoui <vscale x 32 x half> %va to <vscale x 32 x i8>
1024 ret <vscale x 32 x i8> %evec
1027 define <vscale x 32 x i16> @vfptosi_nxv32f16_nxv32i16(<vscale x 32 x half> %va) {
1028 ; ZVFH-LABEL: vfptosi_nxv32f16_nxv32i16:
1030 ; ZVFH-NEXT: vsetvli a0, zero, e16, m8, ta, ma
1031 ; ZVFH-NEXT: vfcvt.rtz.x.f.v v8, v8
1034 ; ZVFHMIN-LABEL: vfptosi_nxv32f16_nxv32i16:
1036 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1037 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
1038 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v16
1039 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
1040 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v12, v16
1042 %evec = fptosi <vscale x 32 x half> %va to <vscale x 32 x i16>
1043 ret <vscale x 32 x i16> %evec
1046 define <vscale x 32 x i16> @vfptoui_nxv32f16_nxv32i16(<vscale x 32 x half> %va) {
1047 ; ZVFH-LABEL: vfptoui_nxv32f16_nxv32i16:
1049 ; ZVFH-NEXT: vsetvli a0, zero, e16, m8, ta, ma
1050 ; ZVFH-NEXT: vfcvt.rtz.xu.f.v v8, v8
1053 ; ZVFHMIN-LABEL: vfptoui_nxv32f16_nxv32i16:
1055 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1056 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
1057 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v16
1058 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
1059 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v12, v16
1061 %evec = fptoui <vscale x 32 x half> %va to <vscale x 32 x i16>
1062 ret <vscale x 32 x i16> %evec
1065 define <vscale x 1 x i1> @vfptosi_nxv1f32_nxv1i1(<vscale x 1 x float> %va) {
1066 ; CHECK-LABEL: vfptosi_nxv1f32_nxv1i1:
1068 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1069 ; CHECK-NEXT: vfncvt.rtz.x.f.w v9, v8
1070 ; CHECK-NEXT: vand.vi v8, v9, 1
1071 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1073 %evec = fptosi <vscale x 1 x float> %va to <vscale x 1 x i1>
1074 ret <vscale x 1 x i1> %evec
1077 define <vscale x 1 x i1> @vfptoui_nxv1f32_nxv1i1(<vscale x 1 x float> %va) {
1078 ; CHECK-LABEL: vfptoui_nxv1f32_nxv1i1:
1080 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1081 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8
1082 ; CHECK-NEXT: vand.vi v8, v9, 1
1083 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1085 %evec = fptoui <vscale x 1 x float> %va to <vscale x 1 x i1>
1086 ret <vscale x 1 x i1> %evec
1089 define <vscale x 1 x i8> @vfptosi_nxv1f32_nxv1i8(<vscale x 1 x float> %va) {
1090 ; CHECK-LABEL: vfptosi_nxv1f32_nxv1i8:
1092 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1093 ; CHECK-NEXT: vfncvt.rtz.x.f.w v9, v8
1094 ; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
1095 ; CHECK-NEXT: vnsrl.wi v8, v9, 0
1097 %evec = fptosi <vscale x 1 x float> %va to <vscale x 1 x i8>
1098 ret <vscale x 1 x i8> %evec
1101 define <vscale x 1 x i8> @vfptoui_nxv1f32_nxv1i8(<vscale x 1 x float> %va) {
1102 ; CHECK-LABEL: vfptoui_nxv1f32_nxv1i8:
1104 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1105 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8
1106 ; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
1107 ; CHECK-NEXT: vnsrl.wi v8, v9, 0
1109 %evec = fptoui <vscale x 1 x float> %va to <vscale x 1 x i8>
1110 ret <vscale x 1 x i8> %evec
1113 define <vscale x 1 x i16> @vfptosi_nxv1f32_nxv1i16(<vscale x 1 x float> %va) {
1114 ; CHECK-LABEL: vfptosi_nxv1f32_nxv1i16:
1116 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1117 ; CHECK-NEXT: vfncvt.rtz.x.f.w v9, v8
1118 ; CHECK-NEXT: vmv1r.v v8, v9
1120 %evec = fptosi <vscale x 1 x float> %va to <vscale x 1 x i16>
1121 ret <vscale x 1 x i16> %evec
1124 define <vscale x 1 x i16> @vfptoui_nxv1f32_nxv1i16(<vscale x 1 x float> %va) {
1125 ; CHECK-LABEL: vfptoui_nxv1f32_nxv1i16:
1127 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1128 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8
1129 ; CHECK-NEXT: vmv1r.v v8, v9
1131 %evec = fptoui <vscale x 1 x float> %va to <vscale x 1 x i16>
1132 ret <vscale x 1 x i16> %evec
1135 define <vscale x 1 x i32> @vfptosi_nxv1f32_nxv1i32(<vscale x 1 x float> %va) {
1136 ; CHECK-LABEL: vfptosi_nxv1f32_nxv1i32:
1138 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1139 ; CHECK-NEXT: vfcvt.rtz.x.f.v v8, v8
1141 %evec = fptosi <vscale x 1 x float> %va to <vscale x 1 x i32>
1142 ret <vscale x 1 x i32> %evec
1145 define <vscale x 1 x i32> @vfptoui_nxv1f32_nxv1i32(<vscale x 1 x float> %va) {
1146 ; CHECK-LABEL: vfptoui_nxv1f32_nxv1i32:
1148 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1149 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8
1151 %evec = fptoui <vscale x 1 x float> %va to <vscale x 1 x i32>
1152 ret <vscale x 1 x i32> %evec
1155 define <vscale x 1 x i64> @vfptosi_nxv1f32_nxv1i64(<vscale x 1 x float> %va) {
1156 ; CHECK-LABEL: vfptosi_nxv1f32_nxv1i64:
1158 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1159 ; CHECK-NEXT: vfwcvt.rtz.x.f.v v9, v8
1160 ; CHECK-NEXT: vmv1r.v v8, v9
1162 %evec = fptosi <vscale x 1 x float> %va to <vscale x 1 x i64>
1163 ret <vscale x 1 x i64> %evec
1166 define <vscale x 1 x i64> @vfptoui_nxv1f32_nxv1i64(<vscale x 1 x float> %va) {
1167 ; CHECK-LABEL: vfptoui_nxv1f32_nxv1i64:
1169 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1170 ; CHECK-NEXT: vfwcvt.rtz.xu.f.v v9, v8
1171 ; CHECK-NEXT: vmv1r.v v8, v9
1173 %evec = fptoui <vscale x 1 x float> %va to <vscale x 1 x i64>
1174 ret <vscale x 1 x i64> %evec
1177 define <vscale x 2 x i1> @vfptosi_nxv2f32_nxv2i1(<vscale x 2 x float> %va) {
1178 ; CHECK-LABEL: vfptosi_nxv2f32_nxv2i1:
1180 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1181 ; CHECK-NEXT: vfncvt.rtz.x.f.w v9, v8
1182 ; CHECK-NEXT: vand.vi v8, v9, 1
1183 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1185 %evec = fptosi <vscale x 2 x float> %va to <vscale x 2 x i1>
1186 ret <vscale x 2 x i1> %evec
1189 define <vscale x 2 x i1> @vfptoui_nxv2f32_nxv2i1(<vscale x 2 x float> %va) {
1190 ; CHECK-LABEL: vfptoui_nxv2f32_nxv2i1:
1192 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1193 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8
1194 ; CHECK-NEXT: vand.vi v8, v9, 1
1195 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1197 %evec = fptoui <vscale x 2 x float> %va to <vscale x 2 x i1>
1198 ret <vscale x 2 x i1> %evec
1201 define <vscale x 2 x i8> @vfptosi_nxv2f32_nxv2i8(<vscale x 2 x float> %va) {
1202 ; CHECK-LABEL: vfptosi_nxv2f32_nxv2i8:
1204 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1205 ; CHECK-NEXT: vfncvt.rtz.x.f.w v9, v8
1206 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
1207 ; CHECK-NEXT: vnsrl.wi v8, v9, 0
1209 %evec = fptosi <vscale x 2 x float> %va to <vscale x 2 x i8>
1210 ret <vscale x 2 x i8> %evec
1213 define <vscale x 2 x i8> @vfptoui_nxv2f32_nxv2i8(<vscale x 2 x float> %va) {
1214 ; CHECK-LABEL: vfptoui_nxv2f32_nxv2i8:
1216 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1217 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8
1218 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
1219 ; CHECK-NEXT: vnsrl.wi v8, v9, 0
1221 %evec = fptoui <vscale x 2 x float> %va to <vscale x 2 x i8>
1222 ret <vscale x 2 x i8> %evec
1225 define <vscale x 2 x i16> @vfptosi_nxv2f32_nxv2i16(<vscale x 2 x float> %va) {
1226 ; CHECK-LABEL: vfptosi_nxv2f32_nxv2i16:
1228 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1229 ; CHECK-NEXT: vfncvt.rtz.x.f.w v9, v8
1230 ; CHECK-NEXT: vmv1r.v v8, v9
1232 %evec = fptosi <vscale x 2 x float> %va to <vscale x 2 x i16>
1233 ret <vscale x 2 x i16> %evec
1236 define <vscale x 2 x i16> @vfptoui_nxv2f32_nxv2i16(<vscale x 2 x float> %va) {
1237 ; CHECK-LABEL: vfptoui_nxv2f32_nxv2i16:
1239 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1240 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8
1241 ; CHECK-NEXT: vmv1r.v v8, v9
1243 %evec = fptoui <vscale x 2 x float> %va to <vscale x 2 x i16>
1244 ret <vscale x 2 x i16> %evec
1247 define <vscale x 2 x i32> @vfptosi_nxv2f32_nxv2i32(<vscale x 2 x float> %va) {
1248 ; CHECK-LABEL: vfptosi_nxv2f32_nxv2i32:
1250 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1251 ; CHECK-NEXT: vfcvt.rtz.x.f.v v8, v8
1253 %evec = fptosi <vscale x 2 x float> %va to <vscale x 2 x i32>
1254 ret <vscale x 2 x i32> %evec
1257 define <vscale x 2 x i32> @vfptoui_nxv2f32_nxv2i32(<vscale x 2 x float> %va) {
1258 ; CHECK-LABEL: vfptoui_nxv2f32_nxv2i32:
1260 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1261 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8
1263 %evec = fptoui <vscale x 2 x float> %va to <vscale x 2 x i32>
1264 ret <vscale x 2 x i32> %evec
1267 define <vscale x 2 x i64> @vfptosi_nxv2f32_nxv2i64(<vscale x 2 x float> %va) {
1268 ; CHECK-LABEL: vfptosi_nxv2f32_nxv2i64:
1270 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1271 ; CHECK-NEXT: vfwcvt.rtz.x.f.v v10, v8
1272 ; CHECK-NEXT: vmv2r.v v8, v10
1274 %evec = fptosi <vscale x 2 x float> %va to <vscale x 2 x i64>
1275 ret <vscale x 2 x i64> %evec
1278 define <vscale x 2 x i64> @vfptoui_nxv2f32_nxv2i64(<vscale x 2 x float> %va) {
1279 ; CHECK-LABEL: vfptoui_nxv2f32_nxv2i64:
1281 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1282 ; CHECK-NEXT: vfwcvt.rtz.xu.f.v v10, v8
1283 ; CHECK-NEXT: vmv2r.v v8, v10
1285 %evec = fptoui <vscale x 2 x float> %va to <vscale x 2 x i64>
1286 ret <vscale x 2 x i64> %evec
1289 define <vscale x 4 x i1> @vfptosi_nxv4f32_nxv4i1(<vscale x 4 x float> %va) {
1290 ; CHECK-LABEL: vfptosi_nxv4f32_nxv4i1:
1292 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1293 ; CHECK-NEXT: vfncvt.rtz.x.f.w v10, v8
1294 ; CHECK-NEXT: vand.vi v8, v10, 1
1295 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1297 %evec = fptosi <vscale x 4 x float> %va to <vscale x 4 x i1>
1298 ret <vscale x 4 x i1> %evec
1301 define <vscale x 4 x i1> @vfptoui_nxv4f32_nxv4i1(<vscale x 4 x float> %va) {
1302 ; CHECK-LABEL: vfptoui_nxv4f32_nxv4i1:
1304 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1305 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8
1306 ; CHECK-NEXT: vand.vi v8, v10, 1
1307 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1309 %evec = fptoui <vscale x 4 x float> %va to <vscale x 4 x i1>
1310 ret <vscale x 4 x i1> %evec
1313 define <vscale x 4 x i8> @vfptosi_nxv4f32_nxv4i8(<vscale x 4 x float> %va) {
1314 ; CHECK-LABEL: vfptosi_nxv4f32_nxv4i8:
1316 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1317 ; CHECK-NEXT: vfncvt.rtz.x.f.w v10, v8
1318 ; CHECK-NEXT: vsetvli zero, zero, e8, mf2, ta, ma
1319 ; CHECK-NEXT: vnsrl.wi v8, v10, 0
1321 %evec = fptosi <vscale x 4 x float> %va to <vscale x 4 x i8>
1322 ret <vscale x 4 x i8> %evec
1325 define <vscale x 4 x i8> @vfptoui_nxv4f32_nxv4i8(<vscale x 4 x float> %va) {
1326 ; CHECK-LABEL: vfptoui_nxv4f32_nxv4i8:
1328 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1329 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8
1330 ; CHECK-NEXT: vsetvli zero, zero, e8, mf2, ta, ma
1331 ; CHECK-NEXT: vnsrl.wi v8, v10, 0
1333 %evec = fptoui <vscale x 4 x float> %va to <vscale x 4 x i8>
1334 ret <vscale x 4 x i8> %evec
1337 define <vscale x 4 x i16> @vfptosi_nxv4f32_nxv4i16(<vscale x 4 x float> %va) {
1338 ; CHECK-LABEL: vfptosi_nxv4f32_nxv4i16:
1340 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1341 ; CHECK-NEXT: vfncvt.rtz.x.f.w v10, v8
1342 ; CHECK-NEXT: vmv.v.v v8, v10
1344 %evec = fptosi <vscale x 4 x float> %va to <vscale x 4 x i16>
1345 ret <vscale x 4 x i16> %evec
1348 define <vscale x 4 x i16> @vfptoui_nxv4f32_nxv4i16(<vscale x 4 x float> %va) {
1349 ; CHECK-LABEL: vfptoui_nxv4f32_nxv4i16:
1351 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1352 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8
1353 ; CHECK-NEXT: vmv.v.v v8, v10
1355 %evec = fptoui <vscale x 4 x float> %va to <vscale x 4 x i16>
1356 ret <vscale x 4 x i16> %evec
1359 define <vscale x 4 x i32> @vfptosi_nxv4f32_nxv4i32(<vscale x 4 x float> %va) {
1360 ; CHECK-LABEL: vfptosi_nxv4f32_nxv4i32:
1362 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1363 ; CHECK-NEXT: vfcvt.rtz.x.f.v v8, v8
1365 %evec = fptosi <vscale x 4 x float> %va to <vscale x 4 x i32>
1366 ret <vscale x 4 x i32> %evec
1369 define <vscale x 4 x i32> @vfptoui_nxv4f32_nxv4i32(<vscale x 4 x float> %va) {
1370 ; CHECK-LABEL: vfptoui_nxv4f32_nxv4i32:
1372 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1373 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8
1375 %evec = fptoui <vscale x 4 x float> %va to <vscale x 4 x i32>
1376 ret <vscale x 4 x i32> %evec
1379 define <vscale x 4 x i64> @vfptosi_nxv4f32_nxv4i64(<vscale x 4 x float> %va) {
1380 ; CHECK-LABEL: vfptosi_nxv4f32_nxv4i64:
1382 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1383 ; CHECK-NEXT: vfwcvt.rtz.x.f.v v12, v8
1384 ; CHECK-NEXT: vmv4r.v v8, v12
1386 %evec = fptosi <vscale x 4 x float> %va to <vscale x 4 x i64>
1387 ret <vscale x 4 x i64> %evec
1390 define <vscale x 4 x i64> @vfptoui_nxv4f32_nxv4i64(<vscale x 4 x float> %va) {
1391 ; CHECK-LABEL: vfptoui_nxv4f32_nxv4i64:
1393 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1394 ; CHECK-NEXT: vfwcvt.rtz.xu.f.v v12, v8
1395 ; CHECK-NEXT: vmv4r.v v8, v12
1397 %evec = fptoui <vscale x 4 x float> %va to <vscale x 4 x i64>
1398 ret <vscale x 4 x i64> %evec
1401 define <vscale x 8 x i1> @vfptosi_nxv8f32_nxv8i1(<vscale x 8 x float> %va) {
1402 ; CHECK-LABEL: vfptosi_nxv8f32_nxv8i1:
1404 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1405 ; CHECK-NEXT: vfncvt.rtz.x.f.w v12, v8
1406 ; CHECK-NEXT: vand.vi v8, v12, 1
1407 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1409 %evec = fptosi <vscale x 8 x float> %va to <vscale x 8 x i1>
1410 ret <vscale x 8 x i1> %evec
1413 define <vscale x 8 x i1> @vfptoui_nxv8f32_nxv8i1(<vscale x 8 x float> %va) {
1414 ; CHECK-LABEL: vfptoui_nxv8f32_nxv8i1:
1416 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1417 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v12, v8
1418 ; CHECK-NEXT: vand.vi v8, v12, 1
1419 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1421 %evec = fptoui <vscale x 8 x float> %va to <vscale x 8 x i1>
1422 ret <vscale x 8 x i1> %evec
1425 define <vscale x 8 x i8> @vfptosi_nxv8f32_nxv8i8(<vscale x 8 x float> %va) {
1426 ; CHECK-LABEL: vfptosi_nxv8f32_nxv8i8:
1428 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1429 ; CHECK-NEXT: vfncvt.rtz.x.f.w v12, v8
1430 ; CHECK-NEXT: vsetvli zero, zero, e8, m1, ta, ma
1431 ; CHECK-NEXT: vnsrl.wi v8, v12, 0
1433 %evec = fptosi <vscale x 8 x float> %va to <vscale x 8 x i8>
1434 ret <vscale x 8 x i8> %evec
1437 define <vscale x 8 x i8> @vfptoui_nxv8f32_nxv8i8(<vscale x 8 x float> %va) {
1438 ; CHECK-LABEL: vfptoui_nxv8f32_nxv8i8:
1440 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1441 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v12, v8
1442 ; CHECK-NEXT: vsetvli zero, zero, e8, m1, ta, ma
1443 ; CHECK-NEXT: vnsrl.wi v8, v12, 0
1445 %evec = fptoui <vscale x 8 x float> %va to <vscale x 8 x i8>
1446 ret <vscale x 8 x i8> %evec
1449 define <vscale x 8 x i16> @vfptosi_nxv8f32_nxv8i16(<vscale x 8 x float> %va) {
1450 ; CHECK-LABEL: vfptosi_nxv8f32_nxv8i16:
1452 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1453 ; CHECK-NEXT: vfncvt.rtz.x.f.w v12, v8
1454 ; CHECK-NEXT: vmv.v.v v8, v12
1456 %evec = fptosi <vscale x 8 x float> %va to <vscale x 8 x i16>
1457 ret <vscale x 8 x i16> %evec
1460 define <vscale x 8 x i16> @vfptoui_nxv8f32_nxv8i16(<vscale x 8 x float> %va) {
1461 ; CHECK-LABEL: vfptoui_nxv8f32_nxv8i16:
1463 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1464 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v12, v8
1465 ; CHECK-NEXT: vmv.v.v v8, v12
1467 %evec = fptoui <vscale x 8 x float> %va to <vscale x 8 x i16>
1468 ret <vscale x 8 x i16> %evec
1471 define <vscale x 8 x i32> @vfptosi_nxv8f32_nxv8i32(<vscale x 8 x float> %va) {
1472 ; CHECK-LABEL: vfptosi_nxv8f32_nxv8i32:
1474 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1475 ; CHECK-NEXT: vfcvt.rtz.x.f.v v8, v8
1477 %evec = fptosi <vscale x 8 x float> %va to <vscale x 8 x i32>
1478 ret <vscale x 8 x i32> %evec
1481 define <vscale x 8 x i32> @vfptoui_nxv8f32_nxv8i32(<vscale x 8 x float> %va) {
1482 ; CHECK-LABEL: vfptoui_nxv8f32_nxv8i32:
1484 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1485 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8
1487 %evec = fptoui <vscale x 8 x float> %va to <vscale x 8 x i32>
1488 ret <vscale x 8 x i32> %evec
1491 define <vscale x 8 x i64> @vfptosi_nxv8f32_nxv8i64(<vscale x 8 x float> %va) {
1492 ; CHECK-LABEL: vfptosi_nxv8f32_nxv8i64:
1494 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1495 ; CHECK-NEXT: vfwcvt.rtz.x.f.v v16, v8
1496 ; CHECK-NEXT: vmv8r.v v8, v16
1498 %evec = fptosi <vscale x 8 x float> %va to <vscale x 8 x i64>
1499 ret <vscale x 8 x i64> %evec
1502 define <vscale x 8 x i64> @vfptoui_nxv8f32_nxv8i64(<vscale x 8 x float> %va) {
1503 ; CHECK-LABEL: vfptoui_nxv8f32_nxv8i64:
1505 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1506 ; CHECK-NEXT: vfwcvt.rtz.xu.f.v v16, v8
1507 ; CHECK-NEXT: vmv8r.v v8, v16
1509 %evec = fptoui <vscale x 8 x float> %va to <vscale x 8 x i64>
1510 ret <vscale x 8 x i64> %evec
1513 define <vscale x 16 x i1> @vfptosi_nxv16f32_nxv16i1(<vscale x 16 x float> %va) {
1514 ; CHECK-LABEL: vfptosi_nxv16f32_nxv16i1:
1516 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1517 ; CHECK-NEXT: vfncvt.rtz.x.f.w v16, v8
1518 ; CHECK-NEXT: vand.vi v8, v16, 1
1519 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1521 %evec = fptosi <vscale x 16 x float> %va to <vscale x 16 x i1>
1522 ret <vscale x 16 x i1> %evec
1525 define <vscale x 16 x i1> @vfptoui_nxv16f32_nxv16i1(<vscale x 16 x float> %va) {
1526 ; CHECK-LABEL: vfptoui_nxv16f32_nxv16i1:
1528 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1529 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v16, v8
1530 ; CHECK-NEXT: vand.vi v8, v16, 1
1531 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1533 %evec = fptoui <vscale x 16 x float> %va to <vscale x 16 x i1>
1534 ret <vscale x 16 x i1> %evec
1537 define <vscale x 16 x i8> @vfptosi_nxv16f32_nxv16i8(<vscale x 16 x float> %va) {
1538 ; CHECK-LABEL: vfptosi_nxv16f32_nxv16i8:
1540 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1541 ; CHECK-NEXT: vfncvt.rtz.x.f.w v16, v8
1542 ; CHECK-NEXT: vsetvli zero, zero, e8, m2, ta, ma
1543 ; CHECK-NEXT: vnsrl.wi v8, v16, 0
1545 %evec = fptosi <vscale x 16 x float> %va to <vscale x 16 x i8>
1546 ret <vscale x 16 x i8> %evec
1549 define <vscale x 16 x i8> @vfptoui_nxv16f32_nxv16i8(<vscale x 16 x float> %va) {
1550 ; CHECK-LABEL: vfptoui_nxv16f32_nxv16i8:
1552 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1553 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v16, v8
1554 ; CHECK-NEXT: vsetvli zero, zero, e8, m2, ta, ma
1555 ; CHECK-NEXT: vnsrl.wi v8, v16, 0
1557 %evec = fptoui <vscale x 16 x float> %va to <vscale x 16 x i8>
1558 ret <vscale x 16 x i8> %evec
1561 define <vscale x 16 x i16> @vfptosi_nxv16f32_nxv16i16(<vscale x 16 x float> %va) {
1562 ; CHECK-LABEL: vfptosi_nxv16f32_nxv16i16:
1564 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1565 ; CHECK-NEXT: vfncvt.rtz.x.f.w v16, v8
1566 ; CHECK-NEXT: vmv.v.v v8, v16
1568 %evec = fptosi <vscale x 16 x float> %va to <vscale x 16 x i16>
1569 ret <vscale x 16 x i16> %evec
1572 define <vscale x 16 x i16> @vfptoui_nxv16f32_nxv16i16(<vscale x 16 x float> %va) {
1573 ; CHECK-LABEL: vfptoui_nxv16f32_nxv16i16:
1575 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1576 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v16, v8
1577 ; CHECK-NEXT: vmv.v.v v8, v16
1579 %evec = fptoui <vscale x 16 x float> %va to <vscale x 16 x i16>
1580 ret <vscale x 16 x i16> %evec
1583 define <vscale x 16 x i32> @vfptosi_nxv16f32_nxv16i32(<vscale x 16 x float> %va) {
1584 ; CHECK-LABEL: vfptosi_nxv16f32_nxv16i32:
1586 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1587 ; CHECK-NEXT: vfcvt.rtz.x.f.v v8, v8
1589 %evec = fptosi <vscale x 16 x float> %va to <vscale x 16 x i32>
1590 ret <vscale x 16 x i32> %evec
1593 define <vscale x 16 x i32> @vfptoui_nxv16f32_nxv16i32(<vscale x 16 x float> %va) {
1594 ; CHECK-LABEL: vfptoui_nxv16f32_nxv16i32:
1596 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1597 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8
1599 %evec = fptoui <vscale x 16 x float> %va to <vscale x 16 x i32>
1600 ret <vscale x 16 x i32> %evec
1603 define <vscale x 1 x i1> @vfptosi_nxv1f64_nxv1i1(<vscale x 1 x double> %va) {
1604 ; CHECK-LABEL: vfptosi_nxv1f64_nxv1i1:
1606 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1607 ; CHECK-NEXT: vfncvt.rtz.x.f.w v9, v8
1608 ; CHECK-NEXT: vand.vi v8, v9, 1
1609 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1611 %evec = fptosi <vscale x 1 x double> %va to <vscale x 1 x i1>
1612 ret <vscale x 1 x i1> %evec
1615 define <vscale x 1 x i1> @vfptoui_nxv1f64_nxv1i1(<vscale x 1 x double> %va) {
1616 ; CHECK-LABEL: vfptoui_nxv1f64_nxv1i1:
1618 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1619 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8
1620 ; CHECK-NEXT: vand.vi v8, v9, 1
1621 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1623 %evec = fptoui <vscale x 1 x double> %va to <vscale x 1 x i1>
1624 ret <vscale x 1 x i1> %evec
1627 define <vscale x 1 x i8> @vfptosi_nxv1f64_nxv1i8(<vscale x 1 x double> %va) {
1628 ; CHECK-LABEL: vfptosi_nxv1f64_nxv1i8:
1630 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1631 ; CHECK-NEXT: vfncvt.rtz.x.f.w v9, v8
1632 ; CHECK-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
1633 ; CHECK-NEXT: vnsrl.wi v8, v9, 0
1634 ; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
1635 ; CHECK-NEXT: vnsrl.wi v8, v8, 0
1637 %evec = fptosi <vscale x 1 x double> %va to <vscale x 1 x i8>
1638 ret <vscale x 1 x i8> %evec
1641 define <vscale x 1 x i8> @vfptoui_nxv1f64_nxv1i8(<vscale x 1 x double> %va) {
1642 ; CHECK-LABEL: vfptoui_nxv1f64_nxv1i8:
1644 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1645 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8
1646 ; CHECK-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
1647 ; CHECK-NEXT: vnsrl.wi v8, v9, 0
1648 ; CHECK-NEXT: vsetvli zero, zero, e8, mf8, ta, ma
1649 ; CHECK-NEXT: vnsrl.wi v8, v8, 0
1651 %evec = fptoui <vscale x 1 x double> %va to <vscale x 1 x i8>
1652 ret <vscale x 1 x i8> %evec
1655 define <vscale x 1 x i16> @vfptosi_nxv1f64_nxv1i16(<vscale x 1 x double> %va) {
1656 ; CHECK-LABEL: vfptosi_nxv1f64_nxv1i16:
1658 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1659 ; CHECK-NEXT: vfncvt.rtz.x.f.w v9, v8
1660 ; CHECK-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
1661 ; CHECK-NEXT: vnsrl.wi v8, v9, 0
1663 %evec = fptosi <vscale x 1 x double> %va to <vscale x 1 x i16>
1664 ret <vscale x 1 x i16> %evec
1667 define <vscale x 1 x i16> @vfptoui_nxv1f64_nxv1i16(<vscale x 1 x double> %va) {
1668 ; CHECK-LABEL: vfptoui_nxv1f64_nxv1i16:
1670 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1671 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8
1672 ; CHECK-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
1673 ; CHECK-NEXT: vnsrl.wi v8, v9, 0
1675 %evec = fptoui <vscale x 1 x double> %va to <vscale x 1 x i16>
1676 ret <vscale x 1 x i16> %evec
1679 define <vscale x 1 x i32> @vfptosi_nxv1f64_nxv1i32(<vscale x 1 x double> %va) {
1680 ; CHECK-LABEL: vfptosi_nxv1f64_nxv1i32:
1682 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1683 ; CHECK-NEXT: vfncvt.rtz.x.f.w v9, v8
1684 ; CHECK-NEXT: vmv1r.v v8, v9
1686 %evec = fptosi <vscale x 1 x double> %va to <vscale x 1 x i32>
1687 ret <vscale x 1 x i32> %evec
1690 define <vscale x 1 x i32> @vfptoui_nxv1f64_nxv1i32(<vscale x 1 x double> %va) {
1691 ; CHECK-LABEL: vfptoui_nxv1f64_nxv1i32:
1693 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1694 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8
1695 ; CHECK-NEXT: vmv1r.v v8, v9
1697 %evec = fptoui <vscale x 1 x double> %va to <vscale x 1 x i32>
1698 ret <vscale x 1 x i32> %evec
1701 define <vscale x 1 x i64> @vfptosi_nxv1f64_nxv1i64(<vscale x 1 x double> %va) {
1702 ; CHECK-LABEL: vfptosi_nxv1f64_nxv1i64:
1704 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1705 ; CHECK-NEXT: vfcvt.rtz.x.f.v v8, v8
1707 %evec = fptosi <vscale x 1 x double> %va to <vscale x 1 x i64>
1708 ret <vscale x 1 x i64> %evec
1711 define <vscale x 1 x i64> @vfptoui_nxv1f64_nxv1i64(<vscale x 1 x double> %va) {
1712 ; CHECK-LABEL: vfptoui_nxv1f64_nxv1i64:
1714 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1715 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8
1717 %evec = fptoui <vscale x 1 x double> %va to <vscale x 1 x i64>
1718 ret <vscale x 1 x i64> %evec
1721 define <vscale x 2 x i1> @vfptosi_nxv2f64_nxv2i1(<vscale x 2 x double> %va) {
1722 ; CHECK-LABEL: vfptosi_nxv2f64_nxv2i1:
1724 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1725 ; CHECK-NEXT: vfncvt.rtz.x.f.w v10, v8
1726 ; CHECK-NEXT: vand.vi v8, v10, 1
1727 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1729 %evec = fptosi <vscale x 2 x double> %va to <vscale x 2 x i1>
1730 ret <vscale x 2 x i1> %evec
1733 define <vscale x 2 x i1> @vfptoui_nxv2f64_nxv2i1(<vscale x 2 x double> %va) {
1734 ; CHECK-LABEL: vfptoui_nxv2f64_nxv2i1:
1736 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1737 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8
1738 ; CHECK-NEXT: vand.vi v8, v10, 1
1739 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1741 %evec = fptoui <vscale x 2 x double> %va to <vscale x 2 x i1>
1742 ret <vscale x 2 x i1> %evec
1745 define <vscale x 2 x i8> @vfptosi_nxv2f64_nxv2i8(<vscale x 2 x double> %va) {
1746 ; CHECK-LABEL: vfptosi_nxv2f64_nxv2i8:
1748 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1749 ; CHECK-NEXT: vfncvt.rtz.x.f.w v10, v8
1750 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
1751 ; CHECK-NEXT: vnsrl.wi v8, v10, 0
1752 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
1753 ; CHECK-NEXT: vnsrl.wi v8, v8, 0
1755 %evec = fptosi <vscale x 2 x double> %va to <vscale x 2 x i8>
1756 ret <vscale x 2 x i8> %evec
1759 define <vscale x 2 x i8> @vfptoui_nxv2f64_nxv2i8(<vscale x 2 x double> %va) {
1760 ; CHECK-LABEL: vfptoui_nxv2f64_nxv2i8:
1762 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1763 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8
1764 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
1765 ; CHECK-NEXT: vnsrl.wi v8, v10, 0
1766 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
1767 ; CHECK-NEXT: vnsrl.wi v8, v8, 0
1769 %evec = fptoui <vscale x 2 x double> %va to <vscale x 2 x i8>
1770 ret <vscale x 2 x i8> %evec
1773 define <vscale x 2 x i16> @vfptosi_nxv2f64_nxv2i16(<vscale x 2 x double> %va) {
1774 ; CHECK-LABEL: vfptosi_nxv2f64_nxv2i16:
1776 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1777 ; CHECK-NEXT: vfncvt.rtz.x.f.w v10, v8
1778 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
1779 ; CHECK-NEXT: vnsrl.wi v8, v10, 0
1781 %evec = fptosi <vscale x 2 x double> %va to <vscale x 2 x i16>
1782 ret <vscale x 2 x i16> %evec
1785 define <vscale x 2 x i16> @vfptoui_nxv2f64_nxv2i16(<vscale x 2 x double> %va) {
1786 ; CHECK-LABEL: vfptoui_nxv2f64_nxv2i16:
1788 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1789 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8
1790 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
1791 ; CHECK-NEXT: vnsrl.wi v8, v10, 0
1793 %evec = fptoui <vscale x 2 x double> %va to <vscale x 2 x i16>
1794 ret <vscale x 2 x i16> %evec
1797 define <vscale x 2 x i32> @vfptosi_nxv2f64_nxv2i32(<vscale x 2 x double> %va) {
1798 ; CHECK-LABEL: vfptosi_nxv2f64_nxv2i32:
1800 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1801 ; CHECK-NEXT: vfncvt.rtz.x.f.w v10, v8
1802 ; CHECK-NEXT: vmv.v.v v8, v10
1804 %evec = fptosi <vscale x 2 x double> %va to <vscale x 2 x i32>
1805 ret <vscale x 2 x i32> %evec
1808 define <vscale x 2 x i32> @vfptoui_nxv2f64_nxv2i32(<vscale x 2 x double> %va) {
1809 ; CHECK-LABEL: vfptoui_nxv2f64_nxv2i32:
1811 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1812 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8
1813 ; CHECK-NEXT: vmv.v.v v8, v10
1815 %evec = fptoui <vscale x 2 x double> %va to <vscale x 2 x i32>
1816 ret <vscale x 2 x i32> %evec
1819 define <vscale x 2 x i64> @vfptosi_nxv2f64_nxv2i64(<vscale x 2 x double> %va) {
1820 ; CHECK-LABEL: vfptosi_nxv2f64_nxv2i64:
1822 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1823 ; CHECK-NEXT: vfcvt.rtz.x.f.v v8, v8
1825 %evec = fptosi <vscale x 2 x double> %va to <vscale x 2 x i64>
1826 ret <vscale x 2 x i64> %evec
1829 define <vscale x 2 x i64> @vfptoui_nxv2f64_nxv2i64(<vscale x 2 x double> %va) {
1830 ; CHECK-LABEL: vfptoui_nxv2f64_nxv2i64:
1832 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1833 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8
1835 %evec = fptoui <vscale x 2 x double> %va to <vscale x 2 x i64>
1836 ret <vscale x 2 x i64> %evec
1839 define <vscale x 4 x i1> @vfptosi_nxv4f64_nxv4i1(<vscale x 4 x double> %va) {
1840 ; CHECK-LABEL: vfptosi_nxv4f64_nxv4i1:
1842 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1843 ; CHECK-NEXT: vfncvt.rtz.x.f.w v12, v8
1844 ; CHECK-NEXT: vand.vi v8, v12, 1
1845 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1847 %evec = fptosi <vscale x 4 x double> %va to <vscale x 4 x i1>
1848 ret <vscale x 4 x i1> %evec
1851 define <vscale x 4 x i1> @vfptoui_nxv4f64_nxv4i1(<vscale x 4 x double> %va) {
1852 ; CHECK-LABEL: vfptoui_nxv4f64_nxv4i1:
1854 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1855 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v12, v8
1856 ; CHECK-NEXT: vand.vi v8, v12, 1
1857 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1859 %evec = fptoui <vscale x 4 x double> %va to <vscale x 4 x i1>
1860 ret <vscale x 4 x i1> %evec
1863 define <vscale x 4 x i8> @vfptosi_nxv4f64_nxv4i8(<vscale x 4 x double> %va) {
1864 ; CHECK-LABEL: vfptosi_nxv4f64_nxv4i8:
1866 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1867 ; CHECK-NEXT: vfncvt.rtz.x.f.w v12, v8
1868 ; CHECK-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1869 ; CHECK-NEXT: vnsrl.wi v8, v12, 0
1870 ; CHECK-NEXT: vsetvli zero, zero, e8, mf2, ta, ma
1871 ; CHECK-NEXT: vnsrl.wi v8, v8, 0
1873 %evec = fptosi <vscale x 4 x double> %va to <vscale x 4 x i8>
1874 ret <vscale x 4 x i8> %evec
1877 define <vscale x 4 x i8> @vfptoui_nxv4f64_nxv4i8(<vscale x 4 x double> %va) {
1878 ; CHECK-LABEL: vfptoui_nxv4f64_nxv4i8:
1880 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1881 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v12, v8
1882 ; CHECK-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1883 ; CHECK-NEXT: vnsrl.wi v8, v12, 0
1884 ; CHECK-NEXT: vsetvli zero, zero, e8, mf2, ta, ma
1885 ; CHECK-NEXT: vnsrl.wi v8, v8, 0
1887 %evec = fptoui <vscale x 4 x double> %va to <vscale x 4 x i8>
1888 ret <vscale x 4 x i8> %evec
1891 define <vscale x 4 x i16> @vfptosi_nxv4f64_nxv4i16(<vscale x 4 x double> %va) {
1892 ; CHECK-LABEL: vfptosi_nxv4f64_nxv4i16:
1894 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1895 ; CHECK-NEXT: vfncvt.rtz.x.f.w v12, v8
1896 ; CHECK-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1897 ; CHECK-NEXT: vnsrl.wi v8, v12, 0
1899 %evec = fptosi <vscale x 4 x double> %va to <vscale x 4 x i16>
1900 ret <vscale x 4 x i16> %evec
1903 define <vscale x 4 x i16> @vfptoui_nxv4f64_nxv4i16(<vscale x 4 x double> %va) {
1904 ; CHECK-LABEL: vfptoui_nxv4f64_nxv4i16:
1906 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1907 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v12, v8
1908 ; CHECK-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1909 ; CHECK-NEXT: vnsrl.wi v8, v12, 0
1911 %evec = fptoui <vscale x 4 x double> %va to <vscale x 4 x i16>
1912 ret <vscale x 4 x i16> %evec
1915 define <vscale x 4 x i32> @vfptosi_nxv4f64_nxv4i32(<vscale x 4 x double> %va) {
1916 ; CHECK-LABEL: vfptosi_nxv4f64_nxv4i32:
1918 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1919 ; CHECK-NEXT: vfncvt.rtz.x.f.w v12, v8
1920 ; CHECK-NEXT: vmv.v.v v8, v12
1922 %evec = fptosi <vscale x 4 x double> %va to <vscale x 4 x i32>
1923 ret <vscale x 4 x i32> %evec
1926 define <vscale x 4 x i32> @vfptoui_nxv4f64_nxv4i32(<vscale x 4 x double> %va) {
1927 ; CHECK-LABEL: vfptoui_nxv4f64_nxv4i32:
1929 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1930 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v12, v8
1931 ; CHECK-NEXT: vmv.v.v v8, v12
1933 %evec = fptoui <vscale x 4 x double> %va to <vscale x 4 x i32>
1934 ret <vscale x 4 x i32> %evec
1937 define <vscale x 4 x i64> @vfptosi_nxv4f64_nxv4i64(<vscale x 4 x double> %va) {
1938 ; CHECK-LABEL: vfptosi_nxv4f64_nxv4i64:
1940 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1941 ; CHECK-NEXT: vfcvt.rtz.x.f.v v8, v8
1943 %evec = fptosi <vscale x 4 x double> %va to <vscale x 4 x i64>
1944 ret <vscale x 4 x i64> %evec
1947 define <vscale x 4 x i64> @vfptoui_nxv4f64_nxv4i64(<vscale x 4 x double> %va) {
1948 ; CHECK-LABEL: vfptoui_nxv4f64_nxv4i64:
1950 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1951 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8
1953 %evec = fptoui <vscale x 4 x double> %va to <vscale x 4 x i64>
1954 ret <vscale x 4 x i64> %evec
1957 define <vscale x 8 x i1> @vfptosi_nxv8f64_nxv8i1(<vscale x 8 x double> %va) {
1958 ; CHECK-LABEL: vfptosi_nxv8f64_nxv8i1:
1960 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1961 ; CHECK-NEXT: vfncvt.rtz.x.f.w v16, v8
1962 ; CHECK-NEXT: vand.vi v8, v16, 1
1963 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1965 %evec = fptosi <vscale x 8 x double> %va to <vscale x 8 x i1>
1966 ret <vscale x 8 x i1> %evec
1969 define <vscale x 8 x i1> @vfptoui_nxv8f64_nxv8i1(<vscale x 8 x double> %va) {
1970 ; CHECK-LABEL: vfptoui_nxv8f64_nxv8i1:
1972 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1973 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v16, v8
1974 ; CHECK-NEXT: vand.vi v8, v16, 1
1975 ; CHECK-NEXT: vmsne.vi v0, v8, 0
1977 %evec = fptoui <vscale x 8 x double> %va to <vscale x 8 x i1>
1978 ret <vscale x 8 x i1> %evec
1981 define <vscale x 8 x i8> @vfptosi_nxv8f64_nxv8i8(<vscale x 8 x double> %va) {
1982 ; CHECK-LABEL: vfptosi_nxv8f64_nxv8i8:
1984 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1985 ; CHECK-NEXT: vfncvt.rtz.x.f.w v16, v8
1986 ; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, ma
1987 ; CHECK-NEXT: vnsrl.wi v10, v16, 0
1988 ; CHECK-NEXT: vsetvli zero, zero, e8, m1, ta, ma
1989 ; CHECK-NEXT: vnsrl.wi v8, v10, 0
1991 %evec = fptosi <vscale x 8 x double> %va to <vscale x 8 x i8>
1992 ret <vscale x 8 x i8> %evec
1995 define <vscale x 8 x i8> @vfptoui_nxv8f64_nxv8i8(<vscale x 8 x double> %va) {
1996 ; CHECK-LABEL: vfptoui_nxv8f64_nxv8i8:
1998 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1999 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v16, v8
2000 ; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, ma
2001 ; CHECK-NEXT: vnsrl.wi v10, v16, 0
2002 ; CHECK-NEXT: vsetvli zero, zero, e8, m1, ta, ma
2003 ; CHECK-NEXT: vnsrl.wi v8, v10, 0
2005 %evec = fptoui <vscale x 8 x double> %va to <vscale x 8 x i8>
2006 ret <vscale x 8 x i8> %evec
2009 define <vscale x 8 x i16> @vfptosi_nxv8f64_nxv8i16(<vscale x 8 x double> %va) {
2010 ; CHECK-LABEL: vfptosi_nxv8f64_nxv8i16:
2012 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2013 ; CHECK-NEXT: vfncvt.rtz.x.f.w v16, v8
2014 ; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, ma
2015 ; CHECK-NEXT: vnsrl.wi v8, v16, 0
2017 %evec = fptosi <vscale x 8 x double> %va to <vscale x 8 x i16>
2018 ret <vscale x 8 x i16> %evec
2021 define <vscale x 8 x i16> @vfptoui_nxv8f64_nxv8i16(<vscale x 8 x double> %va) {
2022 ; CHECK-LABEL: vfptoui_nxv8f64_nxv8i16:
2024 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2025 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v16, v8
2026 ; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, ma
2027 ; CHECK-NEXT: vnsrl.wi v8, v16, 0
2029 %evec = fptoui <vscale x 8 x double> %va to <vscale x 8 x i16>
2030 ret <vscale x 8 x i16> %evec
2033 define <vscale x 8 x i32> @vfptosi_nxv8f64_nxv8i32(<vscale x 8 x double> %va) {
2034 ; CHECK-LABEL: vfptosi_nxv8f64_nxv8i32:
2036 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2037 ; CHECK-NEXT: vfncvt.rtz.x.f.w v16, v8
2038 ; CHECK-NEXT: vmv.v.v v8, v16
2040 %evec = fptosi <vscale x 8 x double> %va to <vscale x 8 x i32>
2041 ret <vscale x 8 x i32> %evec
2044 define <vscale x 8 x i32> @vfptoui_nxv8f64_nxv8i32(<vscale x 8 x double> %va) {
2045 ; CHECK-LABEL: vfptoui_nxv8f64_nxv8i32:
2047 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2048 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v16, v8
2049 ; CHECK-NEXT: vmv.v.v v8, v16
2051 %evec = fptoui <vscale x 8 x double> %va to <vscale x 8 x i32>
2052 ret <vscale x 8 x i32> %evec
2055 define <vscale x 8 x i64> @vfptosi_nxv8f64_nxv8i64(<vscale x 8 x double> %va) {
2056 ; CHECK-LABEL: vfptosi_nxv8f64_nxv8i64:
2058 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2059 ; CHECK-NEXT: vfcvt.rtz.x.f.v v8, v8
2061 %evec = fptosi <vscale x 8 x double> %va to <vscale x 8 x i64>
2062 ret <vscale x 8 x i64> %evec
2065 define <vscale x 8 x i64> @vfptoui_nxv8f64_nxv8i64(<vscale x 8 x double> %va) {
2066 ; CHECK-LABEL: vfptoui_nxv8f64_nxv8i64:
2068 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2069 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8
2071 %evec = fptoui <vscale x 8 x double> %va to <vscale x 8 x i64>
2072 ret <vscale x 8 x i64> %evec