aboutsummaryrefslogtreecommitdiff
path: root/c++tools
diff options
context:
space:
mode:
authorPaul-Antoine Arras <parras@baylibre.com>2025-09-05 16:37:17 +0200
committerPaul-Antoine Arras <parras@baylibre.com>2025-09-08 12:26:10 +0200
commitc2048dae34104a9e172eec6747ab59f4404fba2f (patch)
treecb1cf18b0ae66a3c01c1a2764aa9a920c73bc0e5 /c++tools
parent1f01c51abff55301149f1057aaf0e7d7784bd6cc (diff)
downloadgcc-c2048dae34104a9e172eec6747ab59f4404fba2f.zip
gcc-c2048dae34104a9e172eec6747ab59f4404fba2f.tar.gz
gcc-c2048dae34104a9e172eec6747ab59f4404fba2f.tar.bz2
RISC-V: Add pattern for vector-scalar single-width floating-point reverse sub
This pattern enables the combine pass (or late-combine, depending on the case) to merge a vec_duplicate into a minus RTL instruction. The vec_duplicate is the minuend operand. Before this patch, we have two instructions, e.g.: vfmv.v.f v2,fa0 vfsub.vv v1,v2,v1 After, we get only one: vfrsub.vf v1,v1,fa0 gcc/ChangeLog: * config/riscv/autovec-opt.md (*vfrsub_vf_<mode>): New pattern to combine vec_duplicate + vfsub.vv into vfrsub.vf. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f16.c: Add vfrsub. * gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f32.c: Likewise. * gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f64.c: Likewise. * gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f16.c: Likewise. * gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f32.c: Likewise. * gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f64.c: Likewise. * gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f16.c: Likewise. * gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f32.c: Likewise. * gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f64.c: Likewise. * gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f16.c: Likewise. * gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f32.c: Likewise. * gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f64.c: Likewise. * gcc.target/riscv/rvv/autovec/vx_vf/vf_binop_data.h: Add data for vfrsub. * gcc.target/riscv/rvv/autovec/vx_vf/vf_vfrsub-run-1-f16.c: New test. * gcc.target/riscv/rvv/autovec/vx_vf/vf_vfrsub-run-1-f32.c: New test. * gcc.target/riscv/rvv/autovec/vx_vf/vf_vfrsub-run-1-f64.c: New test.
Diffstat (limited to 'c++tools')
0 files changed, 0 insertions, 0 deletions