1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+m,+v,+zfh,+zvfh < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
3 ; RUN: llc -mtriple=riscv64 -mattr=+m,+v,+zfh,+zvfh < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
4 ; RUN: llc -mtriple=riscv32 -mattr=+m,+v,+zfh,+zvfhmin < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
5 ; RUN: llc -mtriple=riscv64 -mattr=+m,+v,+zfh,+zvfhmin < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
7 declare <4 x i7> @llvm.vp.fptoui.v4i7.v4f16(<4 x half>, <4 x i1>, i32)
9 define <4 x i7> @vfptoui_v4i7_v4f16(<4 x half> %va, <4 x i1> %m, i32 zeroext %evl) {
10 ; ZVFH-LABEL: vfptoui_v4i7_v4f16:
12 ; ZVFH-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
13 ; ZVFH-NEXT: vfncvt.rtz.x.f.w v9, v8, v0.t
14 ; ZVFH-NEXT: vmv1r.v v8, v9
17 ; ZVFHMIN-LABEL: vfptoui_v4i7_v4f16:
19 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
20 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
21 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
22 ; ZVFHMIN-NEXT: vfncvt.rtz.x.f.w v8, v9, v0.t
23 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
24 ; ZVFHMIN-NEXT: vnsrl.wi v8, v8, 0, v0.t
26 %v = call <4 x i7> @llvm.vp.fptoui.v4i7.v4f16(<4 x half> %va, <4 x i1> %m, i32 %evl)
30 declare <4 x i8> @llvm.vp.fptoui.v4i8.v4f16(<4 x half>, <4 x i1>, i32)
32 define <4 x i8> @vfptoui_v4i8_v4f16(<4 x half> %va, <4 x i1> %m, i32 zeroext %evl) {
33 ; ZVFH-LABEL: vfptoui_v4i8_v4f16:
35 ; ZVFH-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
36 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v9, v8, v0.t
37 ; ZVFH-NEXT: vmv1r.v v8, v9
40 ; ZVFHMIN-LABEL: vfptoui_v4i8_v4f16:
42 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
43 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
44 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
45 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v9, v0.t
46 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
47 ; ZVFHMIN-NEXT: vnsrl.wi v8, v8, 0, v0.t
49 %v = call <4 x i8> @llvm.vp.fptoui.v4i8.v4f16(<4 x half> %va, <4 x i1> %m, i32 %evl)
53 define <4 x i8> @vfptoui_v4i8_v4f16_unmasked(<4 x half> %va, i32 zeroext %evl) {
54 ; ZVFH-LABEL: vfptoui_v4i8_v4f16_unmasked:
56 ; ZVFH-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
57 ; ZVFH-NEXT: vfncvt.rtz.xu.f.w v9, v8
58 ; ZVFH-NEXT: vmv1r.v v8, v9
61 ; ZVFHMIN-LABEL: vfptoui_v4i8_v4f16_unmasked:
63 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
64 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
65 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
66 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v9
67 ; ZVFHMIN-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
68 ; ZVFHMIN-NEXT: vnsrl.wi v8, v8, 0
70 %v = call <4 x i8> @llvm.vp.fptoui.v4i8.v4f16(<4 x half> %va, <4 x i1> splat (i1 true), i32 %evl)
74 declare <4 x i16> @llvm.vp.fptoui.v4i16.v4f16(<4 x half>, <4 x i1>, i32)
76 define <4 x i16> @vfptoui_v4i16_v4f16(<4 x half> %va, <4 x i1> %m, i32 zeroext %evl) {
77 ; ZVFH-LABEL: vfptoui_v4i16_v4f16:
79 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
80 ; ZVFH-NEXT: vfcvt.rtz.xu.f.v v8, v8, v0.t
83 ; ZVFHMIN-LABEL: vfptoui_v4i16_v4f16:
85 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
86 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
87 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
88 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v9, v0.t
90 %v = call <4 x i16> @llvm.vp.fptoui.v4i16.v4f16(<4 x half> %va, <4 x i1> %m, i32 %evl)
94 define <4 x i16> @vfptoui_v4i16_v4f16_unmasked(<4 x half> %va, i32 zeroext %evl) {
95 ; ZVFH-LABEL: vfptoui_v4i16_v4f16_unmasked:
97 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
98 ; ZVFH-NEXT: vfcvt.rtz.xu.f.v v8, v8
101 ; ZVFHMIN-LABEL: vfptoui_v4i16_v4f16_unmasked:
103 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
104 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
105 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
106 ; ZVFHMIN-NEXT: vfncvt.rtz.xu.f.w v8, v9
108 %v = call <4 x i16> @llvm.vp.fptoui.v4i16.v4f16(<4 x half> %va, <4 x i1> splat (i1 true), i32 %evl)
112 declare <4 x i32> @llvm.vp.fptoui.v4i32.v4f16(<4 x half>, <4 x i1>, i32)
114 define <4 x i32> @vfptoui_v4i32_v4f16(<4 x half> %va, <4 x i1> %m, i32 zeroext %evl) {
115 ; ZVFH-LABEL: vfptoui_v4i32_v4f16:
117 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
118 ; ZVFH-NEXT: vfwcvt.rtz.xu.f.v v9, v8, v0.t
119 ; ZVFH-NEXT: vmv1r.v v8, v9
122 ; ZVFHMIN-LABEL: vfptoui_v4i32_v4f16:
124 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
125 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
126 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
127 ; ZVFHMIN-NEXT: vfcvt.rtz.xu.f.v v8, v9, v0.t
129 %v = call <4 x i32> @llvm.vp.fptoui.v4i32.v4f16(<4 x half> %va, <4 x i1> %m, i32 %evl)
133 define <4 x i32> @vfptoui_v4i32_v4f16_unmasked(<4 x half> %va, i32 zeroext %evl) {
134 ; ZVFH-LABEL: vfptoui_v4i32_v4f16_unmasked:
136 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
137 ; ZVFH-NEXT: vfwcvt.rtz.xu.f.v v9, v8
138 ; ZVFH-NEXT: vmv1r.v v8, v9
141 ; ZVFHMIN-LABEL: vfptoui_v4i32_v4f16_unmasked:
143 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
144 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
145 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
146 ; ZVFHMIN-NEXT: vfcvt.rtz.xu.f.v v8, v9
148 %v = call <4 x i32> @llvm.vp.fptoui.v4i32.v4f16(<4 x half> %va, <4 x i1> splat (i1 true), i32 %evl)
152 declare <4 x i64> @llvm.vp.fptoui.v4i64.v4f16(<4 x half>, <4 x i1>, i32)
154 define <4 x i64> @vfptoui_v4i64_v4f16(<4 x half> %va, <4 x i1> %m, i32 zeroext %evl) {
155 ; ZVFH-LABEL: vfptoui_v4i64_v4f16:
157 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
158 ; ZVFH-NEXT: vfwcvt.f.f.v v10, v8, v0.t
159 ; ZVFH-NEXT: vsetvli zero, zero, e32, m1, ta, ma
160 ; ZVFH-NEXT: vfwcvt.rtz.xu.f.v v8, v10, v0.t
163 ; ZVFHMIN-LABEL: vfptoui_v4i64_v4f16:
165 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
166 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
167 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
168 ; ZVFHMIN-NEXT: vfwcvt.rtz.xu.f.v v8, v10, v0.t
170 %v = call <4 x i64> @llvm.vp.fptoui.v4i64.v4f16(<4 x half> %va, <4 x i1> %m, i32 %evl)
174 define <4 x i64> @vfptoui_v4i64_v4f16_unmasked(<4 x half> %va, i32 zeroext %evl) {
175 ; ZVFH-LABEL: vfptoui_v4i64_v4f16_unmasked:
177 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
178 ; ZVFH-NEXT: vfwcvt.f.f.v v10, v8
179 ; ZVFH-NEXT: vsetvli zero, zero, e32, m1, ta, ma
180 ; ZVFH-NEXT: vfwcvt.rtz.xu.f.v v8, v10
183 ; ZVFHMIN-LABEL: vfptoui_v4i64_v4f16_unmasked:
185 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
186 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
187 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
188 ; ZVFHMIN-NEXT: vfwcvt.rtz.xu.f.v v8, v10
190 %v = call <4 x i64> @llvm.vp.fptoui.v4i64.v4f16(<4 x half> %va, <4 x i1> splat (i1 true), i32 %evl)
194 declare <4 x i8> @llvm.vp.fptoui.v4i8.v4f32(<4 x float>, <4 x i1>, i32)
196 define <4 x i8> @vfptoui_v4i8_v4f32(<4 x float> %va, <4 x i1> %m, i32 zeroext %evl) {
197 ; CHECK-LABEL: vfptoui_v4i8_v4f32:
199 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
200 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8, v0.t
201 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
202 ; CHECK-NEXT: vnsrl.wi v8, v9, 0, v0.t
204 %v = call <4 x i8> @llvm.vp.fptoui.v4i8.v4f32(<4 x float> %va, <4 x i1> %m, i32 %evl)
208 define <4 x i8> @vfptoui_v4i8_v4f32_unmasked(<4 x float> %va, i32 zeroext %evl) {
209 ; CHECK-LABEL: vfptoui_v4i8_v4f32_unmasked:
211 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
212 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8
213 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
214 ; CHECK-NEXT: vnsrl.wi v8, v9, 0
216 %v = call <4 x i8> @llvm.vp.fptoui.v4i8.v4f32(<4 x float> %va, <4 x i1> splat (i1 true), i32 %evl)
220 declare <4 x i16> @llvm.vp.fptoui.v4i16.v4f32(<4 x float>, <4 x i1>, i32)
222 define <4 x i16> @vfptoui_v4i16_v4f32(<4 x float> %va, <4 x i1> %m, i32 zeroext %evl) {
223 ; CHECK-LABEL: vfptoui_v4i16_v4f32:
225 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
226 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8, v0.t
227 ; CHECK-NEXT: vmv1r.v v8, v9
229 %v = call <4 x i16> @llvm.vp.fptoui.v4i16.v4f32(<4 x float> %va, <4 x i1> %m, i32 %evl)
233 define <4 x i16> @vfptoui_v4i16_v4f32_unmasked(<4 x float> %va, i32 zeroext %evl) {
234 ; CHECK-LABEL: vfptoui_v4i16_v4f32_unmasked:
236 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
237 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v9, v8
238 ; CHECK-NEXT: vmv1r.v v8, v9
240 %v = call <4 x i16> @llvm.vp.fptoui.v4i16.v4f32(<4 x float> %va, <4 x i1> splat (i1 true), i32 %evl)
244 declare <4 x i32> @llvm.vp.fptoui.v4i32.v4f32(<4 x float>, <4 x i1>, i32)
246 define <4 x i32> @vfptoui_v4i32_v4f32(<4 x float> %va, <4 x i1> %m, i32 zeroext %evl) {
247 ; CHECK-LABEL: vfptoui_v4i32_v4f32:
249 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
250 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8, v0.t
252 %v = call <4 x i32> @llvm.vp.fptoui.v4i32.v4f32(<4 x float> %va, <4 x i1> %m, i32 %evl)
256 define <4 x i32> @vfptoui_v4i32_v4f32_unmasked(<4 x float> %va, i32 zeroext %evl) {
257 ; CHECK-LABEL: vfptoui_v4i32_v4f32_unmasked:
259 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
260 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8
262 %v = call <4 x i32> @llvm.vp.fptoui.v4i32.v4f32(<4 x float> %va, <4 x i1> splat (i1 true), i32 %evl)
266 declare <4 x i64> @llvm.vp.fptoui.v4i64.v4f32(<4 x float>, <4 x i1>, i32)
268 define <4 x i64> @vfptoui_v4i64_v4f32(<4 x float> %va, <4 x i1> %m, i32 zeroext %evl) {
269 ; CHECK-LABEL: vfptoui_v4i64_v4f32:
271 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
272 ; CHECK-NEXT: vfwcvt.rtz.xu.f.v v10, v8, v0.t
273 ; CHECK-NEXT: vmv2r.v v8, v10
275 %v = call <4 x i64> @llvm.vp.fptoui.v4i64.v4f32(<4 x float> %va, <4 x i1> %m, i32 %evl)
279 define <4 x i64> @vfptoui_v4i64_v4f32_unmasked(<4 x float> %va, i32 zeroext %evl) {
280 ; CHECK-LABEL: vfptoui_v4i64_v4f32_unmasked:
282 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
283 ; CHECK-NEXT: vfwcvt.rtz.xu.f.v v10, v8
284 ; CHECK-NEXT: vmv2r.v v8, v10
286 %v = call <4 x i64> @llvm.vp.fptoui.v4i64.v4f32(<4 x float> %va, <4 x i1> splat (i1 true), i32 %evl)
290 declare <4 x i8> @llvm.vp.fptoui.v4i8.v4f64(<4 x double>, <4 x i1>, i32)
292 define <4 x i8> @vfptoui_v4i8_v4f64(<4 x double> %va, <4 x i1> %m, i32 zeroext %evl) {
293 ; CHECK-LABEL: vfptoui_v4i8_v4f64:
295 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
296 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8, v0.t
297 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
298 ; CHECK-NEXT: vnsrl.wi v8, v10, 0, v0.t
299 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
300 ; CHECK-NEXT: vnsrl.wi v8, v8, 0, v0.t
302 %v = call <4 x i8> @llvm.vp.fptoui.v4i8.v4f64(<4 x double> %va, <4 x i1> %m, i32 %evl)
306 define <4 x i8> @vfptoui_v4i8_v4f64_unmasked(<4 x double> %va, i32 zeroext %evl) {
307 ; CHECK-LABEL: vfptoui_v4i8_v4f64_unmasked:
309 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
310 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8
311 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
312 ; CHECK-NEXT: vnsrl.wi v8, v10, 0
313 ; CHECK-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
314 ; CHECK-NEXT: vnsrl.wi v8, v8, 0
316 %v = call <4 x i8> @llvm.vp.fptoui.v4i8.v4f64(<4 x double> %va, <4 x i1> splat (i1 true), i32 %evl)
320 declare <4 x i16> @llvm.vp.fptoui.v4i16.v4f64(<4 x double>, <4 x i1>, i32)
322 define <4 x i16> @vfptoui_v4i16_v4f64(<4 x double> %va, <4 x i1> %m, i32 zeroext %evl) {
323 ; CHECK-LABEL: vfptoui_v4i16_v4f64:
325 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
326 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8, v0.t
327 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
328 ; CHECK-NEXT: vnsrl.wi v8, v10, 0, v0.t
330 %v = call <4 x i16> @llvm.vp.fptoui.v4i16.v4f64(<4 x double> %va, <4 x i1> %m, i32 %evl)
334 define <4 x i16> @vfptoui_v4i16_v4f64_unmasked(<4 x double> %va, i32 zeroext %evl) {
335 ; CHECK-LABEL: vfptoui_v4i16_v4f64_unmasked:
337 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
338 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8
339 ; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
340 ; CHECK-NEXT: vnsrl.wi v8, v10, 0
342 %v = call <4 x i16> @llvm.vp.fptoui.v4i16.v4f64(<4 x double> %va, <4 x i1> splat (i1 true), i32 %evl)
346 declare <4 x i32> @llvm.vp.fptoui.v4i32.v4f64(<4 x double>, <4 x i1>, i32)
348 define <4 x i32> @vfptoui_v4i32_v4f64(<4 x double> %va, <4 x i1> %m, i32 zeroext %evl) {
349 ; CHECK-LABEL: vfptoui_v4i32_v4f64:
351 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
352 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8, v0.t
353 ; CHECK-NEXT: vmv.v.v v8, v10
355 %v = call <4 x i32> @llvm.vp.fptoui.v4i32.v4f64(<4 x double> %va, <4 x i1> %m, i32 %evl)
359 define <4 x i32> @vfptoui_v4i32_v4f64_unmasked(<4 x double> %va, i32 zeroext %evl) {
360 ; CHECK-LABEL: vfptoui_v4i32_v4f64_unmasked:
362 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
363 ; CHECK-NEXT: vfncvt.rtz.xu.f.w v10, v8
364 ; CHECK-NEXT: vmv.v.v v8, v10
366 %v = call <4 x i32> @llvm.vp.fptoui.v4i32.v4f64(<4 x double> %va, <4 x i1> splat (i1 true), i32 %evl)
370 declare <4 x i64> @llvm.vp.fptoui.v4i64.v4f64(<4 x double>, <4 x i1>, i32)
372 define <4 x i64> @vfptoui_v4i64_v4f64(<4 x double> %va, <4 x i1> %m, i32 zeroext %evl) {
373 ; CHECK-LABEL: vfptoui_v4i64_v4f64:
375 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
376 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8, v0.t
378 %v = call <4 x i64> @llvm.vp.fptoui.v4i64.v4f64(<4 x double> %va, <4 x i1> %m, i32 %evl)
382 define <4 x i64> @vfptoui_v4i64_v4f64_unmasked(<4 x double> %va, i32 zeroext %evl) {
383 ; CHECK-LABEL: vfptoui_v4i64_v4f64_unmasked:
385 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
386 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8
388 %v = call <4 x i64> @llvm.vp.fptoui.v4i64.v4f64(<4 x double> %va, <4 x i1> splat (i1 true), i32 %evl)
392 declare <32 x i64> @llvm.vp.fptoui.v32i64.v32f64(<32 x double>, <32 x i1>, i32)
394 define <32 x i64> @vfptoui_v32i64_v32f64(<32 x double> %va, <32 x i1> %m, i32 zeroext %evl) {
395 ; CHECK-LABEL: vfptoui_v32i64_v32f64:
397 ; CHECK-NEXT: li a2, 16
398 ; CHECK-NEXT: vsetivli zero, 2, e8, mf4, ta, ma
399 ; CHECK-NEXT: vslidedown.vi v24, v0, 2
400 ; CHECK-NEXT: mv a1, a0
401 ; CHECK-NEXT: bltu a0, a2, .LBB25_2
402 ; CHECK-NEXT: # %bb.1:
403 ; CHECK-NEXT: li a1, 16
404 ; CHECK-NEXT: .LBB25_2:
405 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, ta, ma
406 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8, v0.t
407 ; CHECK-NEXT: addi a1, a0, -16
408 ; CHECK-NEXT: sltu a0, a0, a1
409 ; CHECK-NEXT: addi a0, a0, -1
410 ; CHECK-NEXT: and a0, a0, a1
411 ; CHECK-NEXT: vmv1r.v v0, v24
412 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
413 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v16, v16, v0.t
415 %v = call <32 x i64> @llvm.vp.fptoui.v32i64.v32f64(<32 x double> %va, <32 x i1> %m, i32 %evl)
419 define <32 x i64> @vfptoui_v32i64_v32f64_unmasked(<32 x double> %va, i32 zeroext %evl) {
420 ; CHECK-LABEL: vfptoui_v32i64_v32f64_unmasked:
422 ; CHECK-NEXT: li a2, 16
423 ; CHECK-NEXT: mv a1, a0
424 ; CHECK-NEXT: bltu a0, a2, .LBB26_2
425 ; CHECK-NEXT: # %bb.1:
426 ; CHECK-NEXT: li a1, 16
427 ; CHECK-NEXT: .LBB26_2:
428 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, ta, ma
429 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v8, v8
430 ; CHECK-NEXT: addi a1, a0, -16
431 ; CHECK-NEXT: sltu a0, a0, a1
432 ; CHECK-NEXT: addi a0, a0, -1
433 ; CHECK-NEXT: and a0, a0, a1
434 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
435 ; CHECK-NEXT: vfcvt.rtz.xu.f.v v16, v16
437 %v = call <32 x i64> @llvm.vp.fptoui.v32i64.v32f64(<32 x double> %va, <32 x i1> splat (i1 true), i32 %evl)