diff options
author | Pan Li <pan2.li@intel.com> | 2024-10-10 16:24:08 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-10-11 18:21:05 +0800 |
commit | dd2d4b3fd87241dca658b68b4f9eef533b7fad36 (patch) | |
tree | 06ba0bf8ae6b1b9a6d31cdd6b82649773dca7055 /gcc/ctfc.h | |
parent | 43e347660f418529f104b67ebce0c5aa332687d7 (diff) | |
download | gcc-dd2d4b3fd87241dca658b68b4f9eef533b7fad36.zip gcc-dd2d4b3fd87241dca658b68b4f9eef533b7fad36.tar.gz gcc-dd2d4b3fd87241dca658b68b4f9eef533b7fad36.tar.bz2 |
RISC-V: Add testcases for form 8 of scalar signed SAT_TRUNC
Form 8:
#define DEF_SAT_S_TRUNC_FMT_8(NT, WT, NT_MIN, NT_MAX) \
NT __attribute__((noinline)) \
sat_s_trunc_##WT##_to_##NT##_fmt_8 (WT x) \
{ \
NT trunc = (NT)x; \
return (WT)NT_MIN > x || x >= (WT)NT_MAX \
? x < 0 ? NT_MIN : NT_MAX \
: trunc; \
}
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_trunc-8-i16-to-i8.c: New test.
* gcc.target/riscv/sat_s_trunc-8-i32-to-i16.c: New test.
* gcc.target/riscv/sat_s_trunc-8-i32-to-i8.c: New test.
* gcc.target/riscv/sat_s_trunc-8-i64-to-i16.c: New test.
* gcc.target/riscv/sat_s_trunc-8-i64-to-i32.c: New test.
* gcc.target/riscv/sat_s_trunc-8-i64-to-i8.c: New test.
* gcc.target/riscv/sat_s_trunc-run-8-i16-to-i8.c: New test.
* gcc.target/riscv/sat_s_trunc-run-8-i32-to-i16.c: New test.
* gcc.target/riscv/sat_s_trunc-run-8-i32-to-i8.c: New test.
* gcc.target/riscv/sat_s_trunc-run-8-i64-to-i16.c: New test.
* gcc.target/riscv/sat_s_trunc-run-8-i64-to-i32.c: New test.
* gcc.target/riscv/sat_s_trunc-run-8-i64-to-i8.c: New test.
Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'gcc/ctfc.h')
0 files changed, 0 insertions, 0 deletions