From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7857) id B1816385B526; Thu, 16 Feb 2023 14:59:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1816385B526 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676559541; bh=XmjSIICS1B4lFH7b81lP4fURU3m8+7gDDJmErNIv9nk=; h=From:To:Subject:Date:From; b=uRW+ZoLADUhAHmb0EAgGZgBHct3lpwY7OGwBrnxmbcwMVmchromqGdxy4PWxIDCuJ wZ4Vda2X5AQAYsyJTyE3ZQyhKOyf5Ct/SlJ11Z+y7JMBimVfcSvp+D2UVuNxw0Qp07 kz+YF9i91PvUKIVqgLDcWwr2HYJRcQjKXDIn0ycc= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Matthias Kretz To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-6092] libstdc++: Use a PCH to speed up check-simd X-Act-Checkin: gcc X-Git-Author: Matthias Kretz X-Git-Refname: refs/heads/master X-Git-Oldrev: b0f4b166ada3b92da5f2917ac3f4397e99d1b58f X-Git-Newrev: 073df3e73f3080aee836c538b058180405f9dcd2 Message-Id: <20230216145901.B1816385B526@sourceware.org> Date: Thu, 16 Feb 2023 14:59:01 +0000 (GMT) List-Id: https://gcc.gnu.org/g:073df3e73f3080aee836c538b058180405f9dcd2 commit r13-6092-g073df3e73f3080aee836c538b058180405f9dcd2 Author: Matthias Kretz Date: Thu Feb 2 12:26:35 2023 +0100 libstdc++: Use a PCH to speed up check-simd Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * testsuite/experimental/simd/generate_makefile.sh: Generate and pre-compile pch.h, which includes all headers that do not depend on command-line macros. * testsuite/experimental/simd/tests/bits/main.h: New file. (iterate_abis, main): Moved from verify.h. * testsuite/experimental/simd/tests/bits/verify.h (iterate_abis, main): Moved to main.h. * testsuite/experimental/simd/tests/bits/conversions.h: Add include guard. (genHalfBits): Simplify. * testsuite/experimental/simd/tests/bits/make_vec.h: Add include guard. (make_alternating_mask): Moved from mask_loadstore. * testsuite/experimental/simd/tests/bits/mathreference.h: Add include guard. * testsuite/experimental/simd/tests/bits/test_values.h: Ditto. * testsuite/experimental/simd/tests/mask_loadstore.cc (make_mask, make_alternating_mask): Removed. * testsuite/experimental/simd/tests/mask_reductions.cc: Ditto. * testsuite/experimental/simd/tests/operators.cc (genHalfBits): Removed. * testsuite/experimental/simd/tests/abs.cc: Only include bits/main.h. Ditto. * testsuite/experimental/simd/tests/algorithms.cc: Ditto. * testsuite/experimental/simd/tests/broadcast.cc: Ditto. * testsuite/experimental/simd/tests/casts.cc: Ditto. * testsuite/experimental/simd/tests/fpclassify.cc: Ditto. * testsuite/experimental/simd/tests/frexp.cc: Ditto. * testsuite/experimental/simd/tests/generator.cc: Ditto. * testsuite/experimental/simd/tests/hypot3_fma.cc: Ditto. * testsuite/experimental/simd/tests/integer_operators.cc: Ditto. * testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc: * testsuite/experimental/simd/tests/loadstore.cc: Ditto. * testsuite/experimental/simd/tests/logarithm.cc: Ditto. * testsuite/experimental/simd/tests/mask_broadcast.cc: Ditto. * testsuite/experimental/simd/tests/mask_conversions.cc: Ditto. * testsuite/experimental/simd/tests/mask_implicit_cvt.cc: Ditto. * testsuite/experimental/simd/tests/mask_operator_cvt.cc: Ditto. * testsuite/experimental/simd/tests/mask_operators.cc: Ditto. * testsuite/experimental/simd/tests/math_1arg.cc: Ditto. * testsuite/experimental/simd/tests/math_2arg.cc: Ditto. * testsuite/experimental/simd/tests/operator_cvt.cc: Ditto. * testsuite/experimental/simd/tests/reductions.cc: Ditto. * testsuite/experimental/simd/tests/remqo.cc: Ditto. * testsuite/experimental/simd/tests/simd.cc: Ditto. * testsuite/experimental/simd/tests/sincos.cc: Ditto. * testsuite/experimental/simd/tests/split_concat.cc: Ditto. * testsuite/experimental/simd/tests/splits.cc: Ditto. * testsuite/experimental/simd/tests/trigonometric.cc: Ditto. * testsuite/experimental/simd/tests/trunc_ceil_floor.cc: Ditto. * testsuite/experimental/simd/tests/where.cc: Ditto. Diff: --- .../experimental/simd/generate_makefile.sh | 24 +++++- .../testsuite/experimental/simd/tests/abs.cc | 4 +- .../experimental/simd/tests/algorithms.cc | 3 +- .../experimental/simd/tests/bits/conversions.h | 25 +++---- .../testsuite/experimental/simd/tests/bits/main.h | 87 ++++++++++++++++++++++ .../experimental/simd/tests/bits/make_vec.h | 10 +++ .../experimental/simd/tests/bits/mathreference.h | 3 + .../experimental/simd/tests/bits/test_values.h | 6 ++ .../experimental/simd/tests/bits/verify.h | 64 ---------------- .../testsuite/experimental/simd/tests/broadcast.cc | 3 +- .../testsuite/experimental/simd/tests/casts.cc | 4 +- .../experimental/simd/tests/fpclassify.cc | 4 +- .../testsuite/experimental/simd/tests/frexp.cc | 4 +- .../testsuite/experimental/simd/tests/generator.cc | 3 +- .../experimental/simd/tests/hypot3_fma.cc | 4 +- .../experimental/simd/tests/integer_operators.cc | 5 +- .../simd/tests/ldexp_scalbn_scalbln_modf.cc | 4 +- .../testsuite/experimental/simd/tests/loadstore.cc | 4 +- .../testsuite/experimental/simd/tests/logarithm.cc | 5 +- .../experimental/simd/tests/mask_broadcast.cc | 3 +- .../experimental/simd/tests/mask_conversions.cc | 2 +- .../experimental/simd/tests/mask_implicit_cvt.cc | 3 +- .../experimental/simd/tests/mask_loadstore.cc | 29 +------- .../experimental/simd/tests/mask_operator_cvt.cc | 3 +- .../experimental/simd/tests/mask_operators.cc | 3 +- .../experimental/simd/tests/mask_reductions.cc | 30 +------- .../testsuite/experimental/simd/tests/math_1arg.cc | 3 +- .../testsuite/experimental/simd/tests/math_2arg.cc | 4 +- .../experimental/simd/tests/operator_cvt.cc | 3 +- .../testsuite/experimental/simd/tests/operators.cc | 14 +--- .../experimental/simd/tests/reductions.cc | 4 +- .../testsuite/experimental/simd/tests/remqo.cc | 4 +- .../testsuite/experimental/simd/tests/simd.cc | 2 +- .../testsuite/experimental/simd/tests/sincos.cc | 6 +- .../experimental/simd/tests/split_concat.cc | 4 +- .../testsuite/experimental/simd/tests/splits.cc | 2 +- .../experimental/simd/tests/trigonometric.cc | 4 +- .../experimental/simd/tests/trunc_ceil_floor.cc | 3 +- .../testsuite/experimental/simd/tests/where.cc | 4 +- 39 files changed, 170 insertions(+), 226 deletions(-) diff --git a/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh b/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh index ce5162a6ceb..9fb33e4cbd2 100755 --- a/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh +++ b/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh @@ -75,6 +75,7 @@ while [ $# -gt 0 ]; do done mkdir -p "$dst" +pch="$dst/pch.h" dst="$dst/Makefile" if [ -f "$dst" ]; then echo "Error: $dst already exists. Aborting." 1>&2 @@ -84,9 +85,23 @@ fi CXX="$1" shift +cat >> "$pch" <> "$dst" -echo CXXFLAGS = "$@" "\$(test_flags)" >> "$dst" +echo CXXFLAGS = "$@" -include pch.h "\$(test_flags)" >> "$dst" [ -n "$sim" ] && echo "export GCC_TEST_SIMULATOR = $sim" >> "$dst" cat >> "$dst" <. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" #include // abs & sqrt #include // integer abs -#include "bits/test_values.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/algorithms.cc b/libstdc++-v3/testsuite/experimental/simd/tests/algorithms.cc index dac0981622e..6242eb89337 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/algorithms.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/algorithms.cc @@ -16,8 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/conversions.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/conversions.h index 2b12de6b4b2..7bd70cea53b 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/bits/conversions.h +++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/conversions.h @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // . +#ifndef SIMD_TESTS_BITS_CONVERSIONS_H_ +#define SIMD_TESTS_BITS_CONVERSIONS_H_ #include // is_conversion_undefined @@ -86,22 +88,12 @@ template template constexpr T genHalfBits() - { return std::__finite_max_v >> (std::__digits_v / 2); } - -template <> - constexpr long double - genHalfBits() - { return 0; } - -template <> - constexpr double - genHalfBits() - { return 0; } - -template <> - constexpr float - genHalfBits() - { return 0; } + { + if constexpr (std::is_floating_point_v) + return 0; + else + return std::__finite_max_v >> (std::__digits_v / 2); + } template constexpr U @@ -182,3 +174,4 @@ template operator[](size_t i) const { return cvt_input_data[i]; } }; +#endif // SIMD_TESTS_BITS_CONVERSIONS_H_ diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/main.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/main.h new file mode 100644 index 00000000000..270b433aa17 --- /dev/null +++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/main.h @@ -0,0 +1,87 @@ +// Copyright (C) 2020-2023 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#ifndef TESTS_BITS_MAIN_H_ +#define TESTS_BITS_MAIN_H_ + +#include "verify.h" + +template + void + iterate_abis() + { + using namespace std::experimental::parallelism_v2; +#ifndef EXTENDEDTESTS + invoke_test>(int()); + invoke_test>>(int()); + invoke_test>>(int()); +#elif EXTENDEDTESTS == 0 + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); +#elif EXTENDEDTESTS == 1 + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); +#elif EXTENDEDTESTS == 2 + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); +#elif EXTENDEDTESTS == 3 + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); +#elif EXTENDEDTESTS == 4 + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); +#elif EXTENDEDTESTS == 5 + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); +#elif EXTENDEDTESTS == 6 + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); +#elif EXTENDEDTESTS == 7 + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); +#elif EXTENDEDTESTS == 8 + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); + invoke_test>>(int()); +#endif + } + +int main() +{ + iterate_abis<_GLIBCXX_SIMD_TESTTYPE>(); + return 0; +} + +#endif // TESTS_BITS_MAIN_H_ diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/make_vec.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/make_vec.h index 82e63d18ad1..3744965f439 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/bits/make_vec.h +++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/make_vec.h @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // . +#ifndef SIMD_TESTS_BITS_MAKE_VEC_H_ +#define SIMD_TESTS_BITS_MAKE_VEC_H_ #include template @@ -36,6 +38,13 @@ template } } +template + M + make_alternating_mask() + { + return make_mask({false, true}); + } + template inline V make_vec(const std::initializer_list &init, @@ -57,3 +66,4 @@ template base += inc; } } +#endif // SIMD_TESTS_BITS_MAKE_VEC_H_ diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/mathreference.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/mathreference.h index 1553aa7bb51..87c4df7b176 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/bits/mathreference.h +++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/mathreference.h @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // . +#ifndef SIMD_TESTS_BITS_MATHREFERENCE_H_ +#define SIMD_TESTS_BITS_MATHREFERENCE_H_ #include #include #include @@ -158,3 +160,4 @@ template > } return data; } +#endif // SIMD_TESTS_BITS_MATHREFERENCE_H_ diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/test_values.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/test_values.h index ccbe19de4b0..c3bd082f709 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/bits/test_values.h +++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/test_values.h @@ -15,6 +15,11 @@ // with this library; see the file COPYING3. If not see // . +#ifndef SIMD_TESTS_BITS_TEST_VALUES_H_ +#define SIMD_TESTS_BITS_TEST_VALUES_H_ + +#include "verify.h" + #include #include #include @@ -381,3 +386,4 @@ template #endif #define MAKE_TESTER(name_) MAKE_TESTER_2(name_, std::name_) +#endif // SIMD_TESTS_BITS_TEST_VALUES_H_ diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h index e60ff93d2e6..2ab3ad3fa8c 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h +++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h @@ -286,68 +286,4 @@ template __builtin_fprintf(stderr, "PASS: %s\n", __PRETTY_FUNCTION__); } -template - void - iterate_abis() - { - using namespace std::experimental::parallelism_v2; -#ifndef EXTENDEDTESTS - invoke_test>(int()); - invoke_test>>(int()); - invoke_test>>(int()); -#elif EXTENDEDTESTS == 0 - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); -#elif EXTENDEDTESTS == 1 - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); -#elif EXTENDEDTESTS == 2 - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); -#elif EXTENDEDTESTS == 3 - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); -#elif EXTENDEDTESTS == 4 - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); -#elif EXTENDEDTESTS == 5 - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); -#elif EXTENDEDTESTS == 6 - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); -#elif EXTENDEDTESTS == 7 - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); -#elif EXTENDEDTESTS == 8 - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); - invoke_test>>(int()); -#endif - } - -int main() -{ - iterate_abis<_GLIBCXX_SIMD_TESTTYPE>(); - return 0; -} - #endif // TESTS_BITS_VERIFY_H_ diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/broadcast.cc b/libstdc++-v3/testsuite/experimental/simd/tests/broadcast.cc index 7e06c6632d8..6265e31b079 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/broadcast.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/broadcast.cc @@ -16,8 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" enum unscoped_enum { foo }; diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/casts.cc b/libstdc++-v3/testsuite/experimental/simd/tests/casts.cc index 022a583c331..8e8d828c756 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/casts.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/casts.cc @@ -16,9 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/conversions.h" +#include "bits/main.h" using std::experimental::simd_cast; using std::experimental::static_simd_cast; diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/fpclassify.cc b/libstdc++-v3/testsuite/experimental/simd/tests/fpclassify.cc index 453f17f256e..00c608f9530 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/fpclassify.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/fpclassify.cc @@ -17,9 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" #include template diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/frexp.cc b/libstdc++-v3/testsuite/experimental/simd/tests/frexp.cc index 5e04f4f2927..f6a47cedd13 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/frexp.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/frexp.cc @@ -17,9 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/generator.cc b/libstdc++-v3/testsuite/experimental/simd/tests/generator.cc index b582c04067b..001625cfd26 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/generator.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/generator.cc @@ -16,8 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" template struct call_generator diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc b/libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc index b5e3749ebc4..6f0d75ac007 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc @@ -18,9 +18,7 @@ // only: float|double|ldouble * * * // skip: ldouble * powerpc64* * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" // 3-arg std::hypot needs to be fixed, this is a better reference: template diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/integer_operators.cc b/libstdc++-v3/testsuite/experimental/simd/tests/integer_operators.cc index e3718ce40a3..7a2bc085e49 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/integer_operators.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/integer_operators.cc @@ -16,9 +16,8 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/make_vec.h" -#include "bits/metahelpers.h" +// timeout-factor: 2 +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc b/libstdc++-v3/testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc index 1943c360077..0fb1338fc04 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc @@ -17,9 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc b/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc index f354eff9139..f7933007cc7 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc @@ -17,9 +17,7 @@ // expensive: * [1-9] * * // timeout-factor: 2 -#include "bits/verify.h" -#include "bits/make_vec.h" -#include "bits/conversions.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/logarithm.cc b/libstdc++-v3/testsuite/experimental/simd/tests/logarithm.cc index d7f4297c094..31ad1499e00 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/logarithm.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/logarithm.cc @@ -17,10 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/mathreference.h" -#include "bits/test_values.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_broadcast.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_broadcast.cc index 0ed56e2d2ee..2f601368775 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_broadcast.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_broadcast.cc @@ -16,8 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_conversions.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_conversions.cc index 13afd69348e..8cdd7b74b44 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_conversions.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_conversions.cc @@ -16,7 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" +#include "bits/main.h" namespace stdx = std::experimental; diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_implicit_cvt.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_implicit_cvt.cc index 0003db3114d..a7b6c92e2a0 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_implicit_cvt.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_implicit_cvt.cc @@ -16,8 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" template constexpr bool assign_should_work diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_loadstore.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_loadstore.cc index b9f3cef021d..d8e58a0032b 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_loadstore.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_loadstore.cc @@ -16,34 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" - -// simd_mask generator functions -template - M - make_mask(const std::initializer_list& init) - { - std::size_t i = 0; - M r = {}; - for (;;) - { - for (bool x : init) - { - r[i] = x; - if (++i == M::size()) - { - return r; - } - } - } - } - -template - M - make_alternating_mask() - { - return make_mask({false, true}); - } +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_operator_cvt.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_operator_cvt.cc index b91832a431c..1c7ccab5836 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_operator_cvt.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_operator_cvt.cc @@ -16,8 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" using schar = signed char; using uchar = unsigned char; diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_operators.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_operators.cc index b42520202a0..70b82a514bb 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_operators.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_operators.cc @@ -16,8 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_reductions.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_reductions.cc index b863f2d5c0c..1e9ffb7aca5 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_reductions.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_reductions.cc @@ -16,35 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" - -// simd_mask generator functions -template - M - make_mask(const std::initializer_list& init) - { - std::size_t i = 0; - M r = {}; - for (;;) - { - for (bool x : init) - { - r[i] = x; - if (++i == M::size()) - { - return r; - } - } - } - } - -template - M - make_alternating_mask() - { - return make_mask({false, true}); - } +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/math_1arg.cc b/libstdc++-v3/testsuite/experimental/simd/tests/math_1arg.cc index db401c124f2..50a740dec81 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/math_1arg.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/math_1arg.cc @@ -17,8 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/test_values.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/math_2arg.cc b/libstdc++-v3/testsuite/experimental/simd/tests/math_2arg.cc index 08b36c60331..1abf18128fb 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/math_2arg.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/math_2arg.cc @@ -17,9 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc b/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc index 921917e4d88..c1acfdf10e0 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc @@ -16,8 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" // type with sizeof(char) but different signedness using xchar = std::conditional_t, schar, uchar>; diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc b/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc index 6d482201fab..c4d91fa5d2b 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc @@ -16,19 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/make_vec.h" -#include "bits/test_values.h" - -template - constexpr T - genHalfBits() - { - if constexpr (std::is_floating_point_v) - return 0; - else - return std::__finite_max_v >> (std::__digits_v / 2); - } +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc b/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc index 62072e72155..0c4c79feb20 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc @@ -16,9 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" #include template diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/remqo.cc b/libstdc++-v3/testsuite/experimental/simd/tests/remqo.cc index 8c76f66b842..bc9f94d8265 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/remqo.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/remqo.cc @@ -17,9 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/simd.cc b/libstdc++-v3/testsuite/experimental/simd/tests/simd.cc index 14fc71ac1a4..b729c97bec9 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/simd.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/simd.cc @@ -16,7 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/sincos.cc b/libstdc++-v3/testsuite/experimental/simd/tests/sincos.cc index 16637f50cfc..2e81a8e5585 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/sincos.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/sincos.cc @@ -18,11 +18,7 @@ // only: float|double|ldouble * * * // xfail: run * * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/mathreference.h" -#include "bits/simd_view.h" -#include "bits/test_values.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/split_concat.cc b/libstdc++-v3/testsuite/experimental/simd/tests/split_concat.cc index 85ca7ae8199..102229b70f1 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/split_concat.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/split_concat.cc @@ -16,9 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/conversions.h" +#include "bits/main.h" using std::experimental::simd_cast; diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/splits.cc b/libstdc++-v3/testsuite/experimental/simd/tests/splits.cc index 94c82ecc3c3..f87bce8a7dc 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/splits.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/splits.cc @@ -16,7 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/trigonometric.cc b/libstdc++-v3/testsuite/experimental/simd/tests/trigonometric.cc index 8e16ce4a1cf..a678ff48fee 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/trigonometric.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/trigonometric.cc @@ -17,9 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/trunc_ceil_floor.cc b/libstdc++-v3/testsuite/experimental/simd/tests/trunc_ceil_floor.cc index 51575df48cb..ecbc1481600 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/trunc_ceil_floor.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/trunc_ceil_floor.cc @@ -17,8 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/test_values.h" -#include "bits/verify.h" +#include "bits/main.h" template void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/where.cc b/libstdc++-v3/testsuite/experimental/simd/tests/where.cc index 79cc949c64e..b6f6d333191 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/where.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/where.cc @@ -16,9 +16,7 @@ // . // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/make_vec.h" -#include "bits/metahelpers.h" +#include "bits/main.h" template struct Convertible