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 declare <2 x half> @llvm.vp.sqrt.v2f16(<2 x half>, <2 x i1>, i32)
13 define <2 x half> @vfsqrt_vv_v2f16(<2 x half> %va, <2 x i1> %m, i32 zeroext %evl) {
14 ; ZVFH-LABEL: vfsqrt_vv_v2f16:
16 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
17 ; ZVFH-NEXT: vfsqrt.v v8, v8, v0.t
20 ; ZVFHMIN-LABEL: vfsqrt_vv_v2f16:
22 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
23 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
24 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
25 ; ZVFHMIN-NEXT: vfsqrt.v v9, v9, v0.t
26 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
27 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
29 %v = call <2 x half> @llvm.vp.sqrt.v2f16(<2 x half> %va, <2 x i1> %m, i32 %evl)
33 define <2 x half> @vfsqrt_vv_v2f16_unmasked(<2 x half> %va, i32 zeroext %evl) {
34 ; ZVFH-LABEL: vfsqrt_vv_v2f16_unmasked:
36 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
37 ; ZVFH-NEXT: vfsqrt.v v8, v8
40 ; ZVFHMIN-LABEL: vfsqrt_vv_v2f16_unmasked:
42 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
43 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
44 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
45 ; ZVFHMIN-NEXT: vfsqrt.v v9, v9
46 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
47 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
49 %head = insertelement <2 x i1> poison, i1 true, i32 0
50 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
51 %v = call <2 x half> @llvm.vp.sqrt.v2f16(<2 x half> %va, <2 x i1> %m, i32 %evl)
55 declare <4 x half> @llvm.vp.sqrt.v4f16(<4 x half>, <4 x i1>, i32)
57 define <4 x half> @vfsqrt_vv_v4f16(<4 x half> %va, <4 x i1> %m, i32 zeroext %evl) {
58 ; ZVFH-LABEL: vfsqrt_vv_v4f16:
60 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
61 ; ZVFH-NEXT: vfsqrt.v v8, v8, v0.t
64 ; ZVFHMIN-LABEL: vfsqrt_vv_v4f16:
66 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
67 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
68 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
69 ; ZVFHMIN-NEXT: vfsqrt.v v9, v9, v0.t
70 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
71 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
73 %v = call <4 x half> @llvm.vp.sqrt.v4f16(<4 x half> %va, <4 x i1> %m, i32 %evl)
77 define <4 x half> @vfsqrt_vv_v4f16_unmasked(<4 x half> %va, i32 zeroext %evl) {
78 ; ZVFH-LABEL: vfsqrt_vv_v4f16_unmasked:
80 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
81 ; ZVFH-NEXT: vfsqrt.v v8, v8
84 ; ZVFHMIN-LABEL: vfsqrt_vv_v4f16_unmasked:
86 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
87 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
88 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
89 ; ZVFHMIN-NEXT: vfsqrt.v v9, v9
90 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
91 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
93 %head = insertelement <4 x i1> poison, i1 true, i32 0
94 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
95 %v = call <4 x half> @llvm.vp.sqrt.v4f16(<4 x half> %va, <4 x i1> %m, i32 %evl)
99 declare <8 x half> @llvm.vp.sqrt.v8f16(<8 x half>, <8 x i1>, i32)
101 define <8 x half> @vfsqrt_vv_v8f16(<8 x half> %va, <8 x i1> %m, i32 zeroext %evl) {
102 ; ZVFH-LABEL: vfsqrt_vv_v8f16:
104 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
105 ; ZVFH-NEXT: vfsqrt.v v8, v8, v0.t
108 ; ZVFHMIN-LABEL: vfsqrt_vv_v8f16:
110 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
111 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
112 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
113 ; ZVFHMIN-NEXT: vfsqrt.v v10, v10, v0.t
114 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
115 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
117 %v = call <8 x half> @llvm.vp.sqrt.v8f16(<8 x half> %va, <8 x i1> %m, i32 %evl)
121 define <8 x half> @vfsqrt_vv_v8f16_unmasked(<8 x half> %va, i32 zeroext %evl) {
122 ; ZVFH-LABEL: vfsqrt_vv_v8f16_unmasked:
124 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
125 ; ZVFH-NEXT: vfsqrt.v v8, v8
128 ; ZVFHMIN-LABEL: vfsqrt_vv_v8f16_unmasked:
130 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
131 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
132 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
133 ; ZVFHMIN-NEXT: vfsqrt.v v10, v10
134 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
135 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
137 %head = insertelement <8 x i1> poison, i1 true, i32 0
138 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
139 %v = call <8 x half> @llvm.vp.sqrt.v8f16(<8 x half> %va, <8 x i1> %m, i32 %evl)
143 declare <16 x half> @llvm.vp.sqrt.v16f16(<16 x half>, <16 x i1>, i32)
145 define <16 x half> @vfsqrt_vv_v16f16(<16 x half> %va, <16 x i1> %m, i32 zeroext %evl) {
146 ; ZVFH-LABEL: vfsqrt_vv_v16f16:
148 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
149 ; ZVFH-NEXT: vfsqrt.v v8, v8, v0.t
152 ; ZVFHMIN-LABEL: vfsqrt_vv_v16f16:
154 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
155 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
156 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
157 ; ZVFHMIN-NEXT: vfsqrt.v v12, v12, v0.t
158 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
159 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
161 %v = call <16 x half> @llvm.vp.sqrt.v16f16(<16 x half> %va, <16 x i1> %m, i32 %evl)
165 define <16 x half> @vfsqrt_vv_v16f16_unmasked(<16 x half> %va, i32 zeroext %evl) {
166 ; ZVFH-LABEL: vfsqrt_vv_v16f16_unmasked:
168 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
169 ; ZVFH-NEXT: vfsqrt.v v8, v8
172 ; ZVFHMIN-LABEL: vfsqrt_vv_v16f16_unmasked:
174 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
175 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
176 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
177 ; ZVFHMIN-NEXT: vfsqrt.v v12, v12
178 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
179 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
181 %head = insertelement <16 x i1> poison, i1 true, i32 0
182 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
183 %v = call <16 x half> @llvm.vp.sqrt.v16f16(<16 x half> %va, <16 x i1> %m, i32 %evl)
187 declare <2 x float> @llvm.vp.sqrt.v2f32(<2 x float>, <2 x i1>, i32)
189 define <2 x float> @vfsqrt_vv_v2f32(<2 x float> %va, <2 x i1> %m, i32 zeroext %evl) {
190 ; CHECK-LABEL: vfsqrt_vv_v2f32:
192 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
193 ; CHECK-NEXT: vfsqrt.v v8, v8, v0.t
195 %v = call <2 x float> @llvm.vp.sqrt.v2f32(<2 x float> %va, <2 x i1> %m, i32 %evl)
199 define <2 x float> @vfsqrt_vv_v2f32_unmasked(<2 x float> %va, i32 zeroext %evl) {
200 ; CHECK-LABEL: vfsqrt_vv_v2f32_unmasked:
202 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
203 ; CHECK-NEXT: vfsqrt.v v8, v8
205 %head = insertelement <2 x i1> poison, i1 true, i32 0
206 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
207 %v = call <2 x float> @llvm.vp.sqrt.v2f32(<2 x float> %va, <2 x i1> %m, i32 %evl)
211 declare <4 x float> @llvm.vp.sqrt.v4f32(<4 x float>, <4 x i1>, i32)
213 define <4 x float> @vfsqrt_vv_v4f32(<4 x float> %va, <4 x i1> %m, i32 zeroext %evl) {
214 ; CHECK-LABEL: vfsqrt_vv_v4f32:
216 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
217 ; CHECK-NEXT: vfsqrt.v v8, v8, v0.t
219 %v = call <4 x float> @llvm.vp.sqrt.v4f32(<4 x float> %va, <4 x i1> %m, i32 %evl)
223 define <4 x float> @vfsqrt_vv_v4f32_unmasked(<4 x float> %va, i32 zeroext %evl) {
224 ; CHECK-LABEL: vfsqrt_vv_v4f32_unmasked:
226 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
227 ; CHECK-NEXT: vfsqrt.v v8, v8
229 %head = insertelement <4 x i1> poison, i1 true, i32 0
230 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
231 %v = call <4 x float> @llvm.vp.sqrt.v4f32(<4 x float> %va, <4 x i1> %m, i32 %evl)
235 declare <8 x float> @llvm.vp.sqrt.v8f32(<8 x float>, <8 x i1>, i32)
237 define <8 x float> @vfsqrt_vv_v8f32(<8 x float> %va, <8 x i1> %m, i32 zeroext %evl) {
238 ; CHECK-LABEL: vfsqrt_vv_v8f32:
240 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
241 ; CHECK-NEXT: vfsqrt.v v8, v8, v0.t
243 %v = call <8 x float> @llvm.vp.sqrt.v8f32(<8 x float> %va, <8 x i1> %m, i32 %evl)
247 define <8 x float> @vfsqrt_vv_v8f32_unmasked(<8 x float> %va, i32 zeroext %evl) {
248 ; CHECK-LABEL: vfsqrt_vv_v8f32_unmasked:
250 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
251 ; CHECK-NEXT: vfsqrt.v v8, v8
253 %head = insertelement <8 x i1> poison, i1 true, i32 0
254 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
255 %v = call <8 x float> @llvm.vp.sqrt.v8f32(<8 x float> %va, <8 x i1> %m, i32 %evl)
259 declare <16 x float> @llvm.vp.sqrt.v16f32(<16 x float>, <16 x i1>, i32)
261 define <16 x float> @vfsqrt_vv_v16f32(<16 x float> %va, <16 x i1> %m, i32 zeroext %evl) {
262 ; CHECK-LABEL: vfsqrt_vv_v16f32:
264 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
265 ; CHECK-NEXT: vfsqrt.v v8, v8, v0.t
267 %v = call <16 x float> @llvm.vp.sqrt.v16f32(<16 x float> %va, <16 x i1> %m, i32 %evl)
271 define <16 x float> @vfsqrt_vv_v16f32_unmasked(<16 x float> %va, i32 zeroext %evl) {
272 ; CHECK-LABEL: vfsqrt_vv_v16f32_unmasked:
274 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
275 ; CHECK-NEXT: vfsqrt.v v8, v8
277 %head = insertelement <16 x i1> poison, i1 true, i32 0
278 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
279 %v = call <16 x float> @llvm.vp.sqrt.v16f32(<16 x float> %va, <16 x i1> %m, i32 %evl)
283 declare <2 x double> @llvm.vp.sqrt.v2f64(<2 x double>, <2 x i1>, i32)
285 define <2 x double> @vfsqrt_vv_v2f64(<2 x double> %va, <2 x i1> %m, i32 zeroext %evl) {
286 ; CHECK-LABEL: vfsqrt_vv_v2f64:
288 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
289 ; CHECK-NEXT: vfsqrt.v v8, v8, v0.t
291 %v = call <2 x double> @llvm.vp.sqrt.v2f64(<2 x double> %va, <2 x i1> %m, i32 %evl)
295 define <2 x double> @vfsqrt_vv_v2f64_unmasked(<2 x double> %va, i32 zeroext %evl) {
296 ; CHECK-LABEL: vfsqrt_vv_v2f64_unmasked:
298 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
299 ; CHECK-NEXT: vfsqrt.v v8, v8
301 %head = insertelement <2 x i1> poison, i1 true, i32 0
302 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
303 %v = call <2 x double> @llvm.vp.sqrt.v2f64(<2 x double> %va, <2 x i1> %m, i32 %evl)
307 declare <4 x double> @llvm.vp.sqrt.v4f64(<4 x double>, <4 x i1>, i32)
309 define <4 x double> @vfsqrt_vv_v4f64(<4 x double> %va, <4 x i1> %m, i32 zeroext %evl) {
310 ; CHECK-LABEL: vfsqrt_vv_v4f64:
312 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
313 ; CHECK-NEXT: vfsqrt.v v8, v8, v0.t
315 %v = call <4 x double> @llvm.vp.sqrt.v4f64(<4 x double> %va, <4 x i1> %m, i32 %evl)
319 define <4 x double> @vfsqrt_vv_v4f64_unmasked(<4 x double> %va, i32 zeroext %evl) {
320 ; CHECK-LABEL: vfsqrt_vv_v4f64_unmasked:
322 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
323 ; CHECK-NEXT: vfsqrt.v v8, v8
325 %head = insertelement <4 x i1> poison, i1 true, i32 0
326 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
327 %v = call <4 x double> @llvm.vp.sqrt.v4f64(<4 x double> %va, <4 x i1> %m, i32 %evl)
331 declare <8 x double> @llvm.vp.sqrt.v8f64(<8 x double>, <8 x i1>, i32)
333 define <8 x double> @vfsqrt_vv_v8f64(<8 x double> %va, <8 x i1> %m, i32 zeroext %evl) {
334 ; CHECK-LABEL: vfsqrt_vv_v8f64:
336 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
337 ; CHECK-NEXT: vfsqrt.v v8, v8, v0.t
339 %v = call <8 x double> @llvm.vp.sqrt.v8f64(<8 x double> %va, <8 x i1> %m, i32 %evl)
343 define <8 x double> @vfsqrt_vv_v8f64_unmasked(<8 x double> %va, i32 zeroext %evl) {
344 ; CHECK-LABEL: vfsqrt_vv_v8f64_unmasked:
346 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
347 ; CHECK-NEXT: vfsqrt.v v8, v8
349 %head = insertelement <8 x i1> poison, i1 true, i32 0
350 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
351 %v = call <8 x double> @llvm.vp.sqrt.v8f64(<8 x double> %va, <8 x i1> %m, i32 %evl)
355 declare <15 x double> @llvm.vp.sqrt.v15f64(<15 x double>, <15 x i1>, i32)
357 define <15 x double> @vfsqrt_vv_v15f64(<15 x double> %va, <15 x i1> %m, i32 zeroext %evl) {
358 ; CHECK-LABEL: vfsqrt_vv_v15f64:
360 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
361 ; CHECK-NEXT: vfsqrt.v v8, v8, v0.t
363 %v = call <15 x double> @llvm.vp.sqrt.v15f64(<15 x double> %va, <15 x i1> %m, i32 %evl)
367 define <15 x double> @vfsqrt_vv_v15f64_unmasked(<15 x double> %va, i32 zeroext %evl) {
368 ; CHECK-LABEL: vfsqrt_vv_v15f64_unmasked:
370 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
371 ; CHECK-NEXT: vfsqrt.v v8, v8
373 %head = insertelement <15 x i1> poison, i1 true, i32 0
374 %m = shufflevector <15 x i1> %head, <15 x i1> poison, <15 x i32> zeroinitializer
375 %v = call <15 x double> @llvm.vp.sqrt.v15f64(<15 x double> %va, <15 x i1> %m, i32 %evl)
379 declare <16 x double> @llvm.vp.sqrt.v16f64(<16 x double>, <16 x i1>, i32)
381 define <16 x double> @vfsqrt_vv_v16f64(<16 x double> %va, <16 x i1> %m, i32 zeroext %evl) {
382 ; CHECK-LABEL: vfsqrt_vv_v16f64:
384 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
385 ; CHECK-NEXT: vfsqrt.v v8, v8, v0.t
387 %v = call <16 x double> @llvm.vp.sqrt.v16f64(<16 x double> %va, <16 x i1> %m, i32 %evl)
391 define <16 x double> @vfsqrt_vv_v16f64_unmasked(<16 x double> %va, i32 zeroext %evl) {
392 ; CHECK-LABEL: vfsqrt_vv_v16f64_unmasked:
394 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
395 ; CHECK-NEXT: vfsqrt.v v8, v8
397 %head = insertelement <16 x i1> poison, i1 true, i32 0
398 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
399 %v = call <16 x double> @llvm.vp.sqrt.v16f64(<16 x double> %va, <16 x i1> %m, i32 %evl)
403 declare <32 x double> @llvm.vp.sqrt.v32f64(<32 x double>, <32 x i1>, i32)
405 define <32 x double> @vfsqrt_vv_v32f64(<32 x double> %va, <32 x i1> %m, i32 zeroext %evl) {
406 ; CHECK-LABEL: vfsqrt_vv_v32f64:
408 ; CHECK-NEXT: vsetivli zero, 2, e8, mf4, ta, ma
409 ; CHECK-NEXT: li a2, 16
410 ; CHECK-NEXT: vslidedown.vi v24, v0, 2
411 ; CHECK-NEXT: mv a1, a0
412 ; CHECK-NEXT: bltu a0, a2, .LBB26_2
413 ; CHECK-NEXT: # %bb.1:
414 ; CHECK-NEXT: li a1, 16
415 ; CHECK-NEXT: .LBB26_2:
416 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, ta, ma
417 ; CHECK-NEXT: vfsqrt.v v8, v8, v0.t
418 ; CHECK-NEXT: addi a1, a0, -16
419 ; CHECK-NEXT: sltu a0, a0, a1
420 ; CHECK-NEXT: addi a0, a0, -1
421 ; CHECK-NEXT: and a0, a0, a1
422 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
423 ; CHECK-NEXT: vmv1r.v v0, v24
424 ; CHECK-NEXT: vfsqrt.v v16, v16, v0.t
426 %v = call <32 x double> @llvm.vp.sqrt.v32f64(<32 x double> %va, <32 x i1> %m, i32 %evl)
430 define <32 x double> @vfsqrt_vv_v32f64_unmasked(<32 x double> %va, i32 zeroext %evl) {
431 ; CHECK-LABEL: vfsqrt_vv_v32f64_unmasked:
433 ; CHECK-NEXT: li a2, 16
434 ; CHECK-NEXT: mv a1, a0
435 ; CHECK-NEXT: bltu a0, a2, .LBB27_2
436 ; CHECK-NEXT: # %bb.1:
437 ; CHECK-NEXT: li a1, 16
438 ; CHECK-NEXT: .LBB27_2:
439 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, ta, ma
440 ; CHECK-NEXT: vfsqrt.v v8, v8
441 ; CHECK-NEXT: addi a1, a0, -16
442 ; CHECK-NEXT: sltu a0, a0, a1
443 ; CHECK-NEXT: addi a0, a0, -1
444 ; CHECK-NEXT: and a0, a0, a1
445 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
446 ; CHECK-NEXT: vfsqrt.v v16, v16
448 %head = insertelement <32 x i1> poison, i1 true, i32 0
449 %m = shufflevector <32 x i1> %head, <32 x i1> poison, <32 x i32> zeroinitializer
450 %v = call <32 x double> @llvm.vp.sqrt.v32f64(<32 x double> %va, <32 x i1> %m, i32 %evl)