RISC-V: Add autovec FP unary operations.
commitda6cc50819c6652e9612cf5b35886afc284afb38
authorRobin Dapp <rdapp@ventanamicro.com>
Mon, 12 Jun 2023 18:52:52 +0000 (12 20:52 +0200)
committerRobin Dapp <rdapp@ventanamicro.com>
Mon, 19 Jun 2023 08:05:05 +0000 (19 10:05 +0200)
treecbb713e1528949579de2847447fd9685310afaf8
parent47ffabaf669e0c3950c7b1904f0873b006664d99
RISC-V: Add autovec FP unary operations.

This patch adds floating-point autovec expanders for vfneg, vfabs as well as
vfsqrt and the accompanying tests.

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

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.
* gcc.target/riscv/rvv/autovec/zvfhmin-1.c: Add unops.
17 files changed:
gcc/config/riscv/autovec.md
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/abs-run.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/abs-rv32gcv.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/abs-rv64gcv.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/abs-template.h
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/abs-zvfh-run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/vfsqrt-run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/vfsqrt-rv32gcv.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/vfsqrt-rv64gcv.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/vfsqrt-template.h [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/vfsqrt-zvfh-run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/vneg-run.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/vneg-rv32gcv.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/vneg-rv64gcv.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/vneg-template.h
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/vneg-zvfh-run.c [copied from gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/vneg-run.c with 62% similarity]
gcc/testsuite/gcc.target/riscv/rvv/autovec/zvfhmin-1.c