On 8/25/24 12:18 AM, pan2...@intel.com wrote:
From: Pan Li <pan2...@intel.com>

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.
Both patches in this series are fine.

Thanks,
jeff

Reply via email to