diff options
author | Pan Li <pan2.li@intel.com> | 2024-06-17 16:09:13 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-06-19 14:07:50 +0800 |
commit | 24ae0a0a3dea27d8c81f2f102d637cf09424b4b9 (patch) | |
tree | 67847d4145bdbeaca79b96b894214d3f10b79bd5 /gcc/tree-vectorizer.h | |
parent | 1bdcac7aefdd2a170112e2c78e8e769f7caad0a2 (diff) | |
download | gcc-24ae0a0a3dea27d8c81f2f102d637cf09424b4b9.zip gcc-24ae0a0a3dea27d8c81f2f102d637cf09424b4b9.tar.gz gcc-24ae0a0a3dea27d8c81f2f102d637cf09424b4b9.tar.bz2 |
RISC-V: Add testcases for unsigned .SAT_ADD vector form 4
After the middle-end support the form 4 of unsigned SAT_ADD and
the RISC-V backend implement the .SAT_ADD for vector mode, add
more test case to cover the form 4.
Form 4:
#define DEF_VEC_SAT_U_ADD_FMT_4(T) \
void __attribute__((noinline)) \
vec_sat_u_add_##T##_fmt_4 (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]; \
T ret; \
out[i] = __builtin_add_overflow (x, y, &ret) ? -1 : ret; \
} \
}
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-13.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-14.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-15.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-16.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-run-13.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-run-14.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-run-15.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-run-16.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