diff options
author | Pan Li <pan2.li@intel.com> | 2025-05-27 09:53:56 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2025-05-28 20:47:59 +0800 |
commit | f4456ea9e955b971573cdfebd1d10797fd30ad3a (patch) | |
tree | 1c32a73a60ddb4143b627ff5fb84eec9f9561f4f /gcc/fortran/iresolve.cc | |
parent | 17f7b6250628c31182fd4f71c9ecdeca9568ffd1 (diff) | |
download | gcc-f4456ea9e955b971573cdfebd1d10797fd30ad3a.zip gcc-f4456ea9e955b971573cdfebd1d10797fd30ad3a.tar.gz gcc-f4456ea9e955b971573cdfebd1d10797fd30ad3a.tar.bz2 |
RISC-V: Leverage vaadd.vv for signed standard name avg_floor
The signed avg_floor totally match the sematics of fixed point
rvv insn vaadd, within round down. Thus, leverage it directly
to implement the avf_floor.
The spec of RVV is somehow not that clear about the difference
between the float point and fixed point for the rounding that
discard least-significant information.
For float point which is not two's complement, the "discard
least-significant information" indicates truncation round. For
example as below:
* 3.5 -> 3
* -2.3 -> -2
For fixed point which is two's complement, the "discard
least-significant information" indicates round down. For
example as below:
* 3.5 -> 3
* -2.3 -> -3
And the vaadd takes the round down which is totally matching
the sematics of the avf_floor.
The below test suites are passed for this patch series.
* The rv64gcv fully regression test.
gcc/ChangeLog:
* config/riscv/autovec.md (avg<v_double_trunc>3_floor): Add insn
expand to leverage vaadd directly.
Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'gcc/fortran/iresolve.cc')
0 files changed, 0 insertions, 0 deletions