mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
libstdc++: Require SSE2 for std::simd [PR124722]
Without SSE2 double precision uses excess precision, leading to test failures. For now, std::simd remains a tech preview that simply is disabled without SSE2. libstdc++-v3/ChangeLog: PR libstdc++/124722 * include/bits/version.def: Check for __SSE2__ rather than x86. * include/bits/version.h: Regenerate. * testsuite/std/simd/arithmetic.cc: Build with -msse2. * testsuite/std/simd/arithmetic_expensive.cc: Likewise. * testsuite/std/simd/creation.cc: Likewise. * testsuite/std/simd/creation_expensive.cc: Likewise. * testsuite/std/simd/loads.cc: Likewise. * testsuite/std/simd/loads_expensive.cc: Likewise. * testsuite/std/simd/mask.cc: Likewise. * testsuite/std/simd/mask2.cc: Likewise. * testsuite/std/simd/mask2_expensive.cc: Likewise. * testsuite/std/simd/mask_expensive.cc: Likewise. * testsuite/std/simd/reductions.cc: Likewise. * testsuite/std/simd/reductions_expensive.cc: Likewise. * testsuite/std/simd/shift_left.cc: Likewise. * testsuite/std/simd/shift_left_expensive.cc: Likewise. * testsuite/std/simd/shift_right.cc: Likewise. * testsuite/std/simd/shift_right_expensive.cc: Likewise. * testsuite/std/simd/simd_alg.cc: Likewise. * testsuite/std/simd/simd_alg_expensive.cc: Likewise. * testsuite/std/simd/sse_intrin.cc: Likewise. * testsuite/std/simd/stores.cc: Likewise. * testsuite/std/simd/stores_expensive.cc: Likewise. * testsuite/std/simd/traits_common.cc: Likewise. * testsuite/std/simd/traits_math.cc: Likewise. Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
This commit is contained in:
@@ -2359,7 +2359,7 @@ ftms = {
|
||||
cxxmin = 26;
|
||||
extra_cond = "__cpp_structured_bindings >= 202411L "
|
||||
"&& __cpp_expansion_statements >= 202411L "
|
||||
"&& (__x86_64__ || __i386__)"; // TODO: lift initial restriction to x86
|
||||
"&& __SSE2__"; // TODO: add more targets
|
||||
hosted = yes;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2627,7 +2627,7 @@
|
||||
#undef __glibcxx_want_contracts
|
||||
|
||||
#if !defined(__cpp_lib_simd)
|
||||
# if (__cplusplus > 202302L) && _GLIBCXX_HOSTED && (__cpp_structured_bindings >= 202411L && __cpp_expansion_statements >= 202411L && (__x86_64__ || __i386__))
|
||||
# if (__cplusplus > 202302L) && _GLIBCXX_HOSTED && (__cpp_structured_bindings >= 202411L && __cpp_expansion_statements >= 202411L && __SSE2__)
|
||||
# define __glibcxx_simd 202506L
|
||||
# if defined(__glibcxx_want_all) || defined(__glibcxx_want_simd)
|
||||
# endif
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
|
||||
#include "test_setup.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
// { dg-timeout-factor 2 }
|
||||
// { dg-require-effective-target run_expensive_tests }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
|
||||
#include "test_setup.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
// { dg-timeout-factor 2 }
|
||||
// { dg-require-effective-target run_expensive_tests }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
|
||||
#include "test_setup.h"
|
||||
#include <numeric>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
// { dg-timeout-factor 2 }
|
||||
// { dg-require-effective-target run_expensive_tests }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
|
||||
#include "test_setup.h"
|
||||
#include <utility>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
|
||||
#include "test_setup.h"
|
||||
#include <utility>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
// { dg-require-effective-target run_expensive_tests }
|
||||
// { dg-timeout-factor 2 }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
// { dg-timeout-factor 2 }
|
||||
// { dg-require-effective-target run_expensive_tests }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
|
||||
#include "test_setup.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
// { dg-timeout-factor 2 }
|
||||
// { dg-require-effective-target run_expensive_tests }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
|
||||
#include "test_setup.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
// { dg-timeout-factor 2 }
|
||||
// { dg-require-effective-target run_expensive_tests }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
|
||||
#include "test_setup.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
// { dg-timeout-factor 2 }
|
||||
// { dg-require-effective-target run_expensive_tests }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
|
||||
#include "test_setup.h"
|
||||
#include <utility>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
// { dg-timeout-factor 2 }
|
||||
// { dg-require-effective-target run_expensive_tests }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
|
||||
#include "test_setup.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
|
||||
#include "test_setup.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do run { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
// { dg-timeout-factor 2 }
|
||||
// { dg-require-effective-target run_expensive_tests }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do compile { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
// { dg-timeout-factor 2 }
|
||||
|
||||
#include <simd>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// { dg-do compile { target c++26 } }
|
||||
// { dg-require-effective-target x86 }
|
||||
// { dg-additional-options "-msse2" }
|
||||
|
||||
#include <simd>
|
||||
#include <stdfloat>
|
||||
|
||||
Reference in New Issue
Block a user