diff options
author | Pan Li <pan2.li@intel.com> | 2024-08-25 11:02:10 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-08-26 09:17:35 +0800 |
commit | 5ab1e238aa23d1773429f8f28abfb6ed16f655f6 (patch) | |
tree | e771437930ffb48bf7465a8fefb93664e41d07b2 /gcc/tree-if-conv.cc | |
parent | 07b7098b6eacfe5c95f679058bf2cb98dfec75b5 (diff) | |
download | gcc-5ab1e238aa23d1773429f8f28abfb6ed16f655f6.zip gcc-5ab1e238aa23d1773429f8f28abfb6ed16f655f6.tar.gz gcc-5ab1e238aa23d1773429f8f28abfb6ed16f655f6.tar.bz2 |
RISC-V: Add testcases for unsigned scalar .SAT_TRUNC form 4
This patch would like to add test cases for the unsigned scalar quad and
oct .SAT_TRUNC form 4. Aka:
Form 4:
#define DEF_SAT_U_TRUNC_FMT_4(NT, WT) \
NT __attribute__((noinline)) \
sat_u_trunc_##WT##_to_##NT##_fmt_4 (WT x) \
{ \
bool not_overflow = x <= (WT)(NT)(-1); \
return ((NT)x) | (NT)((NT)not_overflow - 1); \
}
The below test is passed for this patch.
* The rv64gcv regression test.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/sat_arith.h: Add test helper macros.
* gcc.target/riscv/sat_u_trunc-19.c: New test.
* gcc.target/riscv/sat_u_trunc-20.c: New test.
* gcc.target/riscv/sat_u_trunc-21.c: New test.
* gcc.target/riscv/sat_u_trunc-22.c: New test.
* gcc.target/riscv/sat_u_trunc-23.c: New test.
* gcc.target/riscv/sat_u_trunc-24.c: New test.
* gcc.target/riscv/sat_u_trunc-run-19.c: New test.
* gcc.target/riscv/sat_u_trunc-run-20.c: New test.
* gcc.target/riscv/sat_u_trunc-run-21.c: New test.
* gcc.target/riscv/sat_u_trunc-run-22.c: New test.
* gcc.target/riscv/sat_u_trunc-run-23.c: New test.
* gcc.target/riscv/sat_u_trunc-run-24.c: New test.
Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'gcc/tree-if-conv.cc')
0 files changed, 0 insertions, 0 deletions