diff options
author | Pan Li <pan2.li@intel.com> | 2023-08-25 09:37:00 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2023-08-31 23:31:56 +0800 |
commit | af0c625f6085567522cf55b2ced05f07ec7be67a (patch) | |
tree | 1d2abcfc2a5146319fdc306eecec6a5ead1f2116 /gcc/c-family | |
parent | a7cefeaead68e5d89f65ba3a558eddef9b0b0f75 (diff) | |
download | gcc-af0c625f6085567522cf55b2ced05f07ec7be67a.zip gcc-af0c625f6085567522cf55b2ced05f07ec7be67a.tar.gz gcc-af0c625f6085567522cf55b2ced05f07ec7be67a.tar.bz2 |
RISC-V: Support rounding mode for VFNMADD/VFNMACC autovec
There will be a case like below for intrinsic and autovec combination.
vfadd RTZ <- intrinisc static rounding
vfnmadd <- autovec/autovec-opt
The autovec generated vfnmadd should take DYN mode, and the
frm must be restored before the vfnmadd insn. This patch
would like to fix this issue by:
* Add the frm operand to the autovec/autovec-opt pattern.
* Set the frm_mode attr to DYN.
Thus, the frm flow when combine autovec and intrinsic should be.
+------------
| frrm a5
| ...
| fsrmi 4
| vfadd <- intrinsic static rounding.
| ...
| fsrm a5
| vfnmadd <- autovec/autovec-opt
| ...
+------------
Signed-off-by: Pan Li <pan2.li@intel.com>
gcc/ChangeLog:
* config/riscv/autovec-opt.md: Add FRM_REGNUM to vfnmadd/vfnmacc.
* config/riscv/autovec.md: Ditto.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/float-point-frm-autovec-4.c: New test.
Diffstat (limited to 'gcc/c-family')
0 files changed, 0 insertions, 0 deletions