diff options
author | Pan Li <pan2.li@intel.com> | 2024-06-24 22:25:57 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-06-27 14:50:53 +0800 |
commit | b55798c0fc5cb02512b58502961d8425fb60588f (patch) | |
tree | 0ce7df1efb681a0a0c2c1e17fac29d3b815bdde4 /gcc/tree-vectorizer.h | |
parent | 2280e88ab05ebab994b7db588d577b29f1b12b87 (diff) | |
download | gcc-b55798c0fc5cb02512b58502961d8425fb60588f.zip gcc-b55798c0fc5cb02512b58502961d8425fb60588f.tar.gz gcc-b55798c0fc5cb02512b58502961d8425fb60588f.tar.bz2 |
RISC-V: Add testcases for vector truncate after .SAT_SUB
This patch would like to add the test cases of the vector truncate after
.SAT_SUB. Aka:
#define DEF_VEC_SAT_U_SUB_TRUNC_FMT_1(OUT_T, IN_T) \
void __attribute__((noinline)) \
vec_sat_u_sub_trunc_##OUT_T##_fmt_1 (OUT_T *out, IN_T *op_1, IN_T y, \
unsigned limit) \
{ \
unsigned i; \
for (i = 0; i < limit; i++) \
{ \
IN_T x = op_1[i]; \
out[i] = (OUT_T)(x >= y ? x - y : 0); \
} \
}
The below 3 cases are included.
DEF_VEC_SAT_U_SUB_TRUNC_FMT_1(uint8_t, uint16_t)
DEF_VEC_SAT_U_SUB_TRUNC_FMT_1(uint16_t, uint32_t)
DEF_VEC_SAT_U_SUB_TRUNC_FMT_1(uint32_t, uint64_t)
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/binop/vec_sat_arith.h: Add helper
test macros.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_binary_scalar.h: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub_trunc-1.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub_trunc-2.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub_trunc-3.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub_trunc-run-1.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub_trunc-run-2.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub_trunc-run-3.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