Re: [PATCH] libstdc++: Ensure the test compiles without AVX512

Andrea Pinski <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.libstdc++.devel
Message-ID <CALvbMcBtPVGAqs5fj_dq3dDse2p9wnCJjMkuM3TSWN93RAPHkg@mail.gmail.com>
On Tue, Aug 18, 2026 at 1:06 AM Matthias Kretz <[email protected]> wrote:
>
> OK for trunk and backports?
>
> ---------- 8< -----------
>
> From: Matthias Kretz <[email protected]>
>
> This test fails on my setup where I have a dejagnu board that sets
> -march=skylake-avx512. The intent of the test was to verify x86-64-v3
> optimizes as expected, therefore disable AVX512F unconditionally.
>
> libstdc++-v3/ChangeLog:
>
>         * testsuite/experimental/simd/pr114958.cc: Add -mno-avx512f to
>         dg-additional-options.
>
> Signed-off-by: Matthias Kretz <[email protected]>
> ---
>  libstdc++-v3/testsuite/experimental/simd/pr114958.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libstdc++-v3/testsuite/experimental/simd/pr114958.cc b/libstdc++-
> v3/testsuite/experimental/simd/pr114958.cc
> index 94c9e0a2d18..263a2d4bab3 100644
> --- a/libstdc++-v3/testsuite/experimental/simd/pr114958.cc
> +++ b/libstdc++-v3/testsuite/experimental/simd/pr114958.cc
> @@ -1,7 +1,7 @@
>  // { dg-options "-std=c++17" }
>  // { dg-do compile { target x86_64-*-* } }

This should be `{ target { x86_64-*-* i?86-*-* } && ! ia32 }`
Or does this not work for x32? Though I wonder if this works for -m32 too.

>  // { dg-require-effective-target c++17 }
> -// { dg-additional-options "-march=x86-64-v3" { target x86_64-*-* } }
> +// { dg-additional-options "-march=x86-64-v3 -mno-avx512f" { target x86_64-*-
> * } }
>  // { dg-require-cmath "" }
>  // { dg-final { scan-assembler-times "vperm(q|pd)\[\\t \]+\\\$144" 1 } }
>
> --
> ──────────────────────────────────────────────────────────────────────────
>  Dr. Matthias Kretz                           https://mattkretz.github.io
>  GSI Helmholtz Center for Heavy Ion Research               https://gsi.de
>  std::simd
> ──────────────────────────────────────────────────────────────────────────
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.