On Tue, Jun 23, 2026 at 5:41 PM <[email protected]> wrote:
>
> From: Pan Li <[email protected]>
>
> The form 14 of unsigned scalar SAT_MUL has supported from
> the previous change.  Thus, add the test cases to make sure
> it works well

Ok

>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/riscv/sat/sat_arith.h: Add test helper macros.
>         * gcc.target/riscv/sat/sat_u_mul-15-u16-from-u128.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-15-u16-from-u32.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-15-u16-from-u64.rv32.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-15-u16-from-u64.rv64.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-15-u32-from-u128.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-15-u32-from-u64.rv32.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-15-u32-from-u64.rv64.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-15-u64-from-u128.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-15-u8-from-u128.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-15-u8-from-u16.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-15-u8-from-u32.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-15-u8-from-u64.rv32.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-15-u8-from-u64.rv64.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u128.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u32.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u64.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-run-15-u32-from-u128.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-run-15-u32-from-u64.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-run-15-u64-from-u128.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u128.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u16.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u32.c: New test.
>         * gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u64.c: New test.
>
> Signed-off-by: Pan Li <[email protected]>
> ---
>  gcc/testsuite/gcc.target/riscv/sat/sat_arith.h   | 16 ++++++++++++++++
>  .../riscv/sat/sat_u_mul-15-u16-from-u128.c       | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-15-u16-from-u32.c        | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-15-u16-from-u64.rv32.c   | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-15-u16-from-u64.rv64.c   | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-15-u32-from-u128.c       | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-15-u32-from-u64.rv32.c   | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-15-u32-from-u64.rv64.c   | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-15-u64-from-u128.c       | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-15-u8-from-u128.c        | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-15-u8-from-u16.c         | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-15-u8-from-u32.c         | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-15-u8-from-u64.rv32.c    | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-15-u8-from-u64.rv64.c    | 11 +++++++++++
>  .../riscv/sat/sat_u_mul-run-15-u16-from-u128.c   | 16 ++++++++++++++++
>  .../riscv/sat/sat_u_mul-run-15-u16-from-u32.c    | 16 ++++++++++++++++
>  .../riscv/sat/sat_u_mul-run-15-u16-from-u64.c    | 16 ++++++++++++++++
>  .../riscv/sat/sat_u_mul-run-15-u32-from-u128.c   | 16 ++++++++++++++++
>  .../riscv/sat/sat_u_mul-run-15-u32-from-u64.c    | 16 ++++++++++++++++
>  .../riscv/sat/sat_u_mul-run-15-u64-from-u128.c   | 16 ++++++++++++++++
>  .../riscv/sat/sat_u_mul-run-15-u8-from-u128.c    | 16 ++++++++++++++++
>  .../riscv/sat/sat_u_mul-run-15-u8-from-u16.c     | 16 ++++++++++++++++
>  .../riscv/sat/sat_u_mul-run-15-u8-from-u32.c     | 16 ++++++++++++++++
>  .../riscv/sat/sat_u_mul-run-15-u8-from-u64.c     | 16 ++++++++++++++++
>  24 files changed, 319 insertions(+)
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u128.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u32.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u64.rv32.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u64.rv64.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u32-from-u128.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u32-from-u64.rv32.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u32-from-u64.rv64.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u64-from-u128.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u128.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u16.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u32.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u64.rv32.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u64.rv64.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u128.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u32.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u64.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u32-from-u128.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u32-from-u64.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u64-from-u128.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u128.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u16.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u32.c
>  create mode 100644 
> gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u64.c
>
> diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_arith.h 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_arith.h
> index 9a57df400d4..b8f0e84eb82 100644
> --- a/gcc/testsuite/gcc.target/riscv/sat/sat_arith.h
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_arith.h
> @@ -869,4 +869,20 @@ sat_u_mul_##NT##_from_##WT##_fmt_13 (NT a, NT b) \
>    sat_u_mul_##NT##_from_##WT##_fmt_13 (a, b)
>  #define RUN_SAT_U_MUL_FMT_13_WRAP(NT, WT, a, b) RUN_SAT_U_MUL_FMT_13(NT, WT, 
> a, b)
>
> +#define DEF_SAT_U_MUL_FMT_14(NT, WT)             \
> +NT __attribute__((noinline))                     \
> +sat_u_mul_##NT##_from_##WT##_fmt_14 (NT a, NT b) \
> +{                                                \
> +  WT x = (WT)a * (WT)b;                          \
> +  NT hi = x >> (sizeof(NT) * 8);                 \
> +  NT lo = (NT)x;                                 \
> +  return hi == 0 ? lo : -1;                      \
> +}
> +
> +#define DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT) DEF_SAT_U_MUL_FMT_14(NT, WT)
> +#define RUN_SAT_U_MUL_FMT_14(NT, WT, a, b) \
> +  sat_u_mul_##NT##_from_##WT##_fmt_14 (a, b)
> +#define RUN_SAT_U_MUL_FMT_14_WRAP(NT, WT, a, b) \
> +  RUN_SAT_U_MUL_FMT_14(NT, WT, a, b)
> +
>  #endif
> diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u128.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u128.c
> new file mode 100644
> index 00000000000..535aee86fb4
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u128.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint16_t
> +#define WT uint128_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u32.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u32.c
> new file mode 100644
> index 00000000000..bd9a3d86b27
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u32.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint16_t
> +#define WT uint32_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u64.rv32.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u64.rv32.c
> new file mode 100644
> index 00000000000..7043dace325
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u64.rv32.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv32gc -mabi=ilp32 -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint16_t
> +#define WT uint64_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u64.rv64.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u64.rv64.c
> new file mode 100644
> index 00000000000..ff01d10ea26
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u16-from-u64.rv64.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint16_t
> +#define WT uint64_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u32-from-u128.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u32-from-u128.c
> new file mode 100644
> index 00000000000..9f8b7cf8646
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u32-from-u128.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint32_t
> +#define WT uint128_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u32-from-u64.rv32.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u32-from-u64.rv32.c
> new file mode 100644
> index 00000000000..b4107e1600a
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u32-from-u64.rv32.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv32gc -mabi=ilp32 -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint32_t
> +#define WT uint64_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u32-from-u64.rv64.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u32-from-u64.rv64.c
> new file mode 100644
> index 00000000000..79a6c611ca1
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u32-from-u64.rv64.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint32_t
> +#define WT uint64_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u64-from-u128.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u64-from-u128.c
> new file mode 100644
> index 00000000000..e2eed18a86c
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u64-from-u128.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint64_t
> +#define WT uint128_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u128.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u128.c
> new file mode 100644
> index 00000000000..863be7250cb
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u128.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint8_t
> +#define WT uint128_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u16.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u16.c
> new file mode 100644
> index 00000000000..0deff82b3c1
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u16.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint8_t
> +#define WT uint16_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u32.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u32.c
> new file mode 100644
> index 00000000000..82ff9613ab8
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u32.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint8_t
> +#define WT uint32_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u64.rv32.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u64.rv32.c
> new file mode 100644
> index 00000000000..fe3566663dd
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u64.rv32.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv32gc -mabi=ilp32 -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint8_t
> +#define WT uint64_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u64.rv64.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u64.rv64.c
> new file mode 100644
> index 00000000000..ff304aec5e9
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-15-u8-from-u64.rv64.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized" } */
> +
> +#include "sat_arith.h"
> +
> +#define NT uint8_t
> +#define WT uint64_t
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +/* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u128.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u128.c
> new file mode 100644
> index 00000000000..96a8e31722e
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u128.c
> @@ -0,0 +1,16 @@
> +/* { dg-do run { target { rv64 } } } */
> +/* { dg-additional-options "-std=c99" } */
> +
> +#include "sat_arith.h"
> +#include "sat_arith_data.h"
> +
> +#define NT               uint8_t
> +#define WT               uint128_t
> +#define NAME             usmul
> +#define DATA             TEST_BINARY_DATA_WRAP(NT, NAME)
> +#define T                TEST_BINARY_STRUCT_DECL_WRAP(NT, NAME)
> +#define RUN_BINARY(x, y) RUN_SAT_U_MUL_FMT_14_WRAP(NT, WT, x, y)
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +#include "scalar_sat_binary_run_xxx.h"
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u32.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u32.c
> new file mode 100644
> index 00000000000..8f9e2bfaf4b
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u32.c
> @@ -0,0 +1,16 @@
> +/* { dg-do run { target { rv32 || rv64 } } } */
> +/* { dg-additional-options "-std=c99" } */
> +
> +#include "sat_arith.h"
> +#include "sat_arith_data.h"
> +
> +#define NT               uint16_t
> +#define WT               uint32_t
> +#define NAME             usmul
> +#define DATA             TEST_BINARY_DATA_WRAP(NT, NAME)
> +#define T                TEST_BINARY_STRUCT_DECL_WRAP(NT, NAME)
> +#define RUN_BINARY(x, y) RUN_SAT_U_MUL_FMT_14_WRAP(NT, WT, x, y)
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +#include "scalar_sat_binary_run_xxx.h"
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u64.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u64.c
> new file mode 100644
> index 00000000000..a2c26378505
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u16-from-u64.c
> @@ -0,0 +1,16 @@
> +/* { dg-do run { target { rv32 || rv64 } } } */
> +/* { dg-additional-options "-std=c99" } */
> +
> +#include "sat_arith.h"
> +#include "sat_arith_data.h"
> +
> +#define NT               uint16_t
> +#define WT               uint64_t
> +#define NAME             usmul
> +#define DATA             TEST_BINARY_DATA_WRAP(NT, NAME)
> +#define T                TEST_BINARY_STRUCT_DECL_WRAP(NT, NAME)
> +#define RUN_BINARY(x, y) RUN_SAT_U_MUL_FMT_14_WRAP(NT, WT, x, y)
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +#include "scalar_sat_binary_run_xxx.h"
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u32-from-u128.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u32-from-u128.c
> new file mode 100644
> index 00000000000..31b4238cabc
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u32-from-u128.c
> @@ -0,0 +1,16 @@
> +/* { dg-do run { target { rv64 } } } */
> +/* { dg-additional-options "-std=c99" } */
> +
> +#include "sat_arith.h"
> +#include "sat_arith_data.h"
> +
> +#define NT               uint32_t
> +#define WT               uint128_t
> +#define NAME             usmul
> +#define DATA             TEST_BINARY_DATA_WRAP(NT, NAME)
> +#define T                TEST_BINARY_STRUCT_DECL_WRAP(NT, NAME)
> +#define RUN_BINARY(x, y) RUN_SAT_U_MUL_FMT_14_WRAP(NT, WT, x, y)
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +#include "scalar_sat_binary_run_xxx.h"
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u32-from-u64.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u32-from-u64.c
> new file mode 100644
> index 00000000000..816c31dc157
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u32-from-u64.c
> @@ -0,0 +1,16 @@
> +/* { dg-do run { target { rv32 || rv64 } } } */
> +/* { dg-additional-options "-std=c99" } */
> +
> +#include "sat_arith.h"
> +#include "sat_arith_data.h"
> +
> +#define NT               uint32_t
> +#define WT               uint64_t
> +#define NAME             usmul
> +#define DATA             TEST_BINARY_DATA_WRAP(NT, NAME)
> +#define T                TEST_BINARY_STRUCT_DECL_WRAP(NT, NAME)
> +#define RUN_BINARY(x, y) RUN_SAT_U_MUL_FMT_14_WRAP(NT, WT, x, y)
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +#include "scalar_sat_binary_run_xxx.h"
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u64-from-u128.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u64-from-u128.c
> new file mode 100644
> index 00000000000..30d0bb49f64
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u64-from-u128.c
> @@ -0,0 +1,16 @@
> +/* { dg-do run { target { rv64 } } } */
> +/* { dg-additional-options "-std=c99" } */
> +
> +#include "sat_arith.h"
> +#include "sat_arith_data.h"
> +
> +#define NT               uint64_t
> +#define WT               uint128_t
> +#define NAME             usmul
> +#define DATA             TEST_BINARY_DATA_WRAP(NT, NAME)
> +#define T                TEST_BINARY_STRUCT_DECL_WRAP(NT, NAME)
> +#define RUN_BINARY(x, y) RUN_SAT_U_MUL_FMT_14_WRAP(NT, WT, x, y)
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +#include "scalar_sat_binary_run_xxx.h"
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u128.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u128.c
> new file mode 100644
> index 00000000000..96a8e31722e
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u128.c
> @@ -0,0 +1,16 @@
> +/* { dg-do run { target { rv64 } } } */
> +/* { dg-additional-options "-std=c99" } */
> +
> +#include "sat_arith.h"
> +#include "sat_arith_data.h"
> +
> +#define NT               uint8_t
> +#define WT               uint128_t
> +#define NAME             usmul
> +#define DATA             TEST_BINARY_DATA_WRAP(NT, NAME)
> +#define T                TEST_BINARY_STRUCT_DECL_WRAP(NT, NAME)
> +#define RUN_BINARY(x, y) RUN_SAT_U_MUL_FMT_14_WRAP(NT, WT, x, y)
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +#include "scalar_sat_binary_run_xxx.h"
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u16.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u16.c
> new file mode 100644
> index 00000000000..56ac2939a5a
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u16.c
> @@ -0,0 +1,16 @@
> +/* { dg-do run { target { rv32 || rv64 } } } */
> +/* { dg-additional-options "-std=c99" } */
> +
> +#include "sat_arith.h"
> +#include "sat_arith_data.h"
> +
> +#define NT               uint8_t
> +#define WT               uint16_t
> +#define NAME             usmul
> +#define DATA             TEST_BINARY_DATA_WRAP(NT, NAME)
> +#define T                TEST_BINARY_STRUCT_DECL_WRAP(NT, NAME)
> +#define RUN_BINARY(x, y) RUN_SAT_U_MUL_FMT_14_WRAP(NT, WT, x, y)
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +#include "scalar_sat_binary_run_xxx.h"
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u32.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u32.c
> new file mode 100644
> index 00000000000..0fe4412f055
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u32.c
> @@ -0,0 +1,16 @@
> +/* { dg-do run { target { rv32 || rv64 } } } */
> +/* { dg-additional-options "-std=c99" } */
> +
> +#include "sat_arith.h"
> +#include "sat_arith_data.h"
> +
> +#define NT               uint8_t
> +#define WT               uint32_t
> +#define NAME             usmul
> +#define DATA             TEST_BINARY_DATA_WRAP(NT, NAME)
> +#define T                TEST_BINARY_STRUCT_DECL_WRAP(NT, NAME)
> +#define RUN_BINARY(x, y) RUN_SAT_U_MUL_FMT_14_WRAP(NT, WT, x, y)
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +#include "scalar_sat_binary_run_xxx.h"
> diff --git 
> a/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u64.c 
> b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u64.c
> new file mode 100644
> index 00000000000..acf8b1c51ba
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-run-15-u8-from-u64.c
> @@ -0,0 +1,16 @@
> +/* { dg-do run { target { rv32 || rv64 } } } */
> +/* { dg-additional-options "-std=c99" } */
> +
> +#include "sat_arith.h"
> +#include "sat_arith_data.h"
> +
> +#define NT               uint8_t
> +#define WT               uint64_t
> +#define NAME             usmul
> +#define DATA             TEST_BINARY_DATA_WRAP(NT, NAME)
> +#define T                TEST_BINARY_STRUCT_DECL_WRAP(NT, NAME)
> +#define RUN_BINARY(x, y) RUN_SAT_U_MUL_FMT_14_WRAP(NT, WT, x, y)
> +
> +DEF_SAT_U_MUL_FMT_14_WRAP(NT, WT)
> +
> +#include "scalar_sat_binary_run_xxx.h"
> --
> 2.43.0
>

Reply via email to