diff options
author | Pan Li <pan2.li@intel.com> | 2024-06-19 19:44:52 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-06-19 21:28:57 +0800 |
commit | d5054ecca13b9f8f480f5534e40da3e931c4fa72 (patch) | |
tree | 4c927d334ac84bc8b179e734d92b7523134e5e52 /gcc/tree-vectorizer.h | |
parent | 0fe8c5f146178ac86468859f8c83039e88b73481 (diff) | |
download | gcc-d5054ecca13b9f8f480f5534e40da3e931c4fa72.zip gcc-d5054ecca13b9f8f480f5534e40da3e931c4fa72.tar.gz gcc-d5054ecca13b9f8f480f5534e40da3e931c4fa72.tar.bz2 |
RISC-V: Add testcases for unsigned .SAT_SUB vector form 5
After the middle-end support the form 5 of unsigned SAT_SUB and
the RISC-V backend implement the .SAT_SUB for vector mode, thus
add more test case to cover that.
Form 5:
#define DEF_VEC_SAT_U_SUB_FMT_5(T) \
void __attribute__((noinline)) \
vec_sat_u_sub_##T##_fmt_5 (T *out, T *op_1, T *op_2, unsigned limit) \
{ \
unsigned i; \
for (i = 0; i < limit; i++) \
{ \
T x = op_1[i]; \
T y = op_2[i]; \
out[i] = x < y ? 0 : x - y; \
} \
}
Passed the rv64gcv regression test.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/binop/vec_sat_arith.h: Add test macro.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-17.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-18.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-19.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-20.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-17.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-18.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-19.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-20.c: New test.
Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions