diff options
author | Pan Li <pan2.li@intel.com> | 2024-08-18 14:08:21 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-09-02 09:26:42 +0800 |
commit | 5239902210a16b22d59d2cf8b535d615922a5c00 (patch) | |
tree | 189d303c0e9c54315bcff8fe3681b6d65af04d94 /gcc/tree-vectorizer.h | |
parent | ea81e21d5398bdacf883533fd738fc45ea8d6dd9 (diff) | |
download | gcc-5239902210a16b22d59d2cf8b535d615922a5c00.zip gcc-5239902210a16b22d59d2cf8b535d615922a5c00.tar.gz gcc-5239902210a16b22d59d2cf8b535d615922a5c00.tar.bz2 |
RISC-V: Add testcases for unsigned scalar quad and oct .SAT_TRUNC form 3
This patch would like to add test cases for the unsigned scalar quad and
oct .SAT_TRUNC form 3. Aka:
Form 3:
#define DEF_SAT_U_TRUC_FMT_3(NT, WT) \
NT __attribute__((noinline)) \
sat_u_truc_##WT##_to_##NT##_fmt_3 (WT x) \
{ \
WT max = (WT)(NT)-1; \
return x <= max ? (NT)x : (NT) max; \
}
QUAD:
DEF_SAT_U_TRUC_FMT_3 (uint16_t, uint64_t)
DEF_SAT_U_TRUC_FMT_3 (uint8_t, uint32_t)
OCT:
DEF_SAT_U_TRUC_FMT_3 (uint8_t, uint64_t)
The below test is passed for this patch.
* The rv64gcv regression test.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/sat_u_trunc-16.c: New test.
* gcc.target/riscv/sat_u_trunc-17.c: New test.
* gcc.target/riscv/sat_u_trunc-18.c: New test.
* gcc.target/riscv/sat_u_trunc-run-16.c: New test.
* gcc.target/riscv/sat_u_trunc-run-17.c: New test.
* gcc.target/riscv/sat_u_trunc-run-18.c: New test.
Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions