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

Matthias Kretz MatthiasKretz@gmx.net
Tue Aug 18 08:03:54 GMT 2026


OK for trunk and backports?

---------- 8< -----------

From: Matthias Kretz <m.kretz@gsi.de>

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 <m.kretz@gsi.de>
---
 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-*-* } }
 // { 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
──────────────────────────────────────────────────────────────────────────



More information about the Libstdc++ mailing list