Hi Ezra,

On 28/10/2026 22:51, Ezra Sitorus wrote:
> From: Ezra Sitorus <[email protected]>
> 
> Give existing non-widening SVE FMMLA patterns both result and input modes, and
> rename the widening patterns aarch64_sve2* to aarch64_sve*.
> 
> This allows svmmla_impl::expand to select all floating-point FMMLA patterns
> through one interface and prepares for future additional non-widening forms -
> see here: https://inbox.sourceware.org/gcc-patches/[email protected]/

Thanks for doing this.  The patch is OK.

Alex

> 
> gcc/ChangeLog:
>       * config/aarch64/aarch64-sve-builtins-base.cc (svmmla_impl::expand):
>         Simplify by using the new pattern names.
>       * config/aarch64/aarch64-sve.md (@aarch64_sve_<sve_fp_op><mode><mode>):
>         Rename from @aarch64_sve_<sve_fp_op><mode>.
>       * config/aarch64/aarch64-sve2.md
>         (@aarch64_sve_<sve_fp_op><SVE_FULL_HSF_FMMLA:mode><VNx16QI_ONLY:mode>)
>         (@aarch64_sve_<sve_fp_op><VNx4SF_ONLY:mode><VNx8HF_ONLY:mode>): 
> Replace
>         "sve2" with "sve".
> ---
>  gcc/config/aarch64/aarch64-sve-builtins-base.cc | 10 ++++------
>  gcc/config/aarch64/aarch64-sve.md               |  2 +-
>  gcc/config/aarch64/aarch64-sve2.md              |  4 ++--
>  3 files changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc 
> b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
> index ebbd58a9b391..d6d53b3d41f5 100644
> --- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
> +++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
> @@ -2328,12 +2328,10 @@ public:
>        }
>      else
>        {
> -     if (e.type_suffix_ids[1] == NUM_TYPE_SUFFIXES)
> -       icode = code_for_aarch64_sve (UNSPEC_FMMLA, e.vector_mode (0));
> -     else
> -       icode = code_for_aarch64_sve2 (UNSPEC_FMMLA,
> -                                     e.vector_mode (0),
> -                                     e.vector_mode (1));
> +     machine_mode omode = e.type_suffix_ids[1] == NUM_TYPE_SUFFIXES
> +                              ? e.vector_mode (0)
> +                              : e.vector_mode (1);
> +     icode = code_for_aarch64_sve (UNSPEC_FMMLA, e.vector_mode (0), omode);
>        }
>      return e.use_exact_insn (icode);
>    }
> diff --git a/gcc/config/aarch64/aarch64-sve.md 
> b/gcc/config/aarch64/aarch64-sve.md
> index da5e5ce49f26..c25db370754a 100644
> --- a/gcc/config/aarch64/aarch64-sve.md
> +++ b/gcc/config/aarch64/aarch64-sve.md
> @@ -8555,7 +8555,7 @@
>  ;; -------------------------------------------------------------------------
>  
>  ;; The mode iterator enforces the target requirements.
> -(define_insn "@aarch64_sve_<sve_fp_op><mode>"
> +(define_insn "@aarch64_sve_<sve_fp_op><mode><mode>"
>    [(set (match_operand:SVE_MATMULF 0 "register_operand")
>       (unspec:SVE_MATMULF
>         [(match_operand:SVE_MATMULF 2 "register_operand")
> diff --git a/gcc/config/aarch64/aarch64-sve2.md 
> b/gcc/config/aarch64/aarch64-sve2.md
> index 7d8504db3048..ab09875e329e 100644
> --- a/gcc/config/aarch64/aarch64-sve2.md
> +++ b/gcc/config/aarch64/aarch64-sve2.md
> @@ -5062,7 +5062,7 @@
>  ;; -------------------------------------------------------------------------
>  
>  
> -(define_insn 
> "@aarch64_sve2_<sve_fp_op><SVE_FULL_HSF_FMMLA:mode><VNx16QI_ONLY:mode>"
> +(define_insn 
> "@aarch64_sve_<sve_fp_op><SVE_FULL_HSF_FMMLA:mode><VNx16QI_ONLY:mode>"
>    [(set (match_operand:SVE_FULL_HSF_FMMLA 0 "register_operand")
>       (unspec:SVE_FULL_HSF_FMMLA
>         [(match_operand:VNx16QI_ONLY 2 "register_operand")
> @@ -5078,7 +5078,7 @@
>    [(set_attr "sve_type" "sve_fp_mul")]
>  )
>  
> -(define_insn "@aarch64_sve2_<sve_fp_op><VNx4SF_ONLY:mode><VNx8HF_ONLY:mode>"
> +(define_insn "@aarch64_sve_<sve_fp_op><VNx4SF_ONLY:mode><VNx8HF_ONLY:mode>"
>    [(set (match_operand:VNx4SF_ONLY 0 "register_operand")
>       (unspec:VNx4SF_ONLY
>        [(match_operand:VNx8HF_ONLY 2 "register_operand")
> -- 
> 2.53.0
> 

Reply via email to