diff options
author | Pan Li <pan2.li@intel.com> | 2024-06-03 09:35:49 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-06-07 08:53:19 +0800 |
commit | 0261ed4337f62c247b33145a81cd4fb5a69bc5a7 (patch) | |
tree | 94a9c17a805dd9366a57605a1d6e3253383b6549 /libcpp | |
parent | a737c2bf5212822b8225f65efa643a968e5a7c78 (diff) | |
download | gcc-0261ed4337f62c247b33145a81cd4fb5a69bc5a7.zip gcc-0261ed4337f62c247b33145a81cd4fb5a69bc5a7.tar.gz gcc-0261ed4337f62c247b33145a81cd4fb5a69bc5a7.tar.bz2 |
RISC-V: Add testcases for scalar unsigned SAT_ADD form 2
After the middle-end support the form 2 of unsigned SAT_ADD and
the RISC-V backend implement the scalar .SAT_ADD, add more test
case to cover the form 2 of unsigned .SAT_ADD.
Form 2:
#define SAT_ADD_U_2(T) \
T sat_add_u_2_##T(T x, T y) \
{ \
T ret; \
T overflow = __builtin_add_overflow (x, y, &ret); \
return (T)(-overflow) | ret; \
}
Passed the rv64gcv fully regression test.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/sat_arith.h: Add test macro for form 2.
* gcc.target/riscv/sat_u_add-10.c: New test.
* gcc.target/riscv/sat_u_add-11.c: New test.
* gcc.target/riscv/sat_u_add-12.c: New test.
* gcc.target/riscv/sat_u_add-9.c: New test.
* gcc.target/riscv/sat_u_add-run-10.c: New test.
* gcc.target/riscv/sat_u_add-run-11.c: New test.
* gcc.target/riscv/sat_u_add-run-12.c: New test.
* gcc.target/riscv/sat_u_add-run-9.c: New test.
Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions