diff options
author | Pan Li <pan2.li@intel.com> | 2024-06-19 18:56:51 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-06-19 21:28:48 +0800 |
commit | b3a34469f3f94b8cde26976e87b61895e8111cd1 (patch) | |
tree | 54e35cd77a4fe25c1c8d4b94c43d40c845009f46 /gcc/tree-vectorizer.h | |
parent | 8c52adcf5f9812ef66aeef357590fb2f148302f7 (diff) | |
download | gcc-b3a34469f3f94b8cde26976e87b61895e8111cd1.zip gcc-b3a34469f3f94b8cde26976e87b61895e8111cd1.tar.gz gcc-b3a34469f3f94b8cde26976e87b61895e8111cd1.tar.bz2 |
RISC-V: Add testcases for unsigned .SAT_SUB vector form 3
After the middle-end support the form 3 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 3:
#define DEF_VEC_SAT_U_SUB_FMT_3(T) \
void __attribute__((noinline)) \
vec_sat_u_sub_##T##_fmt_3 (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 ? x - y : 0; \
} \
}
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-10.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-11.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-12.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-9.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-10.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-11.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-12.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-9.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