On 6/14/23 09:31, Robin Dapp wrote:
Hi,

this patch adds floating-point autovec expanders for vfneg, vfabs as well as
vfsqrt and the accompanying tests.  vfrsqrt7 will be added at a later time.
So with vrsqrt7 I think the question turns into will we be able to use it effectively. With its limited initial accuracy, we'll be stuck with another round of Newton-Raphson or Goldschmidt, so we're not likely going to beat the latency of a standard vsqrt. We can use it to improve throughput though since it does pipeline (using the fmacs of course, so there's a definite trade-off if the fmacs are already saturated).



Similary to the binop tests, there are flavors for zvfh now.  Prerequisites
as before.

Regards
  Robin

gcc/ChangeLog:

        * config/riscv/autovec.md (<optab><mode>2): Add unop expanders.

gcc/testsuite/ChangeLog:

        * gcc.target/riscv/rvv/autovec/unop/abs-run.c: Add FP.
        * gcc.target/riscv/rvv/autovec/unop/abs-rv32gcv.c: Add FP.
        * gcc.target/riscv/rvv/autovec/unop/abs-rv64gcv.c: Add FP.
        * gcc.target/riscv/rvv/autovec/unop/abs-template.h: Add FP.
        * gcc.target/riscv/rvv/autovec/unop/vneg-run.c: Add FP.
        * gcc.target/riscv/rvv/autovec/unop/vneg-rv32gcv.c: Add FP.
        * gcc.target/riscv/rvv/autovec/unop/vneg-rv64gcv.c: Add FP.
        * gcc.target/riscv/rvv/autovec/unop/vneg-template.h: Add FP.
        * gcc.target/riscv/rvv/autovec/unop/abs-zvfh-run.c: New test.
        * gcc.target/riscv/rvv/autovec/unop/vfsqrt-run.c: New test.
        * gcc.target/riscv/rvv/autovec/unop/vfsqrt-rv32gcv.c: New test.
        * gcc.target/riscv/rvv/autovec/unop/vfsqrt-rv64gcv.c: New test.
        * gcc.target/riscv/rvv/autovec/unop/vfsqrt-template.h: New test.
        * gcc.target/riscv/rvv/autovec/unop/vfsqrt-zvfh-run.c: New test.
        * gcc.target/riscv/rvv/autovec/unop/vneg-zvfh-run.c: New test.
LGTM. So if Juzhe is happy with it, then it's good to go once dependencies are resolved.

jeff

Reply via email to