aboutsummaryrefslogtreecommitdiff
path: root/libcpp/files.cc
diff options
context:
space:
mode:
authorPan Li <pan2.li@intel.com>2024-10-11 12:12:03 +0800
committerPan Li <pan2.li@intel.com>2024-10-12 13:23:47 +0800
commitc4af4fe11e71c686ee06c1eebe9e64ad5a94410a (patch)
treeca43c79b9eaf110a41c0efa85573690eec791ed2 /libcpp/files.cc
parent2a7f4904942fd0d988d7d29ba512ee4ee357bb13 (diff)
downloadgcc-c4af4fe11e71c686ee06c1eebe9e64ad5a94410a.zip
gcc-c4af4fe11e71c686ee06c1eebe9e64ad5a94410a.tar.gz
gcc-c4af4fe11e71c686ee06c1eebe9e64ad5a94410a.tar.bz2
RISC-V: Add testcases for form 1 of vector signed SAT_SUB
Form 1: #define DEF_VEC_SAT_S_SUB_FMT_1(T, UT, MIN, MAX) \ void __attribute__((noinline)) \ vec_sat_s_add_##T##_fmt_1 (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 minus = (UT)x - (UT)y; \ out[i] = (x ^ y) >= 0 \ ? minus \ : (minus ^ x) >= 0 \ ? minus \ : x < 0 ? MIN : MAX; \ } \ } DEF_VEC_SAT_S_SUB_FMT_1(int8_t, uint8_t, INT8_MIN, INT8_MAX) The below test are passed for this patch. * The rv64gcv fully regression test. It is test only patch and obvious up to a point, will commit it directly if no comments in next 48H. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/binop/vec_sat_data.h: Add test data for run test. * gcc.target/riscv/rvv/autovec/vec_sat_arith.h: Add test helper macros. * gcc.target/riscv/rvv/autovec/binop/vec_sat_s_sub-1-i16.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_s_sub-1-i32.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_s_sub-1-i64.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_s_sub-1-i8.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_s_sub-run-1-i16.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_s_sub-run-1-i32.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_s_sub-run-1-i64.c: New test. * gcc.target/riscv/rvv/autovec/binop/vec_sat_s_sub-run-1-i8.c: New test. Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'libcpp/files.cc')
0 files changed, 0 insertions, 0 deletions