diff options
author | Pan Li <pan2.li@intel.com> | 2024-09-20 10:01:40 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-09-23 07:43:14 +0800 |
commit | 20ec2c5dd4f21ee4d5c8246fbaddc507ee7fed3d (patch) | |
tree | ca8d479a716bd14b2c4b939cc0d323e7ebf0a44a /gcc/gimple-iterator.h | |
parent | 0312b66677590471b8b783b81f62b2e36b1b7ac1 (diff) | |
download | gcc-20ec2c5dd4f21ee4d5c8246fbaddc507ee7fed3d.zip gcc-20ec2c5dd4f21ee4d5c8246fbaddc507ee7fed3d.tar.gz gcc-20ec2c5dd4f21ee4d5c8246fbaddc507ee7fed3d.tar.bz2 |
RISC-V: Add testcases for form 3 of signed scalar SAT_ADD
This patch would like to add testcases of the signed scalar SAT_ADD
for form 3. Aka:
Form 3:
#define DEF_SAT_S_ADD_FMT_3(T, UT, MIN, MAX) \
T __attribute__((noinline)) \
sat_s_add_##T##_fmt_3 (T x, T y) \
{ \
T sum; \
bool overflow = __builtin_add_overflow (x, y, &sum); \
return overflow ? x < 0 ? MIN : MAX : sum; \
}
DEF_SAT_S_ADD_FMT_3 (int64_t, uint64_t, INT64_MIN, INT64_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_add-10.c: New test.
* gcc.target/riscv/sat_s_add-11.c: New test.
* gcc.target/riscv/sat_s_add-12.c: New test.
* gcc.target/riscv/sat_s_add-9.c: New test.
* gcc.target/riscv/sat_s_add-run-10.c: New test.
* gcc.target/riscv/sat_s_add-run-11.c: New test.
* gcc.target/riscv/sat_s_add-run-12.c: New test.
* gcc.target/riscv/sat_s_add-run-9.c: New test.
Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'gcc/gimple-iterator.h')
0 files changed, 0 insertions, 0 deletions