1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v,+zfh,+zvfh \
3 ; RUN: -verify-machineinstrs -target-abi=ilp32d | FileCheck %s
4 ; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+zfh,+zvfh \
5 ; RUN: -verify-machineinstrs -target-abi=lp64d | FileCheck %s
7 declare <vscale x 1 x half> @llvm.riscv.vfsqrt.nxv1f16(
12 define <vscale x 1 x half> @intrinsic_vfsqrt_v_nxv1f16_nxv1f16(<vscale x 1 x half> %0, iXLen %1) nounwind {
13 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv1f16_nxv1f16:
14 ; CHECK: # %bb.0: # %entry
15 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
16 ; CHECK-NEXT: fsrmi a0, 0
17 ; CHECK-NEXT: vfsqrt.v v8, v8
21 %a = call <vscale x 1 x half> @llvm.riscv.vfsqrt.nxv1f16(
22 <vscale x 1 x half> undef,
23 <vscale x 1 x half> %0,
26 ret <vscale x 1 x half> %a
29 declare <vscale x 1 x half> @llvm.riscv.vfsqrt.mask.nxv1f16(
35 define <vscale x 1 x half> @intrinsic_vfsqrt_mask_v_nxv1f16_nxv1f16(<vscale x 1 x half> %0, <vscale x 1 x half> %1, <vscale x 1 x i1> %2, iXLen %3) nounwind {
36 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv1f16_nxv1f16:
37 ; CHECK: # %bb.0: # %entry
38 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
39 ; CHECK-NEXT: fsrmi a0, 0
40 ; CHECK-NEXT: vfsqrt.v v8, v9, v0.t
44 %a = call <vscale x 1 x half> @llvm.riscv.vfsqrt.mask.nxv1f16(
45 <vscale x 1 x half> %0,
46 <vscale x 1 x half> %1,
48 iXLen 0, iXLen %3, iXLen 1)
50 ret <vscale x 1 x half> %a
53 declare <vscale x 2 x half> @llvm.riscv.vfsqrt.nxv2f16(
58 define <vscale x 2 x half> @intrinsic_vfsqrt_v_nxv2f16_nxv2f16(<vscale x 2 x half> %0, iXLen %1) nounwind {
59 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv2f16_nxv2f16:
60 ; CHECK: # %bb.0: # %entry
61 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
62 ; CHECK-NEXT: fsrmi a0, 0
63 ; CHECK-NEXT: vfsqrt.v v8, v8
67 %a = call <vscale x 2 x half> @llvm.riscv.vfsqrt.nxv2f16(
68 <vscale x 2 x half> undef,
69 <vscale x 2 x half> %0,
72 ret <vscale x 2 x half> %a
75 declare <vscale x 2 x half> @llvm.riscv.vfsqrt.mask.nxv2f16(
81 define <vscale x 2 x half> @intrinsic_vfsqrt_mask_v_nxv2f16_nxv2f16(<vscale x 2 x half> %0, <vscale x 2 x half> %1, <vscale x 2 x i1> %2, iXLen %3) nounwind {
82 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv2f16_nxv2f16:
83 ; CHECK: # %bb.0: # %entry
84 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
85 ; CHECK-NEXT: fsrmi a0, 0
86 ; CHECK-NEXT: vfsqrt.v v8, v9, v0.t
90 %a = call <vscale x 2 x half> @llvm.riscv.vfsqrt.mask.nxv2f16(
91 <vscale x 2 x half> %0,
92 <vscale x 2 x half> %1,
94 iXLen 0, iXLen %3, iXLen 1)
96 ret <vscale x 2 x half> %a
99 declare <vscale x 4 x half> @llvm.riscv.vfsqrt.nxv4f16(
104 define <vscale x 4 x half> @intrinsic_vfsqrt_v_nxv4f16_nxv4f16(<vscale x 4 x half> %0, iXLen %1) nounwind {
105 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv4f16_nxv4f16:
106 ; CHECK: # %bb.0: # %entry
107 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
108 ; CHECK-NEXT: fsrmi a0, 0
109 ; CHECK-NEXT: vfsqrt.v v8, v8
110 ; CHECK-NEXT: fsrm a0
113 %a = call <vscale x 4 x half> @llvm.riscv.vfsqrt.nxv4f16(
114 <vscale x 4 x half> undef,
115 <vscale x 4 x half> %0,
118 ret <vscale x 4 x half> %a
121 declare <vscale x 4 x half> @llvm.riscv.vfsqrt.mask.nxv4f16(
125 iXLen, iXLen, iXLen);
127 define <vscale x 4 x half> @intrinsic_vfsqrt_mask_v_nxv4f16_nxv4f16(<vscale x 4 x half> %0, <vscale x 4 x half> %1, <vscale x 4 x i1> %2, iXLen %3) nounwind {
128 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv4f16_nxv4f16:
129 ; CHECK: # %bb.0: # %entry
130 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
131 ; CHECK-NEXT: fsrmi a0, 0
132 ; CHECK-NEXT: vfsqrt.v v8, v9, v0.t
133 ; CHECK-NEXT: fsrm a0
136 %a = call <vscale x 4 x half> @llvm.riscv.vfsqrt.mask.nxv4f16(
137 <vscale x 4 x half> %0,
138 <vscale x 4 x half> %1,
139 <vscale x 4 x i1> %2,
140 iXLen 0, iXLen %3, iXLen 1)
142 ret <vscale x 4 x half> %a
145 declare <vscale x 8 x half> @llvm.riscv.vfsqrt.nxv8f16(
150 define <vscale x 8 x half> @intrinsic_vfsqrt_v_nxv8f16_nxv8f16(<vscale x 8 x half> %0, iXLen %1) nounwind {
151 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv8f16_nxv8f16:
152 ; CHECK: # %bb.0: # %entry
153 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
154 ; CHECK-NEXT: fsrmi a0, 0
155 ; CHECK-NEXT: vfsqrt.v v8, v8
156 ; CHECK-NEXT: fsrm a0
159 %a = call <vscale x 8 x half> @llvm.riscv.vfsqrt.nxv8f16(
160 <vscale x 8 x half> undef,
161 <vscale x 8 x half> %0,
164 ret <vscale x 8 x half> %a
167 declare <vscale x 8 x half> @llvm.riscv.vfsqrt.mask.nxv8f16(
171 iXLen, iXLen, iXLen);
173 define <vscale x 8 x half> @intrinsic_vfsqrt_mask_v_nxv8f16_nxv8f16(<vscale x 8 x half> %0, <vscale x 8 x half> %1, <vscale x 8 x i1> %2, iXLen %3) nounwind {
174 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv8f16_nxv8f16:
175 ; CHECK: # %bb.0: # %entry
176 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
177 ; CHECK-NEXT: fsrmi a0, 0
178 ; CHECK-NEXT: vfsqrt.v v8, v10, v0.t
179 ; CHECK-NEXT: fsrm a0
182 %a = call <vscale x 8 x half> @llvm.riscv.vfsqrt.mask.nxv8f16(
183 <vscale x 8 x half> %0,
184 <vscale x 8 x half> %1,
185 <vscale x 8 x i1> %2,
186 iXLen 0, iXLen %3, iXLen 1)
188 ret <vscale x 8 x half> %a
191 declare <vscale x 16 x half> @llvm.riscv.vfsqrt.nxv16f16(
192 <vscale x 16 x half>,
193 <vscale x 16 x half>,
196 define <vscale x 16 x half> @intrinsic_vfsqrt_v_nxv16f16_nxv16f16(<vscale x 16 x half> %0, iXLen %1) nounwind {
197 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv16f16_nxv16f16:
198 ; CHECK: # %bb.0: # %entry
199 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
200 ; CHECK-NEXT: fsrmi a0, 0
201 ; CHECK-NEXT: vfsqrt.v v8, v8
202 ; CHECK-NEXT: fsrm a0
205 %a = call <vscale x 16 x half> @llvm.riscv.vfsqrt.nxv16f16(
206 <vscale x 16 x half> undef,
207 <vscale x 16 x half> %0,
210 ret <vscale x 16 x half> %a
213 declare <vscale x 16 x half> @llvm.riscv.vfsqrt.mask.nxv16f16(
214 <vscale x 16 x half>,
215 <vscale x 16 x half>,
217 iXLen, iXLen, iXLen);
219 define <vscale x 16 x half> @intrinsic_vfsqrt_mask_v_nxv16f16_nxv16f16(<vscale x 16 x half> %0, <vscale x 16 x half> %1, <vscale x 16 x i1> %2, iXLen %3) nounwind {
220 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv16f16_nxv16f16:
221 ; CHECK: # %bb.0: # %entry
222 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
223 ; CHECK-NEXT: fsrmi a0, 0
224 ; CHECK-NEXT: vfsqrt.v v8, v12, v0.t
225 ; CHECK-NEXT: fsrm a0
228 %a = call <vscale x 16 x half> @llvm.riscv.vfsqrt.mask.nxv16f16(
229 <vscale x 16 x half> %0,
230 <vscale x 16 x half> %1,
231 <vscale x 16 x i1> %2,
232 iXLen 0, iXLen %3, iXLen 1)
234 ret <vscale x 16 x half> %a
237 declare <vscale x 32 x half> @llvm.riscv.vfsqrt.nxv32f16(
238 <vscale x 32 x half>,
239 <vscale x 32 x half>,
242 define <vscale x 32 x half> @intrinsic_vfsqrt_v_nxv32f16_nxv32f16(<vscale x 32 x half> %0, iXLen %1) nounwind {
243 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv32f16_nxv32f16:
244 ; CHECK: # %bb.0: # %entry
245 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma
246 ; CHECK-NEXT: fsrmi a0, 0
247 ; CHECK-NEXT: vfsqrt.v v8, v8
248 ; CHECK-NEXT: fsrm a0
251 %a = call <vscale x 32 x half> @llvm.riscv.vfsqrt.nxv32f16(
252 <vscale x 32 x half> undef,
253 <vscale x 32 x half> %0,
256 ret <vscale x 32 x half> %a
259 declare <vscale x 32 x half> @llvm.riscv.vfsqrt.mask.nxv32f16(
260 <vscale x 32 x half>,
261 <vscale x 32 x half>,
263 iXLen, iXLen, iXLen);
265 define <vscale x 32 x half> @intrinsic_vfsqrt_mask_v_nxv32f16_nxv32f16(<vscale x 32 x half> %0, <vscale x 32 x half> %1, <vscale x 32 x i1> %2, iXLen %3) nounwind {
266 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv32f16_nxv32f16:
267 ; CHECK: # %bb.0: # %entry
268 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, mu
269 ; CHECK-NEXT: fsrmi a0, 0
270 ; CHECK-NEXT: vfsqrt.v v8, v16, v0.t
271 ; CHECK-NEXT: fsrm a0
274 %a = call <vscale x 32 x half> @llvm.riscv.vfsqrt.mask.nxv32f16(
275 <vscale x 32 x half> %0,
276 <vscale x 32 x half> %1,
277 <vscale x 32 x i1> %2,
278 iXLen 0, iXLen %3, iXLen 1)
280 ret <vscale x 32 x half> %a
283 declare <vscale x 1 x float> @llvm.riscv.vfsqrt.nxv1f32(
284 <vscale x 1 x float>,
285 <vscale x 1 x float>,
288 define <vscale x 1 x float> @intrinsic_vfsqrt_v_nxv1f32_nxv1f32(<vscale x 1 x float> %0, iXLen %1) nounwind {
289 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv1f32_nxv1f32:
290 ; CHECK: # %bb.0: # %entry
291 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
292 ; CHECK-NEXT: fsrmi a0, 0
293 ; CHECK-NEXT: vfsqrt.v v8, v8
294 ; CHECK-NEXT: fsrm a0
297 %a = call <vscale x 1 x float> @llvm.riscv.vfsqrt.nxv1f32(
298 <vscale x 1 x float> undef,
299 <vscale x 1 x float> %0,
302 ret <vscale x 1 x float> %a
305 declare <vscale x 1 x float> @llvm.riscv.vfsqrt.mask.nxv1f32(
306 <vscale x 1 x float>,
307 <vscale x 1 x float>,
309 iXLen, iXLen, iXLen);
311 define <vscale x 1 x float> @intrinsic_vfsqrt_mask_v_nxv1f32_nxv1f32(<vscale x 1 x float> %0, <vscale x 1 x float> %1, <vscale x 1 x i1> %2, iXLen %3) nounwind {
312 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv1f32_nxv1f32:
313 ; CHECK: # %bb.0: # %entry
314 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
315 ; CHECK-NEXT: fsrmi a0, 0
316 ; CHECK-NEXT: vfsqrt.v v8, v9, v0.t
317 ; CHECK-NEXT: fsrm a0
320 %a = call <vscale x 1 x float> @llvm.riscv.vfsqrt.mask.nxv1f32(
321 <vscale x 1 x float> %0,
322 <vscale x 1 x float> %1,
323 <vscale x 1 x i1> %2,
324 iXLen 0, iXLen %3, iXLen 1)
326 ret <vscale x 1 x float> %a
329 declare <vscale x 2 x float> @llvm.riscv.vfsqrt.nxv2f32(
330 <vscale x 2 x float>,
331 <vscale x 2 x float>,
334 define <vscale x 2 x float> @intrinsic_vfsqrt_v_nxv2f32_nxv2f32(<vscale x 2 x float> %0, iXLen %1) nounwind {
335 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv2f32_nxv2f32:
336 ; CHECK: # %bb.0: # %entry
337 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
338 ; CHECK-NEXT: fsrmi a0, 0
339 ; CHECK-NEXT: vfsqrt.v v8, v8
340 ; CHECK-NEXT: fsrm a0
343 %a = call <vscale x 2 x float> @llvm.riscv.vfsqrt.nxv2f32(
344 <vscale x 2 x float> undef,
345 <vscale x 2 x float> %0,
348 ret <vscale x 2 x float> %a
351 declare <vscale x 2 x float> @llvm.riscv.vfsqrt.mask.nxv2f32(
352 <vscale x 2 x float>,
353 <vscale x 2 x float>,
355 iXLen, iXLen, iXLen);
357 define <vscale x 2 x float> @intrinsic_vfsqrt_mask_v_nxv2f32_nxv2f32(<vscale x 2 x float> %0, <vscale x 2 x float> %1, <vscale x 2 x i1> %2, iXLen %3) nounwind {
358 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv2f32_nxv2f32:
359 ; CHECK: # %bb.0: # %entry
360 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
361 ; CHECK-NEXT: fsrmi a0, 0
362 ; CHECK-NEXT: vfsqrt.v v8, v9, v0.t
363 ; CHECK-NEXT: fsrm a0
366 %a = call <vscale x 2 x float> @llvm.riscv.vfsqrt.mask.nxv2f32(
367 <vscale x 2 x float> %0,
368 <vscale x 2 x float> %1,
369 <vscale x 2 x i1> %2,
370 iXLen 0, iXLen %3, iXLen 1)
372 ret <vscale x 2 x float> %a
375 declare <vscale x 4 x float> @llvm.riscv.vfsqrt.nxv4f32(
376 <vscale x 4 x float>,
377 <vscale x 4 x float>,
380 define <vscale x 4 x float> @intrinsic_vfsqrt_v_nxv4f32_nxv4f32(<vscale x 4 x float> %0, iXLen %1) nounwind {
381 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv4f32_nxv4f32:
382 ; CHECK: # %bb.0: # %entry
383 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
384 ; CHECK-NEXT: fsrmi a0, 0
385 ; CHECK-NEXT: vfsqrt.v v8, v8
386 ; CHECK-NEXT: fsrm a0
389 %a = call <vscale x 4 x float> @llvm.riscv.vfsqrt.nxv4f32(
390 <vscale x 4 x float> undef,
391 <vscale x 4 x float> %0,
394 ret <vscale x 4 x float> %a
397 declare <vscale x 4 x float> @llvm.riscv.vfsqrt.mask.nxv4f32(
398 <vscale x 4 x float>,
399 <vscale x 4 x float>,
401 iXLen, iXLen, iXLen);
403 define <vscale x 4 x float> @intrinsic_vfsqrt_mask_v_nxv4f32_nxv4f32(<vscale x 4 x float> %0, <vscale x 4 x float> %1, <vscale x 4 x i1> %2, iXLen %3) nounwind {
404 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv4f32_nxv4f32:
405 ; CHECK: # %bb.0: # %entry
406 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
407 ; CHECK-NEXT: fsrmi a0, 0
408 ; CHECK-NEXT: vfsqrt.v v8, v10, v0.t
409 ; CHECK-NEXT: fsrm a0
412 %a = call <vscale x 4 x float> @llvm.riscv.vfsqrt.mask.nxv4f32(
413 <vscale x 4 x float> %0,
414 <vscale x 4 x float> %1,
415 <vscale x 4 x i1> %2,
416 iXLen 0, iXLen %3, iXLen 1)
418 ret <vscale x 4 x float> %a
421 declare <vscale x 8 x float> @llvm.riscv.vfsqrt.nxv8f32(
422 <vscale x 8 x float>,
423 <vscale x 8 x float>,
426 define <vscale x 8 x float> @intrinsic_vfsqrt_v_nxv8f32_nxv8f32(<vscale x 8 x float> %0, iXLen %1) nounwind {
427 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv8f32_nxv8f32:
428 ; CHECK: # %bb.0: # %entry
429 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
430 ; CHECK-NEXT: fsrmi a0, 0
431 ; CHECK-NEXT: vfsqrt.v v8, v8
432 ; CHECK-NEXT: fsrm a0
435 %a = call <vscale x 8 x float> @llvm.riscv.vfsqrt.nxv8f32(
436 <vscale x 8 x float> undef,
437 <vscale x 8 x float> %0,
440 ret <vscale x 8 x float> %a
443 declare <vscale x 8 x float> @llvm.riscv.vfsqrt.mask.nxv8f32(
444 <vscale x 8 x float>,
445 <vscale x 8 x float>,
447 iXLen, iXLen, iXLen);
449 define <vscale x 8 x float> @intrinsic_vfsqrt_mask_v_nxv8f32_nxv8f32(<vscale x 8 x float> %0, <vscale x 8 x float> %1, <vscale x 8 x i1> %2, iXLen %3) nounwind {
450 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv8f32_nxv8f32:
451 ; CHECK: # %bb.0: # %entry
452 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
453 ; CHECK-NEXT: fsrmi a0, 0
454 ; CHECK-NEXT: vfsqrt.v v8, v12, v0.t
455 ; CHECK-NEXT: fsrm a0
458 %a = call <vscale x 8 x float> @llvm.riscv.vfsqrt.mask.nxv8f32(
459 <vscale x 8 x float> %0,
460 <vscale x 8 x float> %1,
461 <vscale x 8 x i1> %2,
462 iXLen 0, iXLen %3, iXLen 1)
464 ret <vscale x 8 x float> %a
467 declare <vscale x 16 x float> @llvm.riscv.vfsqrt.nxv16f32(
468 <vscale x 16 x float>,
469 <vscale x 16 x float>,
472 define <vscale x 16 x float> @intrinsic_vfsqrt_v_nxv16f32_nxv16f32(<vscale x 16 x float> %0, iXLen %1) nounwind {
473 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv16f32_nxv16f32:
474 ; CHECK: # %bb.0: # %entry
475 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
476 ; CHECK-NEXT: fsrmi a0, 0
477 ; CHECK-NEXT: vfsqrt.v v8, v8
478 ; CHECK-NEXT: fsrm a0
481 %a = call <vscale x 16 x float> @llvm.riscv.vfsqrt.nxv16f32(
482 <vscale x 16 x float> undef,
483 <vscale x 16 x float> %0,
486 ret <vscale x 16 x float> %a
489 declare <vscale x 16 x float> @llvm.riscv.vfsqrt.mask.nxv16f32(
490 <vscale x 16 x float>,
491 <vscale x 16 x float>,
493 iXLen, iXLen, iXLen);
495 define <vscale x 16 x float> @intrinsic_vfsqrt_mask_v_nxv16f32_nxv16f32(<vscale x 16 x float> %0, <vscale x 16 x float> %1, <vscale x 16 x i1> %2, iXLen %3) nounwind {
496 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv16f32_nxv16f32:
497 ; CHECK: # %bb.0: # %entry
498 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, mu
499 ; CHECK-NEXT: fsrmi a0, 0
500 ; CHECK-NEXT: vfsqrt.v v8, v16, v0.t
501 ; CHECK-NEXT: fsrm a0
504 %a = call <vscale x 16 x float> @llvm.riscv.vfsqrt.mask.nxv16f32(
505 <vscale x 16 x float> %0,
506 <vscale x 16 x float> %1,
507 <vscale x 16 x i1> %2,
508 iXLen 0, iXLen %3, iXLen 1)
510 ret <vscale x 16 x float> %a
513 declare <vscale x 1 x double> @llvm.riscv.vfsqrt.nxv1f64(
514 <vscale x 1 x double>,
515 <vscale x 1 x double>,
518 define <vscale x 1 x double> @intrinsic_vfsqrt_v_nxv1f64_nxv1f64(<vscale x 1 x double> %0, iXLen %1) nounwind {
519 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv1f64_nxv1f64:
520 ; CHECK: # %bb.0: # %entry
521 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
522 ; CHECK-NEXT: fsrmi a0, 0
523 ; CHECK-NEXT: vfsqrt.v v8, v8
524 ; CHECK-NEXT: fsrm a0
527 %a = call <vscale x 1 x double> @llvm.riscv.vfsqrt.nxv1f64(
528 <vscale x 1 x double> undef,
529 <vscale x 1 x double> %0,
532 ret <vscale x 1 x double> %a
535 declare <vscale x 1 x double> @llvm.riscv.vfsqrt.mask.nxv1f64(
536 <vscale x 1 x double>,
537 <vscale x 1 x double>,
539 iXLen, iXLen, iXLen);
541 define <vscale x 1 x double> @intrinsic_vfsqrt_mask_v_nxv1f64_nxv1f64(<vscale x 1 x double> %0, <vscale x 1 x double> %1, <vscale x 1 x i1> %2, iXLen %3) nounwind {
542 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv1f64_nxv1f64:
543 ; CHECK: # %bb.0: # %entry
544 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
545 ; CHECK-NEXT: fsrmi a0, 0
546 ; CHECK-NEXT: vfsqrt.v v8, v9, v0.t
547 ; CHECK-NEXT: fsrm a0
550 %a = call <vscale x 1 x double> @llvm.riscv.vfsqrt.mask.nxv1f64(
551 <vscale x 1 x double> %0,
552 <vscale x 1 x double> %1,
553 <vscale x 1 x i1> %2,
554 iXLen 0, iXLen %3, iXLen 1)
556 ret <vscale x 1 x double> %a
559 declare <vscale x 2 x double> @llvm.riscv.vfsqrt.nxv2f64(
560 <vscale x 2 x double>,
561 <vscale x 2 x double>,
564 define <vscale x 2 x double> @intrinsic_vfsqrt_v_nxv2f64_nxv2f64(<vscale x 2 x double> %0, iXLen %1) nounwind {
565 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv2f64_nxv2f64:
566 ; CHECK: # %bb.0: # %entry
567 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
568 ; CHECK-NEXT: fsrmi a0, 0
569 ; CHECK-NEXT: vfsqrt.v v8, v8
570 ; CHECK-NEXT: fsrm a0
573 %a = call <vscale x 2 x double> @llvm.riscv.vfsqrt.nxv2f64(
574 <vscale x 2 x double> undef,
575 <vscale x 2 x double> %0,
578 ret <vscale x 2 x double> %a
581 declare <vscale x 2 x double> @llvm.riscv.vfsqrt.mask.nxv2f64(
582 <vscale x 2 x double>,
583 <vscale x 2 x double>,
585 iXLen, iXLen, iXLen);
587 define <vscale x 2 x double> @intrinsic_vfsqrt_mask_v_nxv2f64_nxv2f64(<vscale x 2 x double> %0, <vscale x 2 x double> %1, <vscale x 2 x i1> %2, iXLen %3) nounwind {
588 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv2f64_nxv2f64:
589 ; CHECK: # %bb.0: # %entry
590 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
591 ; CHECK-NEXT: fsrmi a0, 0
592 ; CHECK-NEXT: vfsqrt.v v8, v10, v0.t
593 ; CHECK-NEXT: fsrm a0
596 %a = call <vscale x 2 x double> @llvm.riscv.vfsqrt.mask.nxv2f64(
597 <vscale x 2 x double> %0,
598 <vscale x 2 x double> %1,
599 <vscale x 2 x i1> %2,
600 iXLen 0, iXLen %3, iXLen 1)
602 ret <vscale x 2 x double> %a
605 declare <vscale x 4 x double> @llvm.riscv.vfsqrt.nxv4f64(
606 <vscale x 4 x double>,
607 <vscale x 4 x double>,
610 define <vscale x 4 x double> @intrinsic_vfsqrt_v_nxv4f64_nxv4f64(<vscale x 4 x double> %0, iXLen %1) nounwind {
611 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv4f64_nxv4f64:
612 ; CHECK: # %bb.0: # %entry
613 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
614 ; CHECK-NEXT: fsrmi a0, 0
615 ; CHECK-NEXT: vfsqrt.v v8, v8
616 ; CHECK-NEXT: fsrm a0
619 %a = call <vscale x 4 x double> @llvm.riscv.vfsqrt.nxv4f64(
620 <vscale x 4 x double> undef,
621 <vscale x 4 x double> %0,
624 ret <vscale x 4 x double> %a
627 declare <vscale x 4 x double> @llvm.riscv.vfsqrt.mask.nxv4f64(
628 <vscale x 4 x double>,
629 <vscale x 4 x double>,
631 iXLen, iXLen, iXLen);
633 define <vscale x 4 x double> @intrinsic_vfsqrt_mask_v_nxv4f64_nxv4f64(<vscale x 4 x double> %0, <vscale x 4 x double> %1, <vscale x 4 x i1> %2, iXLen %3) nounwind {
634 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv4f64_nxv4f64:
635 ; CHECK: # %bb.0: # %entry
636 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
637 ; CHECK-NEXT: fsrmi a0, 0
638 ; CHECK-NEXT: vfsqrt.v v8, v12, v0.t
639 ; CHECK-NEXT: fsrm a0
642 %a = call <vscale x 4 x double> @llvm.riscv.vfsqrt.mask.nxv4f64(
643 <vscale x 4 x double> %0,
644 <vscale x 4 x double> %1,
645 <vscale x 4 x i1> %2,
646 iXLen 0, iXLen %3, iXLen 1)
648 ret <vscale x 4 x double> %a
651 declare <vscale x 8 x double> @llvm.riscv.vfsqrt.nxv8f64(
652 <vscale x 8 x double>,
653 <vscale x 8 x double>,
656 define <vscale x 8 x double> @intrinsic_vfsqrt_v_nxv8f64_nxv8f64(<vscale x 8 x double> %0, iXLen %1) nounwind {
657 ; CHECK-LABEL: intrinsic_vfsqrt_v_nxv8f64_nxv8f64:
658 ; CHECK: # %bb.0: # %entry
659 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
660 ; CHECK-NEXT: fsrmi a0, 0
661 ; CHECK-NEXT: vfsqrt.v v8, v8
662 ; CHECK-NEXT: fsrm a0
665 %a = call <vscale x 8 x double> @llvm.riscv.vfsqrt.nxv8f64(
666 <vscale x 8 x double> undef,
667 <vscale x 8 x double> %0,
670 ret <vscale x 8 x double> %a
673 declare <vscale x 8 x double> @llvm.riscv.vfsqrt.mask.nxv8f64(
674 <vscale x 8 x double>,
675 <vscale x 8 x double>,
677 iXLen, iXLen, iXLen);
679 define <vscale x 8 x double> @intrinsic_vfsqrt_mask_v_nxv8f64_nxv8f64(<vscale x 8 x double> %0, <vscale x 8 x double> %1, <vscale x 8 x i1> %2, iXLen %3) nounwind {
680 ; CHECK-LABEL: intrinsic_vfsqrt_mask_v_nxv8f64_nxv8f64:
681 ; CHECK: # %bb.0: # %entry
682 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, mu
683 ; CHECK-NEXT: fsrmi a0, 0
684 ; CHECK-NEXT: vfsqrt.v v8, v16, v0.t
685 ; CHECK-NEXT: fsrm a0
688 %a = call <vscale x 8 x double> @llvm.riscv.vfsqrt.mask.nxv8f64(
689 <vscale x 8 x double> %0,
690 <vscale x 8 x double> %1,
691 <vscale x 8 x i1> %2,
692 iXLen 0, iXLen %3, iXLen 1)
694 ret <vscale x 8 x double> %a