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 half> @vsitofp_nxv1i1_nxv1f16(<vscale x 1 x i1> %va) {
12 ; ZVFH-LABEL: vsitofp_nxv1i1_nxv1f16:
14 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
15 ; ZVFH-NEXT: vmv.v.i v8, 0
16 ; ZVFH-NEXT: vmerge.vim v9, v8, -1, v0
17 ; ZVFH-NEXT: vfwcvt.f.x.v v8, v9
20 ; ZVFHMIN-LABEL: vsitofp_nxv1i1_nxv1f16:
22 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
23 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
24 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, -1, v0
25 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v9, v8
26 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
28 %evec = sitofp <vscale x 1 x i1> %va to <vscale x 1 x half>
29 ret <vscale x 1 x half> %evec
32 define <vscale x 1 x half> @vuitofp_nxv1i1_nxv1f16(<vscale x 1 x i1> %va) {
33 ; ZVFH-LABEL: vuitofp_nxv1i1_nxv1f16:
35 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
36 ; ZVFH-NEXT: vmv.v.i v8, 0
37 ; ZVFH-NEXT: vmerge.vim v9, v8, 1, v0
38 ; ZVFH-NEXT: vfwcvt.f.xu.v v8, v9
41 ; ZVFHMIN-LABEL: vuitofp_nxv1i1_nxv1f16:
43 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
44 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
45 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, 1, v0
46 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v9, v8
47 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
49 %evec = uitofp <vscale x 1 x i1> %va to <vscale x 1 x half>
50 ret <vscale x 1 x half> %evec
53 define <vscale x 1 x float> @vsitofp_nxv1i1_nxv1f32(<vscale x 1 x i1> %va) {
54 ; CHECK-LABEL: vsitofp_nxv1i1_nxv1f32:
56 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
57 ; CHECK-NEXT: vmv.v.i v8, 0
58 ; CHECK-NEXT: vmerge.vim v9, v8, -1, v0
59 ; CHECK-NEXT: vfwcvt.f.x.v v8, v9
61 %evec = sitofp <vscale x 1 x i1> %va to <vscale x 1 x float>
62 ret <vscale x 1 x float> %evec
65 define <vscale x 1 x float> @vuitofp_nxv1i1_nxv1f32(<vscale x 1 x i1> %va) {
66 ; CHECK-LABEL: vuitofp_nxv1i1_nxv1f32:
68 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
69 ; CHECK-NEXT: vmv.v.i v8, 0
70 ; CHECK-NEXT: vmerge.vim v9, v8, 1, v0
71 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v9
73 %evec = uitofp <vscale x 1 x i1> %va to <vscale x 1 x float>
74 ret <vscale x 1 x float> %evec
77 define <vscale x 1 x double> @vsitofp_nxv1i1_nxv1f64(<vscale x 1 x i1> %va) {
78 ; CHECK-LABEL: vsitofp_nxv1i1_nxv1f64:
80 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
81 ; CHECK-NEXT: vmv.v.i v8, 0
82 ; CHECK-NEXT: vmerge.vim v9, v8, -1, v0
83 ; CHECK-NEXT: vfwcvt.f.x.v v8, v9
85 %evec = sitofp <vscale x 1 x i1> %va to <vscale x 1 x double>
86 ret <vscale x 1 x double> %evec
89 define <vscale x 1 x double> @vuitofp_nxv1i1_nxv1f64(<vscale x 1 x i1> %va) {
90 ; CHECK-LABEL: vuitofp_nxv1i1_nxv1f64:
92 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
93 ; CHECK-NEXT: vmv.v.i v8, 0
94 ; CHECK-NEXT: vmerge.vim v9, v8, 1, v0
95 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v9
97 %evec = uitofp <vscale x 1 x i1> %va to <vscale x 1 x double>
98 ret <vscale x 1 x double> %evec
101 define <vscale x 2 x half> @vsitofp_nxv2i1_nxv2f16(<vscale x 2 x i1> %va) {
102 ; ZVFH-LABEL: vsitofp_nxv2i1_nxv2f16:
104 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
105 ; ZVFH-NEXT: vmv.v.i v8, 0
106 ; ZVFH-NEXT: vmerge.vim v9, v8, -1, v0
107 ; ZVFH-NEXT: vfwcvt.f.x.v v8, v9
110 ; ZVFHMIN-LABEL: vsitofp_nxv2i1_nxv2f16:
112 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
113 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
114 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, -1, v0
115 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v9, v8
116 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
118 %evec = sitofp <vscale x 2 x i1> %va to <vscale x 2 x half>
119 ret <vscale x 2 x half> %evec
122 define <vscale x 2 x half> @vuitofp_nxv2i1_nxv2f16(<vscale x 2 x i1> %va) {
123 ; ZVFH-LABEL: vuitofp_nxv2i1_nxv2f16:
125 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
126 ; ZVFH-NEXT: vmv.v.i v8, 0
127 ; ZVFH-NEXT: vmerge.vim v9, v8, 1, v0
128 ; ZVFH-NEXT: vfwcvt.f.xu.v v8, v9
131 ; ZVFHMIN-LABEL: vuitofp_nxv2i1_nxv2f16:
133 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
134 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
135 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, 1, v0
136 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v9, v8
137 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
139 %evec = uitofp <vscale x 2 x i1> %va to <vscale x 2 x half>
140 ret <vscale x 2 x half> %evec
143 define <vscale x 2 x float> @vsitofp_nxv2i1_nxv2f32(<vscale x 2 x i1> %va) {
144 ; CHECK-LABEL: vsitofp_nxv2i1_nxv2f32:
146 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
147 ; CHECK-NEXT: vmv.v.i v8, 0
148 ; CHECK-NEXT: vmerge.vim v9, v8, -1, v0
149 ; CHECK-NEXT: vfwcvt.f.x.v v8, v9
151 %evec = sitofp <vscale x 2 x i1> %va to <vscale x 2 x float>
152 ret <vscale x 2 x float> %evec
155 define <vscale x 2 x float> @vuitofp_nxv2i1_nxv2f32(<vscale x 2 x i1> %va) {
156 ; CHECK-LABEL: vuitofp_nxv2i1_nxv2f32:
158 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
159 ; CHECK-NEXT: vmv.v.i v8, 0
160 ; CHECK-NEXT: vmerge.vim v9, v8, 1, v0
161 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v9
163 %evec = uitofp <vscale x 2 x i1> %va to <vscale x 2 x float>
164 ret <vscale x 2 x float> %evec
167 define <vscale x 2 x double> @vsitofp_nxv2i1_nxv2f64(<vscale x 2 x i1> %va) {
168 ; CHECK-LABEL: vsitofp_nxv2i1_nxv2f64:
170 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
171 ; CHECK-NEXT: vmv.v.i v8, 0
172 ; CHECK-NEXT: vmerge.vim v10, v8, -1, v0
173 ; CHECK-NEXT: vfwcvt.f.x.v v8, v10
175 %evec = sitofp <vscale x 2 x i1> %va to <vscale x 2 x double>
176 ret <vscale x 2 x double> %evec
179 define <vscale x 2 x double> @vuitofp_nxv2i1_nxv2f64(<vscale x 2 x i1> %va) {
180 ; CHECK-LABEL: vuitofp_nxv2i1_nxv2f64:
182 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
183 ; CHECK-NEXT: vmv.v.i v8, 0
184 ; CHECK-NEXT: vmerge.vim v10, v8, 1, v0
185 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v10
187 %evec = uitofp <vscale x 2 x i1> %va to <vscale x 2 x double>
188 ret <vscale x 2 x double> %evec
191 define <vscale x 4 x half> @vsitofp_nxv4i1_nxv4f16(<vscale x 4 x i1> %va) {
192 ; ZVFH-LABEL: vsitofp_nxv4i1_nxv4f16:
194 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
195 ; ZVFH-NEXT: vmv.v.i v8, 0
196 ; ZVFH-NEXT: vmerge.vim v9, v8, -1, v0
197 ; ZVFH-NEXT: vfwcvt.f.x.v v8, v9
200 ; ZVFHMIN-LABEL: vsitofp_nxv4i1_nxv4f16:
202 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
203 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
204 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, -1, v0
205 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v10, v8
206 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
208 %evec = sitofp <vscale x 4 x i1> %va to <vscale x 4 x half>
209 ret <vscale x 4 x half> %evec
212 define <vscale x 4 x half> @vuitofp_nxv4i1_nxv4f16(<vscale x 4 x i1> %va) {
213 ; ZVFH-LABEL: vuitofp_nxv4i1_nxv4f16:
215 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
216 ; ZVFH-NEXT: vmv.v.i v8, 0
217 ; ZVFH-NEXT: vmerge.vim v9, v8, 1, v0
218 ; ZVFH-NEXT: vfwcvt.f.xu.v v8, v9
221 ; ZVFHMIN-LABEL: vuitofp_nxv4i1_nxv4f16:
223 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
224 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
225 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, 1, v0
226 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v10, v8
227 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
229 %evec = uitofp <vscale x 4 x i1> %va to <vscale x 4 x half>
230 ret <vscale x 4 x half> %evec
233 define <vscale x 4 x float> @vsitofp_nxv4i1_nxv4f32(<vscale x 4 x i1> %va) {
234 ; CHECK-LABEL: vsitofp_nxv4i1_nxv4f32:
236 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
237 ; CHECK-NEXT: vmv.v.i v8, 0
238 ; CHECK-NEXT: vmerge.vim v10, v8, -1, v0
239 ; CHECK-NEXT: vfwcvt.f.x.v v8, v10
241 %evec = sitofp <vscale x 4 x i1> %va to <vscale x 4 x float>
242 ret <vscale x 4 x float> %evec
245 define <vscale x 4 x float> @vuitofp_nxv4i1_nxv4f32(<vscale x 4 x i1> %va) {
246 ; CHECK-LABEL: vuitofp_nxv4i1_nxv4f32:
248 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
249 ; CHECK-NEXT: vmv.v.i v8, 0
250 ; CHECK-NEXT: vmerge.vim v10, v8, 1, v0
251 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v10
253 %evec = uitofp <vscale x 4 x i1> %va to <vscale x 4 x float>
254 ret <vscale x 4 x float> %evec
257 define <vscale x 4 x double> @vsitofp_nxv4i1_nxv4f64(<vscale x 4 x i1> %va) {
258 ; CHECK-LABEL: vsitofp_nxv4i1_nxv4f64:
260 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
261 ; CHECK-NEXT: vmv.v.i v8, 0
262 ; CHECK-NEXT: vmerge.vim v12, v8, -1, v0
263 ; CHECK-NEXT: vfwcvt.f.x.v v8, v12
265 %evec = sitofp <vscale x 4 x i1> %va to <vscale x 4 x double>
266 ret <vscale x 4 x double> %evec
269 define <vscale x 4 x double> @vuitofp_nxv4i1_nxv4f64(<vscale x 4 x i1> %va) {
270 ; CHECK-LABEL: vuitofp_nxv4i1_nxv4f64:
272 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
273 ; CHECK-NEXT: vmv.v.i v8, 0
274 ; CHECK-NEXT: vmerge.vim v12, v8, 1, v0
275 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v12
277 %evec = uitofp <vscale x 4 x i1> %va to <vscale x 4 x double>
278 ret <vscale x 4 x double> %evec
281 define <vscale x 8 x half> @vsitofp_nxv8i1_nxv8f16(<vscale x 8 x i1> %va) {
282 ; ZVFH-LABEL: vsitofp_nxv8i1_nxv8f16:
284 ; ZVFH-NEXT: vsetvli a0, zero, e8, m1, ta, ma
285 ; ZVFH-NEXT: vmv.v.i v8, 0
286 ; ZVFH-NEXT: vmerge.vim v10, v8, -1, v0
287 ; ZVFH-NEXT: vfwcvt.f.x.v v8, v10
290 ; ZVFHMIN-LABEL: vsitofp_nxv8i1_nxv8f16:
292 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
293 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
294 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, -1, v0
295 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v12, v8
296 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
298 %evec = sitofp <vscale x 8 x i1> %va to <vscale x 8 x half>
299 ret <vscale x 8 x half> %evec
302 define <vscale x 8 x half> @vuitofp_nxv8i1_nxv8f16(<vscale x 8 x i1> %va) {
303 ; ZVFH-LABEL: vuitofp_nxv8i1_nxv8f16:
305 ; ZVFH-NEXT: vsetvli a0, zero, e8, m1, ta, ma
306 ; ZVFH-NEXT: vmv.v.i v8, 0
307 ; ZVFH-NEXT: vmerge.vim v10, v8, 1, v0
308 ; ZVFH-NEXT: vfwcvt.f.xu.v v8, v10
311 ; ZVFHMIN-LABEL: vuitofp_nxv8i1_nxv8f16:
313 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
314 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
315 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, 1, v0
316 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v12, v8
317 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
319 %evec = uitofp <vscale x 8 x i1> %va to <vscale x 8 x half>
320 ret <vscale x 8 x half> %evec
323 define <vscale x 8 x float> @vsitofp_nxv8i1_nxv8f32(<vscale x 8 x i1> %va) {
324 ; CHECK-LABEL: vsitofp_nxv8i1_nxv8f32:
326 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
327 ; CHECK-NEXT: vmv.v.i v8, 0
328 ; CHECK-NEXT: vmerge.vim v12, v8, -1, v0
329 ; CHECK-NEXT: vfwcvt.f.x.v v8, v12
331 %evec = sitofp <vscale x 8 x i1> %va to <vscale x 8 x float>
332 ret <vscale x 8 x float> %evec
335 define <vscale x 8 x float> @vuitofp_nxv8i1_nxv8f32(<vscale x 8 x i1> %va) {
336 ; CHECK-LABEL: vuitofp_nxv8i1_nxv8f32:
338 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
339 ; CHECK-NEXT: vmv.v.i v8, 0
340 ; CHECK-NEXT: vmerge.vim v12, v8, 1, v0
341 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v12
343 %evec = uitofp <vscale x 8 x i1> %va to <vscale x 8 x float>
344 ret <vscale x 8 x float> %evec
347 define <vscale x 8 x double> @vsitofp_nxv8i1_nxv8f64(<vscale x 8 x i1> %va) {
348 ; CHECK-LABEL: vsitofp_nxv8i1_nxv8f64:
350 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
351 ; CHECK-NEXT: vmv.v.i v8, 0
352 ; CHECK-NEXT: vmerge.vim v16, v8, -1, v0
353 ; CHECK-NEXT: vfwcvt.f.x.v v8, v16
355 %evec = sitofp <vscale x 8 x i1> %va to <vscale x 8 x double>
356 ret <vscale x 8 x double> %evec
359 define <vscale x 8 x double> @vuitofp_nxv8i1_nxv8f64(<vscale x 8 x i1> %va) {
360 ; CHECK-LABEL: vuitofp_nxv8i1_nxv8f64:
362 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
363 ; CHECK-NEXT: vmv.v.i v8, 0
364 ; CHECK-NEXT: vmerge.vim v16, v8, 1, v0
365 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v16
367 %evec = uitofp <vscale x 8 x i1> %va to <vscale x 8 x double>
368 ret <vscale x 8 x double> %evec
371 define <vscale x 16 x half> @vsitofp_nxv16i1_nxv16f16(<vscale x 16 x i1> %va) {
372 ; ZVFH-LABEL: vsitofp_nxv16i1_nxv16f16:
374 ; ZVFH-NEXT: vsetvli a0, zero, e8, m2, ta, ma
375 ; ZVFH-NEXT: vmv.v.i v8, 0
376 ; ZVFH-NEXT: vmerge.vim v12, v8, -1, v0
377 ; ZVFH-NEXT: vfwcvt.f.x.v v8, v12
380 ; ZVFHMIN-LABEL: vsitofp_nxv16i1_nxv16f16:
382 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
383 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
384 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, -1, v0
385 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v16, v8
386 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
388 %evec = sitofp <vscale x 16 x i1> %va to <vscale x 16 x half>
389 ret <vscale x 16 x half> %evec
392 define <vscale x 16 x half> @vuitofp_nxv16i1_nxv16f16(<vscale x 16 x i1> %va) {
393 ; ZVFH-LABEL: vuitofp_nxv16i1_nxv16f16:
395 ; ZVFH-NEXT: vsetvli a0, zero, e8, m2, ta, ma
396 ; ZVFH-NEXT: vmv.v.i v8, 0
397 ; ZVFH-NEXT: vmerge.vim v12, v8, 1, v0
398 ; ZVFH-NEXT: vfwcvt.f.xu.v v8, v12
401 ; ZVFHMIN-LABEL: vuitofp_nxv16i1_nxv16f16:
403 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
404 ; ZVFHMIN-NEXT: vmv.v.i v8, 0
405 ; ZVFHMIN-NEXT: vmerge.vim v8, v8, 1, v0
406 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v16, v8
407 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
409 %evec = uitofp <vscale x 16 x i1> %va to <vscale x 16 x half>
410 ret <vscale x 16 x half> %evec
413 define <vscale x 16 x float> @vsitofp_nxv16i1_nxv16f32(<vscale x 16 x i1> %va) {
414 ; CHECK-LABEL: vsitofp_nxv16i1_nxv16f32:
416 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
417 ; CHECK-NEXT: vmv.v.i v8, 0
418 ; CHECK-NEXT: vmerge.vim v16, v8, -1, v0
419 ; CHECK-NEXT: vfwcvt.f.x.v v8, v16
421 %evec = sitofp <vscale x 16 x i1> %va to <vscale x 16 x float>
422 ret <vscale x 16 x float> %evec
425 define <vscale x 16 x float> @vuitofp_nxv16i1_nxv16f32(<vscale x 16 x i1> %va) {
426 ; CHECK-LABEL: vuitofp_nxv16i1_nxv16f32:
428 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
429 ; CHECK-NEXT: vmv.v.i v8, 0
430 ; CHECK-NEXT: vmerge.vim v16, v8, 1, v0
431 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v16
433 %evec = uitofp <vscale x 16 x i1> %va to <vscale x 16 x float>
434 ret <vscale x 16 x float> %evec
437 define <vscale x 32 x half> @vsitofp_nxv32i1_nxv32f16(<vscale x 32 x i1> %va) {
438 ; ZVFH-LABEL: vsitofp_nxv32i1_nxv32f16:
440 ; ZVFH-NEXT: vsetvli a0, zero, e8, m4, ta, ma
441 ; ZVFH-NEXT: vmv.v.i v8, 0
442 ; ZVFH-NEXT: vmerge.vim v16, v8, -1, v0
443 ; ZVFH-NEXT: vfwcvt.f.x.v v8, v16
446 ; ZVFHMIN-LABEL: vsitofp_nxv32i1_nxv32f16:
448 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
449 ; ZVFHMIN-NEXT: vmv.v.i v12, 0
450 ; ZVFHMIN-NEXT: vmerge.vim v8, v12, -1, v0
451 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v16, v8
452 ; ZVFHMIN-NEXT: csrr a0, vlenb
453 ; ZVFHMIN-NEXT: srli a0, a0, 2
454 ; ZVFHMIN-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
455 ; ZVFHMIN-NEXT: vslidedown.vx v0, v0, a0
456 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
457 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
458 ; ZVFHMIN-NEXT: vmerge.vim v12, v12, -1, v0
459 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v16, v12
460 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
462 %evec = sitofp <vscale x 32 x i1> %va to <vscale x 32 x half>
463 ret <vscale x 32 x half> %evec
466 define <vscale x 32 x half> @vuitofp_nxv32i1_nxv32f16(<vscale x 32 x i1> %va) {
467 ; ZVFH-LABEL: vuitofp_nxv32i1_nxv32f16:
469 ; ZVFH-NEXT: vsetvli a0, zero, e8, m4, ta, ma
470 ; ZVFH-NEXT: vmv.v.i v8, 0
471 ; ZVFH-NEXT: vmerge.vim v16, v8, 1, v0
472 ; ZVFH-NEXT: vfwcvt.f.xu.v v8, v16
475 ; ZVFHMIN-LABEL: vuitofp_nxv32i1_nxv32f16:
477 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
478 ; ZVFHMIN-NEXT: vmv.v.i v12, 0
479 ; ZVFHMIN-NEXT: vmerge.vim v8, v12, 1, v0
480 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v16, v8
481 ; ZVFHMIN-NEXT: csrr a0, vlenb
482 ; ZVFHMIN-NEXT: srli a0, a0, 2
483 ; ZVFHMIN-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
484 ; ZVFHMIN-NEXT: vslidedown.vx v0, v0, a0
485 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
486 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
487 ; ZVFHMIN-NEXT: vmerge.vim v12, v12, 1, v0
488 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v16, v12
489 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
491 %evec = uitofp <vscale x 32 x i1> %va to <vscale x 32 x half>
492 ret <vscale x 32 x half> %evec
495 define <vscale x 1 x half> @vsitofp_nxv1i8_nxv1f16(<vscale x 1 x i8> %va) {
496 ; ZVFH-LABEL: vsitofp_nxv1i8_nxv1f16:
498 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
499 ; ZVFH-NEXT: vfwcvt.f.x.v v9, v8
500 ; ZVFH-NEXT: vmv1r.v v8, v9
503 ; ZVFHMIN-LABEL: vsitofp_nxv1i8_nxv1f16:
505 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
506 ; ZVFHMIN-NEXT: vsext.vf2 v9, v8
507 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v10, v9
508 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
510 %evec = sitofp <vscale x 1 x i8> %va to <vscale x 1 x half>
511 ret <vscale x 1 x half> %evec
514 define <vscale x 1 x half> @vsitofp_nxv1i7_nxv1f16(<vscale x 1 x i7> %va) {
515 ; ZVFH-LABEL: vsitofp_nxv1i7_nxv1f16:
517 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
518 ; ZVFH-NEXT: vadd.vv v8, v8, v8
519 ; ZVFH-NEXT: vsra.vi v9, v8, 1
520 ; ZVFH-NEXT: vfwcvt.f.x.v v8, v9
523 ; ZVFHMIN-LABEL: vsitofp_nxv1i7_nxv1f16:
525 ; ZVFHMIN-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
526 ; ZVFHMIN-NEXT: vadd.vv v8, v8, v8
527 ; ZVFHMIN-NEXT: vsra.vi v8, v8, 1
528 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
529 ; ZVFHMIN-NEXT: vsext.vf2 v9, v8
530 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v10, v9
531 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
533 %evec = sitofp <vscale x 1 x i7> %va to <vscale x 1 x half>
534 ret <vscale x 1 x half> %evec
537 define <vscale x 1 x half> @vuitofp_nxv1i7_nxv1f16(<vscale x 1 x i7> %va) {
538 ; ZVFH-LABEL: vuitofp_nxv1i7_nxv1f16:
540 ; ZVFH-NEXT: li a0, 127
541 ; ZVFH-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
542 ; ZVFH-NEXT: vand.vx v9, v8, a0
543 ; ZVFH-NEXT: vfwcvt.f.xu.v v8, v9
546 ; ZVFHMIN-LABEL: vuitofp_nxv1i7_nxv1f16:
548 ; ZVFHMIN-NEXT: li a0, 127
549 ; ZVFHMIN-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
550 ; ZVFHMIN-NEXT: vand.vx v8, v8, a0
551 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
552 ; ZVFHMIN-NEXT: vzext.vf2 v9, v8
553 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v10, v9
554 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
556 %evec = uitofp <vscale x 1 x i7> %va to <vscale x 1 x half>
557 ret <vscale x 1 x half> %evec
560 define <vscale x 1 x half> @vuitofp_nxv1i8_nxv1f16(<vscale x 1 x i8> %va) {
561 ; ZVFH-LABEL: vuitofp_nxv1i8_nxv1f16:
563 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
564 ; ZVFH-NEXT: vfwcvt.f.xu.v v9, v8
565 ; ZVFH-NEXT: vmv1r.v v8, v9
568 ; ZVFHMIN-LABEL: vuitofp_nxv1i8_nxv1f16:
570 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
571 ; ZVFHMIN-NEXT: vzext.vf2 v9, v8
572 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v10, v9
573 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
575 %evec = uitofp <vscale x 1 x i8> %va to <vscale x 1 x half>
576 ret <vscale x 1 x half> %evec
579 define <vscale x 1 x float> @vsitofp_nxv1i8_nxv1f32(<vscale x 1 x i8> %va) {
580 ; CHECK-LABEL: vsitofp_nxv1i8_nxv1f32:
582 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
583 ; CHECK-NEXT: vsext.vf2 v9, v8
584 ; CHECK-NEXT: vfwcvt.f.x.v v8, v9
586 %evec = sitofp <vscale x 1 x i8> %va to <vscale x 1 x float>
587 ret <vscale x 1 x float> %evec
590 define <vscale x 1 x float> @vuitofp_nxv1i8_nxv1f32(<vscale x 1 x i8> %va) {
591 ; CHECK-LABEL: vuitofp_nxv1i8_nxv1f32:
593 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
594 ; CHECK-NEXT: vzext.vf2 v9, v8
595 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v9
597 %evec = uitofp <vscale x 1 x i8> %va to <vscale x 1 x float>
598 ret <vscale x 1 x float> %evec
601 define <vscale x 1 x double> @vsitofp_nxv1i8_nxv1f64(<vscale x 1 x i8> %va) {
602 ; CHECK-LABEL: vsitofp_nxv1i8_nxv1f64:
604 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
605 ; CHECK-NEXT: vsext.vf4 v9, v8
606 ; CHECK-NEXT: vfwcvt.f.x.v v8, v9
608 %evec = sitofp <vscale x 1 x i8> %va to <vscale x 1 x double>
609 ret <vscale x 1 x double> %evec
612 define <vscale x 1 x double> @vuitofp_nxv1i8_nxv1f64(<vscale x 1 x i8> %va) {
613 ; CHECK-LABEL: vuitofp_nxv1i8_nxv1f64:
615 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
616 ; CHECK-NEXT: vzext.vf4 v9, v8
617 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v9
619 %evec = uitofp <vscale x 1 x i8> %va to <vscale x 1 x double>
620 ret <vscale x 1 x double> %evec
623 define <vscale x 2 x half> @vsitofp_nxv2i8_nxv2f16(<vscale x 2 x i8> %va) {
624 ; ZVFH-LABEL: vsitofp_nxv2i8_nxv2f16:
626 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
627 ; ZVFH-NEXT: vfwcvt.f.x.v v9, v8
628 ; ZVFH-NEXT: vmv1r.v v8, v9
631 ; ZVFHMIN-LABEL: vsitofp_nxv2i8_nxv2f16:
633 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
634 ; ZVFHMIN-NEXT: vsext.vf2 v9, v8
635 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v10, v9
636 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
638 %evec = sitofp <vscale x 2 x i8> %va to <vscale x 2 x half>
639 ret <vscale x 2 x half> %evec
642 define <vscale x 2 x half> @vuitofp_nxv2i8_nxv2f16(<vscale x 2 x i8> %va) {
643 ; ZVFH-LABEL: vuitofp_nxv2i8_nxv2f16:
645 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
646 ; ZVFH-NEXT: vfwcvt.f.xu.v v9, v8
647 ; ZVFH-NEXT: vmv1r.v v8, v9
650 ; ZVFHMIN-LABEL: vuitofp_nxv2i8_nxv2f16:
652 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
653 ; ZVFHMIN-NEXT: vzext.vf2 v9, v8
654 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v10, v9
655 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
657 %evec = uitofp <vscale x 2 x i8> %va to <vscale x 2 x half>
658 ret <vscale x 2 x half> %evec
661 define <vscale x 2 x float> @vsitofp_nxv2i8_nxv2f32(<vscale x 2 x i8> %va) {
662 ; CHECK-LABEL: vsitofp_nxv2i8_nxv2f32:
664 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
665 ; CHECK-NEXT: vsext.vf2 v9, v8
666 ; CHECK-NEXT: vfwcvt.f.x.v v8, v9
668 %evec = sitofp <vscale x 2 x i8> %va to <vscale x 2 x float>
669 ret <vscale x 2 x float> %evec
672 define <vscale x 2 x float> @vuitofp_nxv2i8_nxv2f32(<vscale x 2 x i8> %va) {
673 ; CHECK-LABEL: vuitofp_nxv2i8_nxv2f32:
675 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
676 ; CHECK-NEXT: vzext.vf2 v9, v8
677 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v9
679 %evec = uitofp <vscale x 2 x i8> %va to <vscale x 2 x float>
680 ret <vscale x 2 x float> %evec
683 define <vscale x 2 x double> @vsitofp_nxv2i8_nxv2f64(<vscale x 2 x i8> %va) {
684 ; CHECK-LABEL: vsitofp_nxv2i8_nxv2f64:
686 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
687 ; CHECK-NEXT: vsext.vf4 v10, v8
688 ; CHECK-NEXT: vfwcvt.f.x.v v8, v10
690 %evec = sitofp <vscale x 2 x i8> %va to <vscale x 2 x double>
691 ret <vscale x 2 x double> %evec
694 define <vscale x 2 x double> @vuitofp_nxv2i8_nxv2f64(<vscale x 2 x i8> %va) {
695 ; CHECK-LABEL: vuitofp_nxv2i8_nxv2f64:
697 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
698 ; CHECK-NEXT: vzext.vf4 v10, v8
699 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v10
701 %evec = uitofp <vscale x 2 x i8> %va to <vscale x 2 x double>
702 ret <vscale x 2 x double> %evec
705 define <vscale x 4 x half> @vsitofp_nxv4i8_nxv4f16(<vscale x 4 x i8> %va) {
706 ; ZVFH-LABEL: vsitofp_nxv4i8_nxv4f16:
708 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
709 ; ZVFH-NEXT: vfwcvt.f.x.v v9, v8
710 ; ZVFH-NEXT: vmv1r.v v8, v9
713 ; ZVFHMIN-LABEL: vsitofp_nxv4i8_nxv4f16:
715 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
716 ; ZVFHMIN-NEXT: vsext.vf2 v9, v8
717 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v10, v9
718 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
720 %evec = sitofp <vscale x 4 x i8> %va to <vscale x 4 x half>
721 ret <vscale x 4 x half> %evec
724 define <vscale x 4 x half> @vuitofp_nxv4i8_nxv4f16(<vscale x 4 x i8> %va) {
725 ; ZVFH-LABEL: vuitofp_nxv4i8_nxv4f16:
727 ; ZVFH-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
728 ; ZVFH-NEXT: vfwcvt.f.xu.v v9, v8
729 ; ZVFH-NEXT: vmv1r.v v8, v9
732 ; ZVFHMIN-LABEL: vuitofp_nxv4i8_nxv4f16:
734 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
735 ; ZVFHMIN-NEXT: vzext.vf2 v9, v8
736 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v10, v9
737 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
739 %evec = uitofp <vscale x 4 x i8> %va to <vscale x 4 x half>
740 ret <vscale x 4 x half> %evec
743 define <vscale x 4 x float> @vsitofp_nxv4i8_nxv4f32(<vscale x 4 x i8> %va) {
744 ; CHECK-LABEL: vsitofp_nxv4i8_nxv4f32:
746 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
747 ; CHECK-NEXT: vsext.vf2 v10, v8
748 ; CHECK-NEXT: vfwcvt.f.x.v v8, v10
750 %evec = sitofp <vscale x 4 x i8> %va to <vscale x 4 x float>
751 ret <vscale x 4 x float> %evec
754 define <vscale x 4 x float> @vuitofp_nxv4i8_nxv4f32(<vscale x 4 x i8> %va) {
755 ; CHECK-LABEL: vuitofp_nxv4i8_nxv4f32:
757 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
758 ; CHECK-NEXT: vzext.vf2 v10, v8
759 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v10
761 %evec = uitofp <vscale x 4 x i8> %va to <vscale x 4 x float>
762 ret <vscale x 4 x float> %evec
765 define <vscale x 4 x double> @vsitofp_nxv4i8_nxv4f64(<vscale x 4 x i8> %va) {
766 ; CHECK-LABEL: vsitofp_nxv4i8_nxv4f64:
768 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
769 ; CHECK-NEXT: vsext.vf4 v12, v8
770 ; CHECK-NEXT: vfwcvt.f.x.v v8, v12
772 %evec = sitofp <vscale x 4 x i8> %va to <vscale x 4 x double>
773 ret <vscale x 4 x double> %evec
776 define <vscale x 4 x double> @vuitofp_nxv4i8_nxv4f64(<vscale x 4 x i8> %va) {
777 ; CHECK-LABEL: vuitofp_nxv4i8_nxv4f64:
779 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
780 ; CHECK-NEXT: vzext.vf4 v12, v8
781 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v12
783 %evec = uitofp <vscale x 4 x i8> %va to <vscale x 4 x double>
784 ret <vscale x 4 x double> %evec
787 define <vscale x 8 x half> @vsitofp_nxv8i8_nxv8f16(<vscale x 8 x i8> %va) {
788 ; ZVFH-LABEL: vsitofp_nxv8i8_nxv8f16:
790 ; ZVFH-NEXT: vsetvli a0, zero, e8, m1, ta, ma
791 ; ZVFH-NEXT: vfwcvt.f.x.v v10, v8
792 ; ZVFH-NEXT: vmv2r.v v8, v10
795 ; ZVFHMIN-LABEL: vsitofp_nxv8i8_nxv8f16:
797 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
798 ; ZVFHMIN-NEXT: vsext.vf2 v10, v8
799 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v12, v10
800 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
802 %evec = sitofp <vscale x 8 x i8> %va to <vscale x 8 x half>
803 ret <vscale x 8 x half> %evec
806 define <vscale x 8 x half> @vuitofp_nxv8i8_nxv8f16(<vscale x 8 x i8> %va) {
807 ; ZVFH-LABEL: vuitofp_nxv8i8_nxv8f16:
809 ; ZVFH-NEXT: vsetvli a0, zero, e8, m1, ta, ma
810 ; ZVFH-NEXT: vfwcvt.f.xu.v v10, v8
811 ; ZVFH-NEXT: vmv2r.v v8, v10
814 ; ZVFHMIN-LABEL: vuitofp_nxv8i8_nxv8f16:
816 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
817 ; ZVFHMIN-NEXT: vzext.vf2 v10, v8
818 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v12, v10
819 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
821 %evec = uitofp <vscale x 8 x i8> %va to <vscale x 8 x half>
822 ret <vscale x 8 x half> %evec
825 define <vscale x 8 x float> @vsitofp_nxv8i8_nxv8f32(<vscale x 8 x i8> %va) {
826 ; CHECK-LABEL: vsitofp_nxv8i8_nxv8f32:
828 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
829 ; CHECK-NEXT: vsext.vf2 v12, v8
830 ; CHECK-NEXT: vfwcvt.f.x.v v8, v12
832 %evec = sitofp <vscale x 8 x i8> %va to <vscale x 8 x float>
833 ret <vscale x 8 x float> %evec
836 define <vscale x 8 x float> @vuitofp_nxv8i8_nxv8f32(<vscale x 8 x i8> %va) {
837 ; CHECK-LABEL: vuitofp_nxv8i8_nxv8f32:
839 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
840 ; CHECK-NEXT: vzext.vf2 v12, v8
841 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v12
843 %evec = uitofp <vscale x 8 x i8> %va to <vscale x 8 x float>
844 ret <vscale x 8 x float> %evec
847 define <vscale x 8 x double> @vsitofp_nxv8i8_nxv8f64(<vscale x 8 x i8> %va) {
848 ; CHECK-LABEL: vsitofp_nxv8i8_nxv8f64:
850 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
851 ; CHECK-NEXT: vsext.vf4 v16, v8
852 ; CHECK-NEXT: vfwcvt.f.x.v v8, v16
854 %evec = sitofp <vscale x 8 x i8> %va to <vscale x 8 x double>
855 ret <vscale x 8 x double> %evec
858 define <vscale x 8 x double> @vuitofp_nxv8i8_nxv8f64(<vscale x 8 x i8> %va) {
859 ; CHECK-LABEL: vuitofp_nxv8i8_nxv8f64:
861 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
862 ; CHECK-NEXT: vzext.vf4 v16, v8
863 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v16
865 %evec = uitofp <vscale x 8 x i8> %va to <vscale x 8 x double>
866 ret <vscale x 8 x double> %evec
869 define <vscale x 16 x half> @vsitofp_nxv16i8_nxv16f16(<vscale x 16 x i8> %va) {
870 ; ZVFH-LABEL: vsitofp_nxv16i8_nxv16f16:
872 ; ZVFH-NEXT: vsetvli a0, zero, e8, m2, ta, ma
873 ; ZVFH-NEXT: vfwcvt.f.x.v v12, v8
874 ; ZVFH-NEXT: vmv4r.v v8, v12
877 ; ZVFHMIN-LABEL: vsitofp_nxv16i8_nxv16f16:
879 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
880 ; ZVFHMIN-NEXT: vsext.vf2 v12, v8
881 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v16, v12
882 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
884 %evec = sitofp <vscale x 16 x i8> %va to <vscale x 16 x half>
885 ret <vscale x 16 x half> %evec
888 define <vscale x 16 x half> @vuitofp_nxv16i8_nxv16f16(<vscale x 16 x i8> %va) {
889 ; ZVFH-LABEL: vuitofp_nxv16i8_nxv16f16:
891 ; ZVFH-NEXT: vsetvli a0, zero, e8, m2, ta, ma
892 ; ZVFH-NEXT: vfwcvt.f.xu.v v12, v8
893 ; ZVFH-NEXT: vmv4r.v v8, v12
896 ; ZVFHMIN-LABEL: vuitofp_nxv16i8_nxv16f16:
898 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
899 ; ZVFHMIN-NEXT: vzext.vf2 v12, v8
900 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v16, v12
901 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
903 %evec = uitofp <vscale x 16 x i8> %va to <vscale x 16 x half>
904 ret <vscale x 16 x half> %evec
907 define <vscale x 16 x float> @vsitofp_nxv16i8_nxv16f32(<vscale x 16 x i8> %va) {
908 ; CHECK-LABEL: vsitofp_nxv16i8_nxv16f32:
910 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
911 ; CHECK-NEXT: vsext.vf2 v16, v8
912 ; CHECK-NEXT: vfwcvt.f.x.v v8, v16
914 %evec = sitofp <vscale x 16 x i8> %va to <vscale x 16 x float>
915 ret <vscale x 16 x float> %evec
918 define <vscale x 16 x float> @vuitofp_nxv16i8_nxv16f32(<vscale x 16 x i8> %va) {
919 ; CHECK-LABEL: vuitofp_nxv16i8_nxv16f32:
921 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
922 ; CHECK-NEXT: vzext.vf2 v16, v8
923 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v16
925 %evec = uitofp <vscale x 16 x i8> %va to <vscale x 16 x float>
926 ret <vscale x 16 x float> %evec
929 define <vscale x 32 x half> @vsitofp_nxv32i8_nxv32f16(<vscale x 32 x i8> %va) {
930 ; ZVFH-LABEL: vsitofp_nxv32i8_nxv32f16:
932 ; ZVFH-NEXT: vsetvli a0, zero, e8, m4, ta, ma
933 ; ZVFH-NEXT: vfwcvt.f.x.v v16, v8
934 ; ZVFH-NEXT: vmv8r.v v8, v16
937 ; ZVFHMIN-LABEL: vsitofp_nxv32i8_nxv32f16:
939 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
940 ; ZVFHMIN-NEXT: vsext.vf2 v12, v8
941 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v24, v12
942 ; ZVFHMIN-NEXT: vfncvt.f.f.w v16, v24
943 ; ZVFHMIN-NEXT: vsext.vf2 v12, v10
944 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v24, v12
945 ; ZVFHMIN-NEXT: vfncvt.f.f.w v20, v24
946 ; ZVFHMIN-NEXT: vmv8r.v v8, v16
948 %evec = sitofp <vscale x 32 x i8> %va to <vscale x 32 x half>
949 ret <vscale x 32 x half> %evec
952 define <vscale x 32 x half> @vuitofp_nxv32i8_nxv32f16(<vscale x 32 x i8> %va) {
953 ; ZVFH-LABEL: vuitofp_nxv32i8_nxv32f16:
955 ; ZVFH-NEXT: vsetvli a0, zero, e8, m4, ta, ma
956 ; ZVFH-NEXT: vfwcvt.f.xu.v v16, v8
957 ; ZVFH-NEXT: vmv8r.v v8, v16
960 ; ZVFHMIN-LABEL: vuitofp_nxv32i8_nxv32f16:
962 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
963 ; ZVFHMIN-NEXT: vzext.vf2 v12, v8
964 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v24, v12
965 ; ZVFHMIN-NEXT: vfncvt.f.f.w v16, v24
966 ; ZVFHMIN-NEXT: vzext.vf2 v12, v10
967 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v24, v12
968 ; ZVFHMIN-NEXT: vfncvt.f.f.w v20, v24
969 ; ZVFHMIN-NEXT: vmv8r.v v8, v16
971 %evec = uitofp <vscale x 32 x i8> %va to <vscale x 32 x half>
972 ret <vscale x 32 x half> %evec
975 define <vscale x 1 x half> @vsitofp_nxv1i16_nxv1f16(<vscale x 1 x i16> %va) {
976 ; ZVFH-LABEL: vsitofp_nxv1i16_nxv1f16:
978 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
979 ; ZVFH-NEXT: vfcvt.f.x.v v8, v8
982 ; ZVFHMIN-LABEL: vsitofp_nxv1i16_nxv1f16:
984 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
985 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v9, v8
986 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
988 %evec = sitofp <vscale x 1 x i16> %va to <vscale x 1 x half>
989 ret <vscale x 1 x half> %evec
992 define <vscale x 1 x half> @vuitofp_nxv1i16_nxv1f16(<vscale x 1 x i16> %va) {
993 ; ZVFH-LABEL: vuitofp_nxv1i16_nxv1f16:
995 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
996 ; ZVFH-NEXT: vfcvt.f.xu.v v8, v8
999 ; ZVFHMIN-LABEL: vuitofp_nxv1i16_nxv1f16:
1001 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1002 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v9, v8
1003 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
1005 %evec = uitofp <vscale x 1 x i16> %va to <vscale x 1 x half>
1006 ret <vscale x 1 x half> %evec
1009 define <vscale x 1 x float> @vsitofp_nxv1i16_nxv1f32(<vscale x 1 x i16> %va) {
1010 ; CHECK-LABEL: vsitofp_nxv1i16_nxv1f32:
1012 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1013 ; CHECK-NEXT: vfwcvt.f.x.v v9, v8
1014 ; CHECK-NEXT: vmv1r.v v8, v9
1016 %evec = sitofp <vscale x 1 x i16> %va to <vscale x 1 x float>
1017 ret <vscale x 1 x float> %evec
1020 define <vscale x 1 x float> @vuitofp_nxv1i16_nxv1f32(<vscale x 1 x i16> %va) {
1021 ; CHECK-LABEL: vuitofp_nxv1i16_nxv1f32:
1023 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1024 ; CHECK-NEXT: vfwcvt.f.xu.v v9, v8
1025 ; CHECK-NEXT: vmv1r.v v8, v9
1027 %evec = uitofp <vscale x 1 x i16> %va to <vscale x 1 x float>
1028 ret <vscale x 1 x float> %evec
1031 define <vscale x 1 x double> @vsitofp_nxv1i16_nxv1f64(<vscale x 1 x i16> %va) {
1032 ; CHECK-LABEL: vsitofp_nxv1i16_nxv1f64:
1034 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1035 ; CHECK-NEXT: vsext.vf2 v9, v8
1036 ; CHECK-NEXT: vfwcvt.f.x.v v8, v9
1038 %evec = sitofp <vscale x 1 x i16> %va to <vscale x 1 x double>
1039 ret <vscale x 1 x double> %evec
1042 define <vscale x 1 x double> @vuitofp_nxv1i16_nxv1f64(<vscale x 1 x i16> %va) {
1043 ; CHECK-LABEL: vuitofp_nxv1i16_nxv1f64:
1045 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1046 ; CHECK-NEXT: vzext.vf2 v9, v8
1047 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v9
1049 %evec = uitofp <vscale x 1 x i16> %va to <vscale x 1 x double>
1050 ret <vscale x 1 x double> %evec
1053 define <vscale x 2 x half> @vsitofp_nxv2i16_nxv2f16(<vscale x 2 x i16> %va) {
1054 ; ZVFH-LABEL: vsitofp_nxv2i16_nxv2f16:
1056 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1057 ; ZVFH-NEXT: vfcvt.f.x.v v8, v8
1060 ; ZVFHMIN-LABEL: vsitofp_nxv2i16_nxv2f16:
1062 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1063 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v9, v8
1064 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
1066 %evec = sitofp <vscale x 2 x i16> %va to <vscale x 2 x half>
1067 ret <vscale x 2 x half> %evec
1070 define <vscale x 2 x half> @vuitofp_nxv2i16_nxv2f16(<vscale x 2 x i16> %va) {
1071 ; ZVFH-LABEL: vuitofp_nxv2i16_nxv2f16:
1073 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1074 ; ZVFH-NEXT: vfcvt.f.xu.v v8, v8
1077 ; ZVFHMIN-LABEL: vuitofp_nxv2i16_nxv2f16:
1079 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1080 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v9, v8
1081 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
1083 %evec = uitofp <vscale x 2 x i16> %va to <vscale x 2 x half>
1084 ret <vscale x 2 x half> %evec
1087 define <vscale x 2 x float> @vsitofp_nxv2i16_nxv2f32(<vscale x 2 x i16> %va) {
1088 ; CHECK-LABEL: vsitofp_nxv2i16_nxv2f32:
1090 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1091 ; CHECK-NEXT: vfwcvt.f.x.v v9, v8
1092 ; CHECK-NEXT: vmv1r.v v8, v9
1094 %evec = sitofp <vscale x 2 x i16> %va to <vscale x 2 x float>
1095 ret <vscale x 2 x float> %evec
1098 define <vscale x 2 x float> @vuitofp_nxv2i16_nxv2f32(<vscale x 2 x i16> %va) {
1099 ; CHECK-LABEL: vuitofp_nxv2i16_nxv2f32:
1101 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1102 ; CHECK-NEXT: vfwcvt.f.xu.v v9, v8
1103 ; CHECK-NEXT: vmv1r.v v8, v9
1105 %evec = uitofp <vscale x 2 x i16> %va to <vscale x 2 x float>
1106 ret <vscale x 2 x float> %evec
1109 define <vscale x 2 x double> @vsitofp_nxv2i16_nxv2f64(<vscale x 2 x i16> %va) {
1110 ; CHECK-LABEL: vsitofp_nxv2i16_nxv2f64:
1112 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1113 ; CHECK-NEXT: vsext.vf2 v10, v8
1114 ; CHECK-NEXT: vfwcvt.f.x.v v8, v10
1116 %evec = sitofp <vscale x 2 x i16> %va to <vscale x 2 x double>
1117 ret <vscale x 2 x double> %evec
1120 define <vscale x 2 x double> @vuitofp_nxv2i16_nxv2f64(<vscale x 2 x i16> %va) {
1121 ; CHECK-LABEL: vuitofp_nxv2i16_nxv2f64:
1123 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1124 ; CHECK-NEXT: vzext.vf2 v10, v8
1125 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v10
1127 %evec = uitofp <vscale x 2 x i16> %va to <vscale x 2 x double>
1128 ret <vscale x 2 x double> %evec
1131 define <vscale x 4 x half> @vsitofp_nxv4i16_nxv4f16(<vscale x 4 x i16> %va) {
1132 ; ZVFH-LABEL: vsitofp_nxv4i16_nxv4f16:
1134 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1135 ; ZVFH-NEXT: vfcvt.f.x.v v8, v8
1138 ; ZVFHMIN-LABEL: vsitofp_nxv4i16_nxv4f16:
1140 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1141 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v10, v8
1142 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
1144 %evec = sitofp <vscale x 4 x i16> %va to <vscale x 4 x half>
1145 ret <vscale x 4 x half> %evec
1148 define <vscale x 4 x half> @vuitofp_nxv4i16_nxv4f16(<vscale x 4 x i16> %va) {
1149 ; ZVFH-LABEL: vuitofp_nxv4i16_nxv4f16:
1151 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1152 ; ZVFH-NEXT: vfcvt.f.xu.v v8, v8
1155 ; ZVFHMIN-LABEL: vuitofp_nxv4i16_nxv4f16:
1157 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1158 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v10, v8
1159 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
1161 %evec = uitofp <vscale x 4 x i16> %va to <vscale x 4 x half>
1162 ret <vscale x 4 x half> %evec
1165 define <vscale x 4 x float> @vsitofp_nxv4i16_nxv4f32(<vscale x 4 x i16> %va) {
1166 ; CHECK-LABEL: vsitofp_nxv4i16_nxv4f32:
1168 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1169 ; CHECK-NEXT: vfwcvt.f.x.v v10, v8
1170 ; CHECK-NEXT: vmv2r.v v8, v10
1172 %evec = sitofp <vscale x 4 x i16> %va to <vscale x 4 x float>
1173 ret <vscale x 4 x float> %evec
1176 define <vscale x 4 x float> @vuitofp_nxv4i16_nxv4f32(<vscale x 4 x i16> %va) {
1177 ; CHECK-LABEL: vuitofp_nxv4i16_nxv4f32:
1179 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1180 ; CHECK-NEXT: vfwcvt.f.xu.v v10, v8
1181 ; CHECK-NEXT: vmv2r.v v8, v10
1183 %evec = uitofp <vscale x 4 x i16> %va to <vscale x 4 x float>
1184 ret <vscale x 4 x float> %evec
1187 define <vscale x 4 x double> @vsitofp_nxv4i16_nxv4f64(<vscale x 4 x i16> %va) {
1188 ; CHECK-LABEL: vsitofp_nxv4i16_nxv4f64:
1190 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1191 ; CHECK-NEXT: vsext.vf2 v12, v8
1192 ; CHECK-NEXT: vfwcvt.f.x.v v8, v12
1194 %evec = sitofp <vscale x 4 x i16> %va to <vscale x 4 x double>
1195 ret <vscale x 4 x double> %evec
1198 define <vscale x 4 x double> @vuitofp_nxv4i16_nxv4f64(<vscale x 4 x i16> %va) {
1199 ; CHECK-LABEL: vuitofp_nxv4i16_nxv4f64:
1201 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1202 ; CHECK-NEXT: vzext.vf2 v12, v8
1203 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v12
1205 %evec = uitofp <vscale x 4 x i16> %va to <vscale x 4 x double>
1206 ret <vscale x 4 x double> %evec
1209 define <vscale x 8 x half> @vsitofp_nxv8i16_nxv8f16(<vscale x 8 x i16> %va) {
1210 ; ZVFH-LABEL: vsitofp_nxv8i16_nxv8f16:
1212 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1213 ; ZVFH-NEXT: vfcvt.f.x.v v8, v8
1216 ; ZVFHMIN-LABEL: vsitofp_nxv8i16_nxv8f16:
1218 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1219 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v12, v8
1220 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
1222 %evec = sitofp <vscale x 8 x i16> %va to <vscale x 8 x half>
1223 ret <vscale x 8 x half> %evec
1226 define <vscale x 8 x half> @vuitofp_nxv8i16_nxv8f16(<vscale x 8 x i16> %va) {
1227 ; ZVFH-LABEL: vuitofp_nxv8i16_nxv8f16:
1229 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1230 ; ZVFH-NEXT: vfcvt.f.xu.v v8, v8
1233 ; ZVFHMIN-LABEL: vuitofp_nxv8i16_nxv8f16:
1235 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1236 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v12, v8
1237 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
1239 %evec = uitofp <vscale x 8 x i16> %va to <vscale x 8 x half>
1240 ret <vscale x 8 x half> %evec
1243 define <vscale x 8 x float> @vsitofp_nxv8i16_nxv8f32(<vscale x 8 x i16> %va) {
1244 ; CHECK-LABEL: vsitofp_nxv8i16_nxv8f32:
1246 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1247 ; CHECK-NEXT: vfwcvt.f.x.v v12, v8
1248 ; CHECK-NEXT: vmv4r.v v8, v12
1250 %evec = sitofp <vscale x 8 x i16> %va to <vscale x 8 x float>
1251 ret <vscale x 8 x float> %evec
1254 define <vscale x 8 x float> @vuitofp_nxv8i16_nxv8f32(<vscale x 8 x i16> %va) {
1255 ; CHECK-LABEL: vuitofp_nxv8i16_nxv8f32:
1257 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1258 ; CHECK-NEXT: vfwcvt.f.xu.v v12, v8
1259 ; CHECK-NEXT: vmv4r.v v8, v12
1261 %evec = uitofp <vscale x 8 x i16> %va to <vscale x 8 x float>
1262 ret <vscale x 8 x float> %evec
1265 define <vscale x 8 x double> @vsitofp_nxv8i16_nxv8f64(<vscale x 8 x i16> %va) {
1266 ; CHECK-LABEL: vsitofp_nxv8i16_nxv8f64:
1268 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1269 ; CHECK-NEXT: vsext.vf2 v16, v8
1270 ; CHECK-NEXT: vfwcvt.f.x.v v8, v16
1272 %evec = sitofp <vscale x 8 x i16> %va to <vscale x 8 x double>
1273 ret <vscale x 8 x double> %evec
1276 define <vscale x 8 x double> @vuitofp_nxv8i16_nxv8f64(<vscale x 8 x i16> %va) {
1277 ; CHECK-LABEL: vuitofp_nxv8i16_nxv8f64:
1279 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1280 ; CHECK-NEXT: vzext.vf2 v16, v8
1281 ; CHECK-NEXT: vfwcvt.f.xu.v v8, v16
1283 %evec = uitofp <vscale x 8 x i16> %va to <vscale x 8 x double>
1284 ret <vscale x 8 x double> %evec
1287 define <vscale x 16 x half> @vsitofp_nxv16i16_nxv16f16(<vscale x 16 x i16> %va) {
1288 ; ZVFH-LABEL: vsitofp_nxv16i16_nxv16f16:
1290 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1291 ; ZVFH-NEXT: vfcvt.f.x.v v8, v8
1294 ; ZVFHMIN-LABEL: vsitofp_nxv16i16_nxv16f16:
1296 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1297 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v16, v8
1298 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
1300 %evec = sitofp <vscale x 16 x i16> %va to <vscale x 16 x half>
1301 ret <vscale x 16 x half> %evec
1304 define <vscale x 16 x half> @vuitofp_nxv16i16_nxv16f16(<vscale x 16 x i16> %va) {
1305 ; ZVFH-LABEL: vuitofp_nxv16i16_nxv16f16:
1307 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1308 ; ZVFH-NEXT: vfcvt.f.xu.v v8, v8
1311 ; ZVFHMIN-LABEL: vuitofp_nxv16i16_nxv16f16:
1313 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1314 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v16, v8
1315 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
1317 %evec = uitofp <vscale x 16 x i16> %va to <vscale x 16 x half>
1318 ret <vscale x 16 x half> %evec
1321 define <vscale x 16 x float> @vsitofp_nxv16i16_nxv16f32(<vscale x 16 x i16> %va) {
1322 ; CHECK-LABEL: vsitofp_nxv16i16_nxv16f32:
1324 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1325 ; CHECK-NEXT: vfwcvt.f.x.v v16, v8
1326 ; CHECK-NEXT: vmv8r.v v8, v16
1328 %evec = sitofp <vscale x 16 x i16> %va to <vscale x 16 x float>
1329 ret <vscale x 16 x float> %evec
1332 define <vscale x 16 x float> @vuitofp_nxv16i16_nxv16f32(<vscale x 16 x i16> %va) {
1333 ; CHECK-LABEL: vuitofp_nxv16i16_nxv16f32:
1335 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1336 ; CHECK-NEXT: vfwcvt.f.xu.v v16, v8
1337 ; CHECK-NEXT: vmv8r.v v8, v16
1339 %evec = uitofp <vscale x 16 x i16> %va to <vscale x 16 x float>
1340 ret <vscale x 16 x float> %evec
1343 define <vscale x 32 x half> @vsitofp_nxv32i16_nxv32f16(<vscale x 32 x i16> %va) {
1344 ; ZVFH-LABEL: vsitofp_nxv32i16_nxv32f16:
1346 ; ZVFH-NEXT: vsetvli a0, zero, e16, m8, ta, ma
1347 ; ZVFH-NEXT: vfcvt.f.x.v v8, v8
1350 ; ZVFHMIN-LABEL: vsitofp_nxv32i16_nxv32f16:
1352 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1353 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v16, v8
1354 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
1355 ; ZVFHMIN-NEXT: vfwcvt.f.x.v v16, v12
1356 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1358 %evec = sitofp <vscale x 32 x i16> %va to <vscale x 32 x half>
1359 ret <vscale x 32 x half> %evec
1362 define <vscale x 32 x half> @vuitofp_nxv32i16_nxv32f16(<vscale x 32 x i16> %va) {
1363 ; ZVFH-LABEL: vuitofp_nxv32i16_nxv32f16:
1365 ; ZVFH-NEXT: vsetvli a0, zero, e16, m8, ta, ma
1366 ; ZVFH-NEXT: vfcvt.f.xu.v v8, v8
1369 ; ZVFHMIN-LABEL: vuitofp_nxv32i16_nxv32f16:
1371 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1372 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v16, v8
1373 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
1374 ; ZVFHMIN-NEXT: vfwcvt.f.xu.v v16, v12
1375 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
1377 %evec = uitofp <vscale x 32 x i16> %va to <vscale x 32 x half>
1378 ret <vscale x 32 x half> %evec
1381 define <vscale x 1 x half> @vsitofp_nxv1i32_nxv1f16(<vscale x 1 x i32> %va) {
1382 ; ZVFH-LABEL: vsitofp_nxv1i32_nxv1f16:
1384 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1385 ; ZVFH-NEXT: vfncvt.f.x.w v9, v8
1386 ; ZVFH-NEXT: vmv1r.v v8, v9
1389 ; ZVFHMIN-LABEL: vsitofp_nxv1i32_nxv1f16:
1391 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1392 ; ZVFHMIN-NEXT: vfcvt.f.x.v v9, v8
1393 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
1394 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
1396 %evec = sitofp <vscale x 1 x i32> %va to <vscale x 1 x half>
1397 ret <vscale x 1 x half> %evec
1400 define <vscale x 1 x half> @vuitofp_nxv1i32_nxv1f16(<vscale x 1 x i32> %va) {
1401 ; ZVFH-LABEL: vuitofp_nxv1i32_nxv1f16:
1403 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1404 ; ZVFH-NEXT: vfncvt.f.xu.w v9, v8
1405 ; ZVFH-NEXT: vmv1r.v v8, v9
1408 ; ZVFHMIN-LABEL: vuitofp_nxv1i32_nxv1f16:
1410 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1411 ; ZVFHMIN-NEXT: vfcvt.f.xu.v v9, v8
1412 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
1413 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
1415 %evec = uitofp <vscale x 1 x i32> %va to <vscale x 1 x half>
1416 ret <vscale x 1 x half> %evec
1419 define <vscale x 1 x float> @vsitofp_nxv1i32_nxv1f32(<vscale x 1 x i32> %va) {
1420 ; CHECK-LABEL: vsitofp_nxv1i32_nxv1f32:
1422 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1423 ; CHECK-NEXT: vfcvt.f.x.v v8, v8
1425 %evec = sitofp <vscale x 1 x i32> %va to <vscale x 1 x float>
1426 ret <vscale x 1 x float> %evec
1429 define <vscale x 1 x float> @vuitofp_nxv1i32_nxv1f32(<vscale x 1 x i32> %va) {
1430 ; CHECK-LABEL: vuitofp_nxv1i32_nxv1f32:
1432 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1433 ; CHECK-NEXT: vfcvt.f.xu.v v8, v8
1435 %evec = uitofp <vscale x 1 x i32> %va to <vscale x 1 x float>
1436 ret <vscale x 1 x float> %evec
1439 define <vscale x 1 x double> @vsitofp_nxv1i32_nxv1f64(<vscale x 1 x i32> %va) {
1440 ; CHECK-LABEL: vsitofp_nxv1i32_nxv1f64:
1442 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1443 ; CHECK-NEXT: vfwcvt.f.x.v v9, v8
1444 ; CHECK-NEXT: vmv1r.v v8, v9
1446 %evec = sitofp <vscale x 1 x i32> %va to <vscale x 1 x double>
1447 ret <vscale x 1 x double> %evec
1450 define <vscale x 1 x double> @vuitofp_nxv1i32_nxv1f64(<vscale x 1 x i32> %va) {
1451 ; CHECK-LABEL: vuitofp_nxv1i32_nxv1f64:
1453 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1454 ; CHECK-NEXT: vfwcvt.f.xu.v v9, v8
1455 ; CHECK-NEXT: vmv1r.v v8, v9
1457 %evec = uitofp <vscale x 1 x i32> %va to <vscale x 1 x double>
1458 ret <vscale x 1 x double> %evec
1461 define <vscale x 2 x half> @vsitofp_nxv2i32_nxv2f16(<vscale x 2 x i32> %va) {
1462 ; ZVFH-LABEL: vsitofp_nxv2i32_nxv2f16:
1464 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1465 ; ZVFH-NEXT: vfncvt.f.x.w v9, v8
1466 ; ZVFH-NEXT: vmv1r.v v8, v9
1469 ; ZVFHMIN-LABEL: vsitofp_nxv2i32_nxv2f16:
1471 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1472 ; ZVFHMIN-NEXT: vfcvt.f.x.v v9, v8
1473 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
1474 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
1476 %evec = sitofp <vscale x 2 x i32> %va to <vscale x 2 x half>
1477 ret <vscale x 2 x half> %evec
1480 define <vscale x 2 x half> @vuitofp_nxv2i32_nxv2f16(<vscale x 2 x i32> %va) {
1481 ; ZVFH-LABEL: vuitofp_nxv2i32_nxv2f16:
1483 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1484 ; ZVFH-NEXT: vfncvt.f.xu.w v9, v8
1485 ; ZVFH-NEXT: vmv1r.v v8, v9
1488 ; ZVFHMIN-LABEL: vuitofp_nxv2i32_nxv2f16:
1490 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1491 ; ZVFHMIN-NEXT: vfcvt.f.xu.v v9, v8
1492 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
1493 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
1495 %evec = uitofp <vscale x 2 x i32> %va to <vscale x 2 x half>
1496 ret <vscale x 2 x half> %evec
1499 define <vscale x 2 x float> @vsitofp_nxv2i32_nxv2f32(<vscale x 2 x i32> %va) {
1500 ; CHECK-LABEL: vsitofp_nxv2i32_nxv2f32:
1502 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1503 ; CHECK-NEXT: vfcvt.f.x.v v8, v8
1505 %evec = sitofp <vscale x 2 x i32> %va to <vscale x 2 x float>
1506 ret <vscale x 2 x float> %evec
1509 define <vscale x 2 x float> @vuitofp_nxv2i32_nxv2f32(<vscale x 2 x i32> %va) {
1510 ; CHECK-LABEL: vuitofp_nxv2i32_nxv2f32:
1512 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1513 ; CHECK-NEXT: vfcvt.f.xu.v v8, v8
1515 %evec = uitofp <vscale x 2 x i32> %va to <vscale x 2 x float>
1516 ret <vscale x 2 x float> %evec
1519 define <vscale x 2 x double> @vsitofp_nxv2i32_nxv2f64(<vscale x 2 x i32> %va) {
1520 ; CHECK-LABEL: vsitofp_nxv2i32_nxv2f64:
1522 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1523 ; CHECK-NEXT: vfwcvt.f.x.v v10, v8
1524 ; CHECK-NEXT: vmv2r.v v8, v10
1526 %evec = sitofp <vscale x 2 x i32> %va to <vscale x 2 x double>
1527 ret <vscale x 2 x double> %evec
1530 define <vscale x 2 x double> @vuitofp_nxv2i32_nxv2f64(<vscale x 2 x i32> %va) {
1531 ; CHECK-LABEL: vuitofp_nxv2i32_nxv2f64:
1533 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1534 ; CHECK-NEXT: vfwcvt.f.xu.v v10, v8
1535 ; CHECK-NEXT: vmv2r.v v8, v10
1537 %evec = uitofp <vscale x 2 x i32> %va to <vscale x 2 x double>
1538 ret <vscale x 2 x double> %evec
1541 define <vscale x 4 x half> @vsitofp_nxv4i32_nxv4f16(<vscale x 4 x i32> %va) {
1542 ; ZVFH-LABEL: vsitofp_nxv4i32_nxv4f16:
1544 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1545 ; ZVFH-NEXT: vfncvt.f.x.w v10, v8
1546 ; ZVFH-NEXT: vmv.v.v v8, v10
1549 ; ZVFHMIN-LABEL: vsitofp_nxv4i32_nxv4f16:
1551 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1552 ; ZVFHMIN-NEXT: vfcvt.f.x.v v10, v8
1553 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1554 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
1556 %evec = sitofp <vscale x 4 x i32> %va to <vscale x 4 x half>
1557 ret <vscale x 4 x half> %evec
1560 define <vscale x 4 x half> @vuitofp_nxv4i32_nxv4f16(<vscale x 4 x i32> %va) {
1561 ; ZVFH-LABEL: vuitofp_nxv4i32_nxv4f16:
1563 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1564 ; ZVFH-NEXT: vfncvt.f.xu.w v10, v8
1565 ; ZVFH-NEXT: vmv.v.v v8, v10
1568 ; ZVFHMIN-LABEL: vuitofp_nxv4i32_nxv4f16:
1570 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1571 ; ZVFHMIN-NEXT: vfcvt.f.xu.v v10, v8
1572 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1573 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
1575 %evec = uitofp <vscale x 4 x i32> %va to <vscale x 4 x half>
1576 ret <vscale x 4 x half> %evec
1579 define <vscale x 4 x float> @vsitofp_nxv4i32_nxv4f32(<vscale x 4 x i32> %va) {
1580 ; CHECK-LABEL: vsitofp_nxv4i32_nxv4f32:
1582 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1583 ; CHECK-NEXT: vfcvt.f.x.v v8, v8
1585 %evec = sitofp <vscale x 4 x i32> %va to <vscale x 4 x float>
1586 ret <vscale x 4 x float> %evec
1589 define <vscale x 4 x float> @vuitofp_nxv4i32_nxv4f32(<vscale x 4 x i32> %va) {
1590 ; CHECK-LABEL: vuitofp_nxv4i32_nxv4f32:
1592 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1593 ; CHECK-NEXT: vfcvt.f.xu.v v8, v8
1595 %evec = uitofp <vscale x 4 x i32> %va to <vscale x 4 x float>
1596 ret <vscale x 4 x float> %evec
1599 define <vscale x 4 x double> @vsitofp_nxv4i32_nxv4f64(<vscale x 4 x i32> %va) {
1600 ; CHECK-LABEL: vsitofp_nxv4i32_nxv4f64:
1602 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1603 ; CHECK-NEXT: vfwcvt.f.x.v v12, v8
1604 ; CHECK-NEXT: vmv4r.v v8, v12
1606 %evec = sitofp <vscale x 4 x i32> %va to <vscale x 4 x double>
1607 ret <vscale x 4 x double> %evec
1610 define <vscale x 4 x double> @vuitofp_nxv4i32_nxv4f64(<vscale x 4 x i32> %va) {
1611 ; CHECK-LABEL: vuitofp_nxv4i32_nxv4f64:
1613 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1614 ; CHECK-NEXT: vfwcvt.f.xu.v v12, v8
1615 ; CHECK-NEXT: vmv4r.v v8, v12
1617 %evec = uitofp <vscale x 4 x i32> %va to <vscale x 4 x double>
1618 ret <vscale x 4 x double> %evec
1621 define <vscale x 8 x half> @vsitofp_nxv8i32_nxv8f16(<vscale x 8 x i32> %va) {
1622 ; ZVFH-LABEL: vsitofp_nxv8i32_nxv8f16:
1624 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1625 ; ZVFH-NEXT: vfncvt.f.x.w v12, v8
1626 ; ZVFH-NEXT: vmv.v.v v8, v12
1629 ; ZVFHMIN-LABEL: vsitofp_nxv8i32_nxv8f16:
1631 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1632 ; ZVFHMIN-NEXT: vfcvt.f.x.v v12, v8
1633 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
1634 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
1636 %evec = sitofp <vscale x 8 x i32> %va to <vscale x 8 x half>
1637 ret <vscale x 8 x half> %evec
1640 define <vscale x 8 x half> @vuitofp_nxv8i32_nxv8f16(<vscale x 8 x i32> %va) {
1641 ; ZVFH-LABEL: vuitofp_nxv8i32_nxv8f16:
1643 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1644 ; ZVFH-NEXT: vfncvt.f.xu.w v12, v8
1645 ; ZVFH-NEXT: vmv.v.v v8, v12
1648 ; ZVFHMIN-LABEL: vuitofp_nxv8i32_nxv8f16:
1650 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1651 ; ZVFHMIN-NEXT: vfcvt.f.xu.v v12, v8
1652 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
1653 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
1655 %evec = uitofp <vscale x 8 x i32> %va to <vscale x 8 x half>
1656 ret <vscale x 8 x half> %evec
1659 define <vscale x 8 x float> @vsitofp_nxv8i32_nxv8f32(<vscale x 8 x i32> %va) {
1660 ; CHECK-LABEL: vsitofp_nxv8i32_nxv8f32:
1662 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1663 ; CHECK-NEXT: vfcvt.f.x.v v8, v8
1665 %evec = sitofp <vscale x 8 x i32> %va to <vscale x 8 x float>
1666 ret <vscale x 8 x float> %evec
1669 define <vscale x 8 x float> @vuitofp_nxv8i32_nxv8f32(<vscale x 8 x i32> %va) {
1670 ; CHECK-LABEL: vuitofp_nxv8i32_nxv8f32:
1672 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1673 ; CHECK-NEXT: vfcvt.f.xu.v v8, v8
1675 %evec = uitofp <vscale x 8 x i32> %va to <vscale x 8 x float>
1676 ret <vscale x 8 x float> %evec
1679 define <vscale x 8 x double> @vsitofp_nxv8i32_nxv8f64(<vscale x 8 x i32> %va) {
1680 ; CHECK-LABEL: vsitofp_nxv8i32_nxv8f64:
1682 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1683 ; CHECK-NEXT: vfwcvt.f.x.v v16, v8
1684 ; CHECK-NEXT: vmv8r.v v8, v16
1686 %evec = sitofp <vscale x 8 x i32> %va to <vscale x 8 x double>
1687 ret <vscale x 8 x double> %evec
1690 define <vscale x 8 x double> @vuitofp_nxv8i32_nxv8f64(<vscale x 8 x i32> %va) {
1691 ; CHECK-LABEL: vuitofp_nxv8i32_nxv8f64:
1693 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1694 ; CHECK-NEXT: vfwcvt.f.xu.v v16, v8
1695 ; CHECK-NEXT: vmv8r.v v8, v16
1697 %evec = uitofp <vscale x 8 x i32> %va to <vscale x 8 x double>
1698 ret <vscale x 8 x double> %evec
1701 define <vscale x 16 x half> @vsitofp_nxv16i32_nxv16f16(<vscale x 16 x i32> %va) {
1702 ; ZVFH-LABEL: vsitofp_nxv16i32_nxv16f16:
1704 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1705 ; ZVFH-NEXT: vfncvt.f.x.w v16, v8
1706 ; ZVFH-NEXT: vmv.v.v v8, v16
1709 ; ZVFHMIN-LABEL: vsitofp_nxv16i32_nxv16f16:
1711 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1712 ; ZVFHMIN-NEXT: vfcvt.f.x.v v16, v8
1713 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1714 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
1716 %evec = sitofp <vscale x 16 x i32> %va to <vscale x 16 x half>
1717 ret <vscale x 16 x half> %evec
1720 define <vscale x 16 x half> @vuitofp_nxv16i32_nxv16f16(<vscale x 16 x i32> %va) {
1721 ; ZVFH-LABEL: vuitofp_nxv16i32_nxv16f16:
1723 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1724 ; ZVFH-NEXT: vfncvt.f.xu.w v16, v8
1725 ; ZVFH-NEXT: vmv.v.v v8, v16
1728 ; ZVFHMIN-LABEL: vuitofp_nxv16i32_nxv16f16:
1730 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1731 ; ZVFHMIN-NEXT: vfcvt.f.xu.v v16, v8
1732 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
1733 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
1735 %evec = uitofp <vscale x 16 x i32> %va to <vscale x 16 x half>
1736 ret <vscale x 16 x half> %evec
1739 define <vscale x 16 x float> @vsitofp_nxv16i32_nxv16f32(<vscale x 16 x i32> %va) {
1740 ; CHECK-LABEL: vsitofp_nxv16i32_nxv16f32:
1742 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1743 ; CHECK-NEXT: vfcvt.f.x.v v8, v8
1745 %evec = sitofp <vscale x 16 x i32> %va to <vscale x 16 x float>
1746 ret <vscale x 16 x float> %evec
1749 define <vscale x 16 x float> @vuitofp_nxv16i32_nxv16f32(<vscale x 16 x i32> %va) {
1750 ; CHECK-LABEL: vuitofp_nxv16i32_nxv16f32:
1752 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1753 ; CHECK-NEXT: vfcvt.f.xu.v v8, v8
1755 %evec = uitofp <vscale x 16 x i32> %va to <vscale x 16 x float>
1756 ret <vscale x 16 x float> %evec
1759 define <vscale x 1 x half> @vsitofp_nxv1i64_nxv1f16(<vscale x 1 x i64> %va) {
1760 ; CHECK-LABEL: vsitofp_nxv1i64_nxv1f16:
1762 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1763 ; CHECK-NEXT: vfncvt.f.x.w v9, v8
1764 ; CHECK-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
1765 ; CHECK-NEXT: vfncvt.f.f.w v8, v9
1767 %evec = sitofp <vscale x 1 x i64> %va to <vscale x 1 x half>
1768 ret <vscale x 1 x half> %evec
1771 define <vscale x 1 x half> @vuitofp_nxv1i64_nxv1f16(<vscale x 1 x i64> %va) {
1772 ; CHECK-LABEL: vuitofp_nxv1i64_nxv1f16:
1774 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1775 ; CHECK-NEXT: vfncvt.f.xu.w v9, v8
1776 ; CHECK-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
1777 ; CHECK-NEXT: vfncvt.f.f.w v8, v9
1779 %evec = uitofp <vscale x 1 x i64> %va to <vscale x 1 x half>
1780 ret <vscale x 1 x half> %evec
1783 define <vscale x 1 x float> @vsitofp_nxv1i64_nxv1f32(<vscale x 1 x i64> %va) {
1784 ; CHECK-LABEL: vsitofp_nxv1i64_nxv1f32:
1786 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1787 ; CHECK-NEXT: vfncvt.f.x.w v9, v8
1788 ; CHECK-NEXT: vmv1r.v v8, v9
1790 %evec = sitofp <vscale x 1 x i64> %va to <vscale x 1 x float>
1791 ret <vscale x 1 x float> %evec
1794 define <vscale x 1 x float> @vuitofp_nxv1i64_nxv1f32(<vscale x 1 x i64> %va) {
1795 ; CHECK-LABEL: vuitofp_nxv1i64_nxv1f32:
1797 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1798 ; CHECK-NEXT: vfncvt.f.xu.w v9, v8
1799 ; CHECK-NEXT: vmv1r.v v8, v9
1801 %evec = uitofp <vscale x 1 x i64> %va to <vscale x 1 x float>
1802 ret <vscale x 1 x float> %evec
1805 define <vscale x 1 x double> @vsitofp_nxv1i64_nxv1f64(<vscale x 1 x i64> %va) {
1806 ; CHECK-LABEL: vsitofp_nxv1i64_nxv1f64:
1808 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1809 ; CHECK-NEXT: vfcvt.f.x.v v8, v8
1811 %evec = sitofp <vscale x 1 x i64> %va to <vscale x 1 x double>
1812 ret <vscale x 1 x double> %evec
1815 define <vscale x 1 x double> @vuitofp_nxv1i64_nxv1f64(<vscale x 1 x i64> %va) {
1816 ; CHECK-LABEL: vuitofp_nxv1i64_nxv1f64:
1818 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1819 ; CHECK-NEXT: vfcvt.f.xu.v v8, v8
1821 %evec = uitofp <vscale x 1 x i64> %va to <vscale x 1 x double>
1822 ret <vscale x 1 x double> %evec
1825 define <vscale x 2 x half> @vsitofp_nxv2i64_nxv2f16(<vscale x 2 x i64> %va) {
1826 ; CHECK-LABEL: vsitofp_nxv2i64_nxv2f16:
1828 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1829 ; CHECK-NEXT: vfncvt.f.x.w v10, v8
1830 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
1831 ; CHECK-NEXT: vfncvt.f.f.w v8, v10
1833 %evec = sitofp <vscale x 2 x i64> %va to <vscale x 2 x half>
1834 ret <vscale x 2 x half> %evec
1837 define <vscale x 2 x half> @vuitofp_nxv2i64_nxv2f16(<vscale x 2 x i64> %va) {
1838 ; CHECK-LABEL: vuitofp_nxv2i64_nxv2f16:
1840 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1841 ; CHECK-NEXT: vfncvt.f.xu.w v10, v8
1842 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
1843 ; CHECK-NEXT: vfncvt.f.f.w v8, v10
1845 %evec = uitofp <vscale x 2 x i64> %va to <vscale x 2 x half>
1846 ret <vscale x 2 x half> %evec
1849 define <vscale x 2 x float> @vsitofp_nxv2i64_nxv2f32(<vscale x 2 x i64> %va) {
1850 ; CHECK-LABEL: vsitofp_nxv2i64_nxv2f32:
1852 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1853 ; CHECK-NEXT: vfncvt.f.x.w v10, v8
1854 ; CHECK-NEXT: vmv.v.v v8, v10
1856 %evec = sitofp <vscale x 2 x i64> %va to <vscale x 2 x float>
1857 ret <vscale x 2 x float> %evec
1860 define <vscale x 2 x float> @vuitofp_nxv2i64_nxv2f32(<vscale x 2 x i64> %va) {
1861 ; CHECK-LABEL: vuitofp_nxv2i64_nxv2f32:
1863 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1864 ; CHECK-NEXT: vfncvt.f.xu.w v10, v8
1865 ; CHECK-NEXT: vmv.v.v v8, v10
1867 %evec = uitofp <vscale x 2 x i64> %va to <vscale x 2 x float>
1868 ret <vscale x 2 x float> %evec
1871 define <vscale x 2 x double> @vsitofp_nxv2i64_nxv2f64(<vscale x 2 x i64> %va) {
1872 ; CHECK-LABEL: vsitofp_nxv2i64_nxv2f64:
1874 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1875 ; CHECK-NEXT: vfcvt.f.x.v v8, v8
1877 %evec = sitofp <vscale x 2 x i64> %va to <vscale x 2 x double>
1878 ret <vscale x 2 x double> %evec
1881 define <vscale x 2 x double> @vuitofp_nxv2i64_nxv2f64(<vscale x 2 x i64> %va) {
1882 ; CHECK-LABEL: vuitofp_nxv2i64_nxv2f64:
1884 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1885 ; CHECK-NEXT: vfcvt.f.xu.v v8, v8
1887 %evec = uitofp <vscale x 2 x i64> %va to <vscale x 2 x double>
1888 ret <vscale x 2 x double> %evec
1891 define <vscale x 4 x half> @vsitofp_nxv4i64_nxv4f16(<vscale x 4 x i64> %va) {
1892 ; CHECK-LABEL: vsitofp_nxv4i64_nxv4f16:
1894 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1895 ; CHECK-NEXT: vfncvt.f.x.w v12, v8
1896 ; CHECK-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1897 ; CHECK-NEXT: vfncvt.f.f.w v8, v12
1899 %evec = sitofp <vscale x 4 x i64> %va to <vscale x 4 x half>
1900 ret <vscale x 4 x half> %evec
1903 define <vscale x 4 x half> @vuitofp_nxv4i64_nxv4f16(<vscale x 4 x i64> %va) {
1904 ; CHECK-LABEL: vuitofp_nxv4i64_nxv4f16:
1906 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1907 ; CHECK-NEXT: vfncvt.f.xu.w v12, v8
1908 ; CHECK-NEXT: vsetvli zero, zero, e16, m1, ta, ma
1909 ; CHECK-NEXT: vfncvt.f.f.w v8, v12
1911 %evec = uitofp <vscale x 4 x i64> %va to <vscale x 4 x half>
1912 ret <vscale x 4 x half> %evec
1915 define <vscale x 4 x float> @vsitofp_nxv4i64_nxv4f32(<vscale x 4 x i64> %va) {
1916 ; CHECK-LABEL: vsitofp_nxv4i64_nxv4f32:
1918 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1919 ; CHECK-NEXT: vfncvt.f.x.w v12, v8
1920 ; CHECK-NEXT: vmv.v.v v8, v12
1922 %evec = sitofp <vscale x 4 x i64> %va to <vscale x 4 x float>
1923 ret <vscale x 4 x float> %evec
1926 define <vscale x 4 x float> @vuitofp_nxv4i64_nxv4f32(<vscale x 4 x i64> %va) {
1927 ; CHECK-LABEL: vuitofp_nxv4i64_nxv4f32:
1929 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1930 ; CHECK-NEXT: vfncvt.f.xu.w v12, v8
1931 ; CHECK-NEXT: vmv.v.v v8, v12
1933 %evec = uitofp <vscale x 4 x i64> %va to <vscale x 4 x float>
1934 ret <vscale x 4 x float> %evec
1937 define <vscale x 4 x double> @vsitofp_nxv4i64_nxv4f64(<vscale x 4 x i64> %va) {
1938 ; CHECK-LABEL: vsitofp_nxv4i64_nxv4f64:
1940 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1941 ; CHECK-NEXT: vfcvt.f.x.v v8, v8
1943 %evec = sitofp <vscale x 4 x i64> %va to <vscale x 4 x double>
1944 ret <vscale x 4 x double> %evec
1947 define <vscale x 4 x double> @vuitofp_nxv4i64_nxv4f64(<vscale x 4 x i64> %va) {
1948 ; CHECK-LABEL: vuitofp_nxv4i64_nxv4f64:
1950 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1951 ; CHECK-NEXT: vfcvt.f.xu.v v8, v8
1953 %evec = uitofp <vscale x 4 x i64> %va to <vscale x 4 x double>
1954 ret <vscale x 4 x double> %evec
1957 define <vscale x 8 x half> @vsitofp_nxv8i64_nxv8f16(<vscale x 8 x i64> %va) {
1958 ; CHECK-LABEL: vsitofp_nxv8i64_nxv8f16:
1960 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1961 ; CHECK-NEXT: vfncvt.f.x.w v16, v8
1962 ; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, ma
1963 ; CHECK-NEXT: vfncvt.f.f.w v8, v16
1965 %evec = sitofp <vscale x 8 x i64> %va to <vscale x 8 x half>
1966 ret <vscale x 8 x half> %evec
1969 define <vscale x 8 x half> @vuitofp_nxv8i64_nxv8f16(<vscale x 8 x i64> %va) {
1970 ; CHECK-LABEL: vuitofp_nxv8i64_nxv8f16:
1972 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1973 ; CHECK-NEXT: vfncvt.f.xu.w v16, v8
1974 ; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, ma
1975 ; CHECK-NEXT: vfncvt.f.f.w v8, v16
1977 %evec = uitofp <vscale x 8 x i64> %va to <vscale x 8 x half>
1978 ret <vscale x 8 x half> %evec
1981 define <vscale x 8 x float> @vsitofp_nxv8i64_nxv8f32(<vscale x 8 x i64> %va) {
1982 ; CHECK-LABEL: vsitofp_nxv8i64_nxv8f32:
1984 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1985 ; CHECK-NEXT: vfncvt.f.x.w v16, v8
1986 ; CHECK-NEXT: vmv.v.v v8, v16
1988 %evec = sitofp <vscale x 8 x i64> %va to <vscale x 8 x float>
1989 ret <vscale x 8 x float> %evec
1992 define <vscale x 8 x float> @vuitofp_nxv8i64_nxv8f32(<vscale x 8 x i64> %va) {
1993 ; CHECK-LABEL: vuitofp_nxv8i64_nxv8f32:
1995 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1996 ; CHECK-NEXT: vfncvt.f.xu.w v16, v8
1997 ; CHECK-NEXT: vmv.v.v v8, v16
1999 %evec = uitofp <vscale x 8 x i64> %va to <vscale x 8 x float>
2000 ret <vscale x 8 x float> %evec
2003 define <vscale x 8 x double> @vsitofp_nxv8i64_nxv8f64(<vscale x 8 x i64> %va) {
2004 ; CHECK-LABEL: vsitofp_nxv8i64_nxv8f64:
2006 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2007 ; CHECK-NEXT: vfcvt.f.x.v v8, v8
2009 %evec = sitofp <vscale x 8 x i64> %va to <vscale x 8 x double>
2010 ret <vscale x 8 x double> %evec
2013 define <vscale x 8 x double> @vuitofp_nxv8i64_nxv8f64(<vscale x 8 x i64> %va) {
2014 ; CHECK-LABEL: vuitofp_nxv8i64_nxv8f64:
2016 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2017 ; CHECK-NEXT: vfcvt.f.xu.v v8, v8
2019 %evec = uitofp <vscale x 8 x i64> %va to <vscale x 8 x double>
2020 ret <vscale x 8 x double> %evec