Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/base/float-point-single-rsub.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_vfrsub_vf_f32m1_rm (vfloat32m1_t op1, float32_t op2, size_t vl) {
10 return __riscv_vfrsub_vf_f32m1_rm (op1, op2, 2, vl);
11 }
12
13 vfloat32m1_t
14 test_vfrsub_vf_f32m1_rm_m (vbool32_t mask, vfloat32m1_t op1, float32_t op2,
15 size_t vl) {
16 return __riscv_vfrsub_vf_f32m1_rm_m (mask, op1, op2, 3, vl);
17 }
18
19 vfloat32m1_t
20 test_vfrsub_vf_f32m1 (vfloat32m1_t op1, float32_t op2, size_t vl) {
21 return __riscv_vfrsub_vf_f32m1 (op1, op2, vl);
22 }
23
24 vfloat32m1_t
25 test_vfrsub_vf_f32m1_m (vbool32_t mask, vfloat32m1_t op1, float32_t op2,
26 size_t vl) {
27 return __riscv_vfrsub_vf_f32m1_m (mask, op1, op2, vl);
28 }
29
30 /* { dg-final { scan-assembler-times {vfrsub\.v[vf]\s+v[0-9]+,\s*v[0-9]+,\s*[fav]+[0-9]+} 4 } } */
31 /* { dg-final { scan-assembler-times {frrm\s+[axs][0-9]+} 2 } } */
32 /* { dg-final { scan-assembler-times {fsrm\s+[axs][0-9]+} 2 } } */
33 /* { dg-final { scan-assembler-times {fsrmi\s+[01234]} 2 } } */