diff options
author | Pan Li <pan2.li@intel.com> | 2024-09-26 20:21:10 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-10-02 14:01:28 +0800 |
commit | ed7b3e78183ffed49f197536239812fe77d7d687 (patch) | |
tree | 826aa9d1ab8d69f17b32fb6e3497f7dd441607de /libcpp/files.cc | |
parent | 3809b4d6ec385b51af300f570c0ed2895faa2c8e (diff) | |
download | gcc-ed7b3e78183ffed49f197536239812fe77d7d687.zip gcc-ed7b3e78183ffed49f197536239812fe77d7d687.tar.gz gcc-ed7b3e78183ffed49f197536239812fe77d7d687.tar.bz2 |
RISC-V: Add testcases for form 2 of scalar signed SAT_SUB
Form 2:
#define DEF_SAT_S_SUB_FMT_2(T, UT, MIN, MAX) \
T __attribute__((noinline)) \
sat_s_sub_##T##_fmt_1 (T x, T y) \
{ \
T minus = (UT)x - (UT)y; \
if ((x ^ y) >= 0 || (minus ^ x) >= 0) \
return minus; \
return x < 0 ? MIN : MAX; \
}
DEF_SAT_S_SUB_FMT_2(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/sat_arith.h: Add test helper macros.
* gcc.target/riscv/sat_s_sub-2-i16.c: New test.
* gcc.target/riscv/sat_s_sub-2-i32.c: New test.
* gcc.target/riscv/sat_s_sub-2-i64.c: New test.
* gcc.target/riscv/sat_s_sub-2-i8.c: New test.
* gcc.target/riscv/sat_s_sub-run-2-i16.c: New test.
* gcc.target/riscv/sat_s_sub-run-2-i32.c: New test.
* gcc.target/riscv/sat_s_sub-run-2-i64.c: New test.
* gcc.target/riscv/sat_s_sub-run-2-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