aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorPan Li <pan2.li@intel.com>2024-06-19 21:14:31 +0800
committerPan Li <pan2.li@intel.com>2024-06-19 21:29:27 +0800
commitbe18486825dd24533d320bf840bf95bd083487d1 (patch)
tree4892a5458befb1aa16b1f00bb3601bb27c503cc7 /gcc/tree-vectorizer.h
parentf1275820518772f4eece48bb3a578277cd7da138 (diff)
downloadgcc-be18486825dd24533d320bf840bf95bd083487d1.zip
gcc-be18486825dd24533d320bf840bf95bd083487d1.tar.gz
gcc-be18486825dd24533d320bf840bf95bd083487d1.tar.bz2
RISC-V: Add testcases for unsigned .SAT_SUB vector form 10
After the middle-end support the form 10 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 10: #define DEF_VEC_SAT_U_SUB_FMT_10(T) \ void __attribute__((noinline)) \ vec_sat_u_sub_##T##_fmt_10 (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; \ bool overflow = __builtin_sub_overflow (x, y, &ret); \ out[i] = !overflow ? ret : 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-37.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-38.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-39.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-40.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-37.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-38.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-39.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_u_sub-run-40.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