On Tue, Jul 29, 2025 at 7:40 AM Alfie Richards <alfie.richa...@arm.com> wrote:
>
> Hi All,
>
> Quick fixup for the gating (s/&&/|/) for an error I made.
>
> Only needed for trunk as the intrinsics were only added recently.
>
> Bootstrapped and reg tested on Aatch64.

Ok. Though this seems obvious since AARCH64_FL_SME2 and
AARCH64_FL_FAMINMAX are both constants.

Thanks,
Andrew


>
> Thanks,
> Alfie
>
> -- >8 --
>
> Fixes the feature gating for the SME2+FAMINMAX intrinsics.
>
>         PR target/121300
>
> gcc/ChangeLog:
>
>         * config/aarch64/aarch64-sve-builtins-sme.def (svamin/svamax): Fix
>         arch gating.
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/aarch64/pr121300.c: New test.
> ---
>  gcc/config/aarch64/aarch64-sve-builtins-sme.def | 3 ++-
>  gcc/testsuite/gcc.target/aarch64/pr121300.c     | 9 +++++++++
>  2 files changed, 11 insertions(+), 1 deletion(-)
>  create mode 100644 gcc/testsuite/gcc.target/aarch64/pr121300.c
>
> diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sme.def 
> b/gcc/config/aarch64/aarch64-sve-builtins-sme.def
> index 8e6aadce7de..117b70ede74 100644
> --- a/gcc/config/aarch64/aarch64-sve-builtins-sme.def
> +++ b/gcc/config/aarch64/aarch64-sve-builtins-sme.def
> @@ -92,7 +92,8 @@ DEF_SME_FUNCTION (svstr_zt, str_zt, none, none)
>  DEF_SME_FUNCTION (svzero_zt, inherent_zt, none, none)
>  #undef REQUIRED_EXTENSIONS
>
> -#define REQUIRED_EXTENSIONS streaming_only (AARCH64_FL_SME2 && 
> AARCH64_FL_FAMINMAX)
> +#define REQUIRED_EXTENSIONS streaming_only (AARCH64_FL_SME2 \
> +                                           | AARCH64_FL_FAMINMAX)
>  DEF_SME_FUNCTION_GS (svamin, binary_opt_single_n, all_float, x24, none)
>  DEF_SME_FUNCTION_GS (svamax, binary_opt_single_n, all_float, x24, none)
>  #undef REQUIRED_EXTENSIONS
> diff --git a/gcc/testsuite/gcc.target/aarch64/pr121300.c 
> b/gcc/testsuite/gcc.target/aarch64/pr121300.c
> new file mode 100644
> index 00000000000..5f2cd9aaa34
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/aarch64/pr121300.c
> @@ -0,0 +1,9 @@
> +/* { dg-do compile } */
> +/* { dg-options "-S -O3 -march=armv9-a+sme2" } */
> +
> +#include <arm_sme.h>
> +
> +svfloat16x2_t test (svfloat16x2_t zd, svfloat16x2_t zm) __arm_streaming
> +{
> +    return svamin_f16_x2 (zd, zm); // { dg-error "ACLE function 
> .svamin_f16_x2. requires ISA extension .faminmax." }
> +}
> --
> 2.34.1
>

Reply via email to