Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/base/float-point-msac.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv -mabi=lp64 -O3" } */
3
4 #include "riscv_vector.h"
5
6 typedef float float32_t;
7
8 vfloat32m1_t
9 test_riscv_vfmsac_vv_f32m1_rm (vfloat32m1_t vd, vfloat32m1_t op1,
10 vfloat32m1_t op2, size_t vl) {
11 return __riscv_vfmsac_vv_f32m1_rm (vd, op1, op2, 0, vl);
12 }
13
14 vfloat32m1_t
15 test_vfmsac_vv_f32m1_rm_m (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t op1,
16 vfloat32m1_t op2, size_t vl) {
17 return __riscv_vfmsac_vv_f32m1_rm_m (mask, vd, op1, op2, 1, vl);
18 }
19
20 vfloat32m1_t
21 test_vfmsac_vf_f32m1_rm (vfloat32m1_t vd, float32_t op1, vfloat32m1_t op2,
22 size_t vl) {
23 return __riscv_vfmsac_vf_f32m1_rm (vd, op1, op2, 2, vl);
24 }
25
26 vfloat32m1_t
27 test_vfmsac_vf_f32m1_rm_m (vfloat32m1_t vd, vbool32_t mask, float32_t op1,
28 vfloat32m1_t op2, size_t vl) {
29 return __riscv_vfmsac_vf_f32m1_rm_m (mask, vd, op1, op2, 3, vl);
30 }
31
32 vfloat32m1_t
33 test_riscv_vfmsac_vv_f32m1 (vfloat32m1_t vd, vfloat32m1_t op1,
34 vfloat32m1_t op2, size_t vl) {
35 return __riscv_vfmsac_vv_f32m1 (vd, op1, op2, vl);
36 }
37
38 vfloat32m1_t
39 test_vfmsac_vv_f32m1_m (vbool32_t mask, vfloat32m1_t vd, vfloat32m1_t op1,
40 vfloat32m1_t op2, size_t vl) {
41 return __riscv_vfmsac_vv_f32m1_m (mask, vd, op1, op2, vl);
42 }
43
44 /* { dg-final { scan-assembler-times {vfmsac\.v[vf]\s+v[0-9]+,\s*[fav]+[0-9]+,\s*v[0-9]+} 6 } } */
45 /* { dg-final { scan-assembler-times {frrm\s+[axs][0-9]+} 4 } } */
46 /* { dg-final { scan-assembler-times {fsrm\s+[axs][0-9]+} 4 } } */
47 /* { dg-final { scan-assembler-times {fsrmi\s+[01234]} 4 } } */