| 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 |
vfloat64m2_t |
| 9 |
test_vfwsub_vv_f32m1_rm (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl) { |
| 10 |
return __riscv_vfwsub_vv_f64m2_rm (op1, op2, 0, vl); |
| 11 |
} |
| 12 |
|
| 13 |
vfloat64m2_t |
| 14 |
test_vfwsub_vv_f32m1_rm_m (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, |
| 15 |
size_t vl) { |
| 16 |
return __riscv_vfwsub_vv_f64m2_rm_m (mask, op1, op2, 1, vl); |
| 17 |
} |
| 18 |
|
| 19 |
vfloat64m2_t |
| 20 |
test_vfwsub_vf_f32m1_rm (vfloat32m1_t op1, float32_t op2, size_t vl) { |
| 21 |
return __riscv_vfwsub_vf_f64m2_rm (op1, op2, 2, vl); |
| 22 |
} |
| 23 |
|
| 24 |
vfloat64m2_t |
| 25 |
test_vfwsub_vf_f32m1_rm_m (vbool32_t mask, vfloat32m1_t op1, float32_t op2, |
| 26 |
size_t vl) { |
| 27 |
return __riscv_vfwsub_vf_f64m2_rm_m (mask, op1, op2, 3, vl); |
| 28 |
} |
| 29 |
|
| 30 |
vfloat64m2_t |
| 31 |
test_vfwsub_wv_f32m1_rm (vfloat64m2_t op1, vfloat32m1_t op2, size_t vl) { |
| 32 |
return __riscv_vfwsub_wv_f64m2_rm (op1, op2, 0, vl); |
| 33 |
} |
| 34 |
|
| 35 |
vfloat64m2_t |
| 36 |
test_vfwsub_wv_f32m1_rm_m (vbool32_t mask, vfloat64m2_t op1, vfloat32m1_t op2, |
| 37 |
size_t vl) { |
| 38 |
return __riscv_vfwsub_wv_f64m2_rm_m (mask, op1, op2, 1, vl); |
| 39 |
} |
| 40 |
|
| 41 |
vfloat64m2_t |
| 42 |
test_vfwsub_wf_f32m1_rm (vfloat64m2_t op1, float32_t op2, size_t vl) { |
| 43 |
return __riscv_vfwsub_wf_f64m2_rm (op1, op2, 2, vl); |
| 44 |
} |
| 45 |
|
| 46 |
vfloat64m2_t |
| 47 |
test_vfwsub_wf_f32m1_rm_m (vbool32_t mask, vfloat64m2_t op1, float32_t op2, |
| 48 |
size_t vl) { |
| 49 |
return __riscv_vfwsub_wf_f64m2_rm_m (mask, op1, op2, 3, vl); |
| 50 |
} |
| 51 |
|
| 52 |
vfloat64m2_t |
| 53 |
test_vfwsub_vv_f32m1 (vfloat32m1_t op1, vfloat32m1_t op2, size_t vl) { |
| 54 |
return __riscv_vfwsub_vv_f64m2 (op1, op2, vl); |
| 55 |
} |
| 56 |
|
| 57 |
vfloat64m2_t |
| 58 |
test_vfwsub_vv_f32m1_m (vbool32_t mask, vfloat32m1_t op1, vfloat32m1_t op2, |
| 59 |
size_t vl) { |
| 60 |
return __riscv_vfwsub_vv_f64m2_m (mask, op1, op2, vl); |
| 61 |
} |
| 62 |
|
| 63 |
/* { dg-final { scan-assembler-times {vfwsub\.[vw][vf]\s+v[0-9]+,\s*v[0-9]+,\s*[fav]+[0-9]+} 10 } } */ |
| 64 |
/* { dg-final { scan-assembler-times {frrm\s+[axs][0-9]+} 8 } } */ |
| 65 |
/* { dg-final { scan-assembler-times {fsrm\s+[axs][0-9]+} 8 } } */ |
| 66 |
/* { dg-final { scan-assembler-times {fsrmi\s+[01234]} 8 } } */ |