From patchwork Wed Feb 15 20:49:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kretz X-Patchwork-Id: 57724 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp412495wrn; Wed, 15 Feb 2023 12:55:25 -0800 (PST) X-Google-Smtp-Source: AK7set+bg6oAaea8/SoRTlAUSnrXIRcAfvo6ZObRBdqdpo802SSoKrtuJd/bLz6aF4eeLCn3vqIm X-Received: by 2002:a05:6402:520d:b0:4ad:23f:90a7 with SMTP id s13-20020a056402520d00b004ad023f90a7mr691722edd.13.1676494525166; Wed, 15 Feb 2023 12:55:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676494525; cv=none; d=google.com; s=arc-20160816; b=0L+BGGiuIhR5QqhpUD+4U82e8UbYIR2tWVj4wSb8hM23jEnzw64tlLyJwLOl7eHWn4 xaOIJBQO4pGspzBz1NfNwbfdCwPOPvBINsury76bBeLA/s9Mg7QRo2Ip84qZXJKGbT8V vKAtKuZZWx+hUg6ld+h6N9Jf7VagYXdkfaxzOCCqKXbrjj8E7P+q4asWB0oCZ7orqInv 0pLJ+g4d5CoTl4hc3dOtyONeFDvcHnZ1r/ALglxHvUs5yKuzlYtjCXVw0kVKYnn07ZW0 c6INfgqsaMulOWIm2QcS2qB0Qt05CPdOUuvBhxgER946eL1kh4qwQ+rba8QVaCk42WdV cqfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :organization:message-id:date:subject:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=yO0RWBBguC9OfzKKQ+R4DfuL1QB7i1AEz3QtG8HG0DU=; b=QziskhG4suDcubpfLeIEvo8Q7McNM8U0od+4+XNG6dkJuIuIHnjNHzUQn4C5XpO03l ytXpYrJLKu9UtzB3nH4arsQFfKztdLec/VooxuTJELSwBHFMv0XdhSPFn1ufDfuwEJRr 7LMbvDHcxYRMYQlI/zaQaw/rEfap2BO9ZKdK5ZibHAlylB86eeAI7wpZrE4QGU65OqX+ UZ/nXh0eEFhCbZObQGpiqM/YOe+fTy/Vc//f3OZ+Hz0pujftd3VY4Tky6dJ352mv3OLV Bt9RcT6zNNfoTZ3utlzSnf5VJUe8NyoRhfQURFlRzRyPaZ7OvTIGBrgoAtZQbCPXbOfH SawA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=w2g5RpDV; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id n22-20020a056402061600b004acbdf2bc05si14334091edv.511.2023.02.15.12.55.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 12:55:25 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=w2g5RpDV; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 23B4D3945C11 for ; Wed, 15 Feb 2023 20:52:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 23B4D3945C11 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676494328; bh=yO0RWBBguC9OfzKKQ+R4DfuL1QB7i1AEz3QtG8HG0DU=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=w2g5RpDV7jw5dWxXGy6Yu9lI+7k5KOATRA1di5Vzlp2NFQOKZ2AjGtjK2j2cfBc1D swKjf7AP/OwCfMap0NJTMzjW4uFpeqYhPl2aT4a40e3YEoDUZa0GxBbunrVhUKKagh 1xBCXiZkQ3IjF6uVIT669yLN2t+MIQqrq9B6Ttok= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from lxmtout2.gsi.de (lxmtout2.gsi.de [140.181.3.112]) by sourceware.org (Postfix) with ESMTPS id EC83F3864812; Wed, 15 Feb 2023 20:50:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC83F3864812 Received: from localhost (localhost [127.0.0.1]) by lxmtout2.gsi.de (Postfix) with ESMTP id 17338202AD5E; Wed, 15 Feb 2023 21:50:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lxmtout2.gsi.de Received: from lxmtout2.gsi.de ([127.0.0.1]) by localhost (lxmtout2.gsi.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4KIe8TTjc7Rh; Wed, 15 Feb 2023 21:49:59 +0100 (CET) Received: from srvEX6.campus.gsi.de (unknown [10.10.4.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lxmtout2.gsi.de (Postfix) with ESMTPS id A2B8F202AD51; Wed, 15 Feb 2023 21:49:59 +0100 (CET) Received: from minbar.localnet (140.181.3.12) by srvEX6.campus.gsi.de (10.10.4.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.21; Wed, 15 Feb 2023 21:49:59 +0100 To: , Subject: [PATCH 4/7] libstdc++: Use a PCH to speed up check-simd Date: Wed, 15 Feb 2023 21:49:58 +0100 Message-ID: <22986674.6Emhk5qWAg@minbar> Organization: GSI Helmholtz Centre for Heavy Ion Research In-Reply-To: <3238840.44csPzL39Z@minbar> References: <3238840.44csPzL39Z@minbar> MIME-Version: 1.0 X-Originating-IP: [140.181.3.12] X-ClientProxiedBy: srvex5.Campus.gsi.de (10.10.4.95) To srvEX6.campus.gsi.de (10.10.4.96) X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Matthias Kretz via Gcc-patches From: Matthias Kretz Reply-To: Matthias Kretz Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757931923302546361?= X-GMAIL-MSGID: =?utf-8?q?1757931923302546361?= 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/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. * 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: Ditto. * 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_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/sincos.cc: Ditto. * testsuite/experimental/simd/tests/split_concat.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. --- .../experimental/simd/generate_makefile.sh | 24 ++++- .../testsuite/experimental/simd/tests/abs.cc | 4 +- .../experimental/simd/tests/algorithms.cc | 3 +- .../simd/tests/bits/conversions.h | 25 ++---- .../experimental/simd/tests/bits/main.h | 87 +++++++++++++++++++ .../experimental/simd/tests/bits/make_vec.h | 10 +++ .../simd/tests/bits/mathreference.h | 3 + .../simd/tests/bits/test_values.h | 6 ++ .../experimental/simd/tests/bits/verify.h | 64 -------------- .../experimental/simd/tests/broadcast.cc | 3 +- .../experimental/simd/tests/casts.cc | 4 +- .../experimental/simd/tests/fpclassify.cc | 4 +- .../experimental/simd/tests/frexp.cc | 4 +- .../experimental/simd/tests/generator.cc | 3 +- .../experimental/simd/tests/hypot3_fma.cc | 4 +- .../simd/tests/integer_operators.cc | 5 +- .../simd/tests/ldexp_scalbn_scalbln_modf.cc | 4 +- .../experimental/simd/tests/loadstore.cc | 4 +- .../experimental/simd/tests/logarithm.cc | 5 +- .../experimental/simd/tests/mask_broadcast.cc | 3 +- .../simd/tests/mask_conversions.cc | 2 +- .../simd/tests/mask_implicit_cvt.cc | 3 +- .../experimental/simd/tests/mask_loadstore.cc | 29 +------ .../simd/tests/mask_operator_cvt.cc | 3 +- .../experimental/simd/tests/mask_operators.cc | 3 +- .../simd/tests/mask_reductions.cc | 30 +------ .../experimental/simd/tests/math_1arg.cc | 3 +- .../experimental/simd/tests/math_2arg.cc | 4 +- .../experimental/simd/tests/operator_cvt.cc | 3 +- .../experimental/simd/tests/operators.cc | 14 +-- .../experimental/simd/tests/reductions.cc | 4 +- .../experimental/simd/tests/remqo.cc | 4 +- .../testsuite/experimental/simd/tests/simd.cc | 2 +- .../experimental/simd/tests/sincos.cc | 6 +- .../experimental/simd/tests/split_concat.cc | 4 +- .../experimental/simd/tests/splits.cc | 2 +- .../experimental/simd/tests/trigonometric.cc | 4 +- .../simd/tests/trunc_ceil_floor.cc | 3 +- .../experimental/simd/tests/where.cc | 4 +- 39 files changed, 170 insertions(+), 226 deletions(-) create mode 100644 libstdc++-v3/testsuite/experimental/simd/tests/bits/ main.h -- ────────────────────────────────────────────────────────────────────────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de stdₓ::simd ────────────────────────────────────────────────────────────────────────── 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