diff options
author | Pan Li <pan2.li@intel.com> | 2024-06-17 14:39:10 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-06-19 14:06:58 +0800 |
commit | a84945e521e5687cdc46fc1f963d64d0b7f26cdd (patch) | |
tree | 1f9f280ded2b5f51f7c840e62d8ce2ae3395e98b /gcc/tree-vectorizer.h | |
parent | 61655f5c95186960f637c26130f08098e5407516 (diff) | |
download | gcc-a84945e521e5687cdc46fc1f963d64d0b7f26cdd.zip gcc-a84945e521e5687cdc46fc1f963d64d0b7f26cdd.tar.gz gcc-a84945e521e5687cdc46fc1f963d64d0b7f26cdd.tar.bz2 |
RISC-V: Add testcases for unsigned .SAT_ADD vector form 2
After the middle-end support the form 2 of unsigned SAT_ADD and
the RISC-V backend implement the .SAT_ADD for vector mode, add
more test case to cover the form 2.
Form 2:
#define DEF_VEC_SAT_U_ADD_FMT_2(T) \
void __attribute__((noinline)) \
vec_sat_u_add_##T##_fmt_2 (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] = (T)(x + y) >= x ? (x + y) : -1; \
} \
}
Passed the rv64gcv regression tests.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/binop/vec_sat_arith.h: Add helper
macro for testing.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-5.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-6.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-7.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-8.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-run-5.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-run-6.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-run-7.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-run-8.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