diff options
author | Pan Li <pan2.li@intel.com> | 2024-06-19 20:28:11 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-06-19 21:29:07 +0800 |
commit | be8dc4bf3b25ca2600886f6e1d9ba7299e78b856 (patch) | |
tree | 4d3f41403d755588e3c7eee86d2c085328867cc9 /gcc/tree-vectorizer.h | |
parent | 337b21151135176b48d5cb6382e3f3258bc9a1db (diff) | |
download | gcc-be8dc4bf3b25ca2600886f6e1d9ba7299e78b856.zip gcc-be8dc4bf3b25ca2600886f6e1d9ba7299e78b856.tar.gz gcc-be8dc4bf3b25ca2600886f6e1d9ba7299e78b856.tar.bz2 |
RISC-V: Add testcases for unsigned .SAT_SUB vector form 7
After the middle-end support the form 7 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 7:
#define DEF_VEC_SAT_U_SUB_FMT_7(T) \
void __attribute__((noinline)) \
vec_sat_u_sub_##T##_fmt_7 (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; \
T overflow = __builtin_sub_overflow (x, y, &ret); \
out[i] = ret & (T)(overflow - 1); \
} \
}
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-25.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-26.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-27.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-28.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-25.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-26.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-27.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-28.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