diff options
author | Pan Li <pan2.li@intel.com> | 2024-08-18 12:49:47 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-09-02 09:26:37 +0800 |
commit | ea81e21d5398bdacf883533fd738fc45ea8d6dd9 (patch) | |
tree | 37c11b66448893b542736d182db7464a826f273d /gcc/tree-vectorizer.h | |
parent | 56ed1dfa79c436b769f3266258d34d160b4330d9 (diff) | |
download | gcc-ea81e21d5398bdacf883533fd738fc45ea8d6dd9.zip gcc-ea81e21d5398bdacf883533fd738fc45ea8d6dd9.tar.gz gcc-ea81e21d5398bdacf883533fd738fc45ea8d6dd9.tar.bz2 |
RISC-V: Add testcases for unsigned scalar quad and oct .SAT_TRUNC form 2
This patch would like to add test cases for the unsigned scalar quad and
oct .SAT_TRUNC form 2. Aka:
Form 2:
#define DEF_SAT_U_TRUC_FMT_2(NT, WT) \
NT __attribute__((noinline)) \
sat_u_truc_##WT##_to_##NT##_fmt_2 (WT x) \
{ \
WT max = (WT)(NT)-1; \
return x > max ? (NT) max : (NT)x; \
}
QUAD:
DEF_SAT_U_TRUC_FMT_2 (uint16_t, uint64_t)
DEF_SAT_U_TRUC_FMT_2 (uint8_t, uint32_t)
OCT:
DEF_SAT_U_TRUC_FMT_2 (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-10.c: New test.
* gcc.target/riscv/sat_u_trunc-11.c: New test.
* gcc.target/riscv/sat_u_trunc-12.c: New test.
* gcc.target/riscv/sat_u_trunc-run-10.c: New test.
* gcc.target/riscv/sat_u_trunc-run-11.c: New test.
* gcc.target/riscv/sat_u_trunc-run-12.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