RISC-V: Add more run test for FP rounding autovec
commit7866984ba427dc56a12ee1b8d99feb4927b834b1
authorPan Li <pan2.li@intel.com>
Sat, 7 Oct 2023 05:17:41 +0000 (7 13:17 +0800)
committerPan Li <pan2.li@intel.com>
Sat, 7 Oct 2023 07:59:34 +0000 (7 15:59 +0800)
tree1a9ac196c06696e0dd043f86272d59892f2a5a2b
parent537d7a445ca0ed677751afd3cdcf8465ccd5fb7e
RISC-V: Add more run test for FP rounding autovec

For _Float16 types, add run test for:
* ceil
* floor
* nearbyint
* rint
* round
* roundeven
* trunc

For float and double, add run test for:
* roundeven

The zfa extension is required for these run test cases, the simulation
target_board may look like below for rv64.

target_board="riscv-sim/-march=rv64gcv_zfa_zfh/-mabi=lp64d/-mcmodel=medlow"

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/rvv.exp: Add zfa for building.
* gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c: New test.
* gcc.target/riscv/rvv/autovec/unop/math-floor-run-0.c: New test.
* gcc.target/riscv/rvv/autovec/unop/math-nearbyint-run-0.c: New test.
* gcc.target/riscv/rvv/autovec/unop/math-rint-run-0.c: New test.
* gcc.target/riscv/rvv/autovec/unop/math-round-run-0.c: New test.
* gcc.target/riscv/rvv/autovec/unop/math-roundeven-run-0.c: New test.
* gcc.target/riscv/rvv/autovec/unop/math-roundeven-run-1.c: New test.
* gcc.target/riscv/rvv/autovec/unop/math-roundeven-run-2.c: New test.
* gcc.target/riscv/rvv/autovec/unop/math-trunc-run-0.c: New test.

Signed-off-by: Pan Li <pan2.li@intel.com>
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-floor-run-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-nearbyint-run-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-rint-run-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-round-run-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-roundeven-run-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-roundeven-run-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-roundeven-run-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-trunc-run-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/rvv.exp