]> gcc.gnu.org Git - gcc.git/commit
RISC-V: Refine run test cases of math autovec
authorPan Li <pan2.li@intel.com>
Wed, 11 Oct 2023 12:08:52 +0000 (20:08 +0800)
committerPan Li <pan2.li@intel.com>
Fri, 13 Oct 2023 11:42:03 +0000 (19:42 +0800)
commit9a82cca91dee190d845ee1681440bc69a07c6d49
tree1affc49416e3d533006bd549c7a2fc909e8ce353
parent8c5447ad67e580a9fe48abf27fd99119b0e9e0f9
RISC-V: Refine run test cases of math autovec

For the run test cases of math autovec, we need a reference value to
check if the return value is expected or not.

The previous patch leverage hardcode for the reference value but we
can leverage the scalar math function instead. For example ceil after
autovec.

ASSERT (CEIL (Vector {1.2,...}) == Vector {2.0, ...});

But we can leverage the scalar math function to avoid potential mistakes.

ASSERT (CEIL (Vector {1.2,...}) == Vector {ceil (1.2), ...});

This patch remove some fflags check as it covered by check-body already.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/unop/math-ceil-run-1.c:
Use scalar func as reference instead of hardcode.
* gcc.target/riscv/rvv/autovec/unop/math-ceil-run-2.c: Ditto.
* gcc.target/riscv/rvv/autovec/unop/math-floor-run-1.c: Ditto.
* gcc.target/riscv/rvv/autovec/unop/math-floor-run-2.c: Ditto.
* gcc.target/riscv/rvv/autovec/unop/math-nearbyint-run-1.c: Ditto.
* gcc.target/riscv/rvv/autovec/unop/math-nearbyint-run-2.c: Ditto.
* gcc.target/riscv/rvv/autovec/unop/math-rint-run-1.c: Ditto.
* gcc.target/riscv/rvv/autovec/unop/math-rint-run-2.c: Ditto.
* gcc.target/riscv/rvv/autovec/unop/math-round-run-1.c: Ditto.
* gcc.target/riscv/rvv/autovec/unop/math-round-run-2.c: Ditto.
* gcc.target/riscv/rvv/autovec/unop/math-trunc-run-1.c: Ditto.
* gcc.target/riscv/rvv/autovec/unop/math-trunc-run-2.c: Ditto.

Signed-off-by: Pan Li <pan2.li@intel.com>
12 files changed:
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-1.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ceil-run-2.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-floor-run-1.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-floor-run-2.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-nearbyint-run-1.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-nearbyint-run-2.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-rint-run-1.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-rint-run-2.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-round-run-1.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-round-run-2.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-trunc-run-1.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-trunc-run-2.c
This page took 0.063426 seconds and 5 git commands to generate.