From patchwork Fri May 26 11:02:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kretz X-Patchwork-Id: 99438 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp381596vqr; Fri, 26 May 2023 04:04:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4gnQQpCT2Sb6wA/2cZJ+wJKh2pSetglouYHiyaez+22uMByBq0HCXUrbVQgP3inwOJfwnR X-Received: by 2002:a50:ec8f:0:b0:50b:cc96:633a with SMTP id e15-20020a50ec8f000000b0050bcc96633amr1036915edr.24.1685099071210; Fri, 26 May 2023 04:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685099071; cv=none; d=google.com; s=arc-20160816; b=G7ktSg30ueJEzxd5sGhmCMjJDx46sUK7q5D7YX0EUgkKNW8D/uJuEEvHl51fOeMxcG 3CAEuJSszqpPZQ5HgM2GjMl5nPL0e78qSa3HA/ubTQR80HdIA3HJ79aJ2wJjDdwPf4ff 6NwBJLOPG70oRrKPWgx5WF8wW1FneQYs7ArMO5o2eA47sLbVSnieck9TMCBwsIlMaSKd /jbK4j02oplODtqzJyfpcI0gRYYKp0ia3oGWSeggTDtzV/mQtGuwt4LYyMXlsWwayxhj xeMMUQfzO21tNAlFGDos1eSIVKiW6GVxvGJC+QzrrVKugEhJz+l+SvN4r4+v0lYLa//L cTOA== 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:organization:message-id:date :subject:to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=5HuZgLFV8TU4RfHFN0i0h5z3E5lW0TXQ0XiHkHC+JWM=; b=J7680HpM3kPuCPPhTXaQzVmvWmDF8QU70a560MmXUi1GEmHsFSRPUVPWjWswiicyZK gE2N7OUhabK7FXEmdDzETHM9ExQbCorCXN/uZetZPuMCbCQ99qurxP2eTM+zvHWBUeuC d0jKsbBi6fvSzUQklwSmwsMZVsvsjyKrOStSoP9BMsaRU69nmVtC9t7JUxKJo4MktA6d 6Z53/x8otFj7VXuXMUDPtX08DGj8gW980/qxQv7eobkWlEyVvMZ+h61lGdKvsRjmvj5i Dlmt5uXBkvkrjg/+83RcS3Bu0+yKuECPZ9TGlucYsGIWe0ly8Ob89fVKMp31KxSsK6N1 MhJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="u/fbDVoO"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id bo9-20020a0564020b2900b00506af2220dfsi1253112edb.74.2023.05.26.04.04.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 04:04:31 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="u/fbDVoO"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 6EA65385694E for ; Fri, 26 May 2023 11:04:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6EA65385694E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685099058; bh=5HuZgLFV8TU4RfHFN0i0h5z3E5lW0TXQ0XiHkHC+JWM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=u/fbDVoOAplOxozl3MTwt/Ds86QyidtPG4ebAJBD/ylFf71DXhyFQNzT3dfCYhrLP cAE/BUcElNPnLDE83n9xJTW/yK7oeayVv4qu74cZbcKZKPT6UVO2dEXTegnUVTR9cH b9m5Hp5o6QNMRk/LOoBdn+i+zk26DOX/kzs8yqGk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from lxmtout1.gsi.de (lxmtout1.gsi.de [140.181.3.111]) by sourceware.org (Postfix) with ESMTPS id E05BA3858D39; Fri, 26 May 2023 11:02:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E05BA3858D39 Received: from localhost (localhost [127.0.0.1]) by lxmtout1.gsi.de (Postfix) with ESMTP id 146AA2051042; Fri, 26 May 2023 13:02:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at lxmtout1.gsi.de Received: from lxmtout1.gsi.de ([127.0.0.1]) by localhost (lxmtout1.gsi.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id U5dmaY3RceHK; Fri, 26 May 2023 13:02:57 +0200 (CEST) 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 lxmtout1.gsi.de (Postfix) with ESMTPS id F05AB2051040; Fri, 26 May 2023 13:02:57 +0200 (CEST) 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.26; Fri, 26 May 2023 13:02:57 +0200 To: , Subject: [PATCH] libstdc++: Fix test assumptions on long and long double Date: Fri, 26 May 2023 13:02:57 +0200 Message-ID: <11378353.CDJkKcVGEf@minbar> Organization: GSI Helmholtz Centre for Heavy Ion Research 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.2 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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?1766954443624397821?= X-GMAIL-MSGID: =?utf-8?q?1766954443624397821?= OK for master and all backports (after 11.4 is done) tested on powerpc64le-linux-gnu (with 64-bit long double) ----------- 8< ------------ Expect that long might not fit into the long double mantissa bits. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * testsuite/experimental/simd/tests/operator_cvt.cc: Make long double <-> (u)long conversion tests conditional on sizeof(long double) and sizeof(long). --- .../experimental/simd/tests/operator_cvt.cc | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) -- ────────────────────────────────────────────────────────────────────────── 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/tests/operator_cvt.cc b/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc index c1acfdf10e0..9b6cb38ff82 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc @@ -219,8 +219,6 @@ namespace simd_abi binary_op_return_type(); binary_op_return_type(); binary_op_return_type(); - binary_op_return_type(); - binary_op_return_type(); binary_op_return_type(); binary_op_return_type(); @@ -230,8 +228,6 @@ namespace simd_abi binary_op_return_type, ushort>(); binary_op_return_type, int>(); binary_op_return_type, uint>(); - binary_op_return_type, long>(); - binary_op_return_type, ulong>(); binary_op_return_type, float>(); binary_op_return_type, double>(); binary_op_return_type, vf64>(); @@ -244,8 +240,6 @@ namespace simd_abi binary_op_return_type, ushort>(); binary_op_return_type, int>(); binary_op_return_type, uint>(); - binary_op_return_type, long>(); - binary_op_return_type, ulong>(); binary_op_return_type, float>(); binary_op_return_type, double>(); @@ -257,6 +251,24 @@ namespace simd_abi VERIFY((is_substitution_failure, ullong>)); VERIFY((is_substitution_failure, llong>)); VERIFY((is_substitution_failure, ullong>)); + if constexpr (sizeof(long) == sizeof(llong)) + { + VERIFY((is_substitution_failure)); + VERIFY((is_substitution_failure)); + VERIFY((is_substitution_failure, long>)); + VERIFY((is_substitution_failure, ulong>)); + VERIFY((is_substitution_failure, long>)); + VERIFY((is_substitution_failure, ulong>)); + } + else + { + binary_op_return_type(); + binary_op_return_type(); + binary_op_return_type, long>(); + binary_op_return_type, ulong>(); + binary_op_return_type, long>(); + binary_op_return_type, ulong>(); + } } else { @@ -266,6 +278,12 @@ namespace simd_abi binary_op_return_type, ullong>(); binary_op_return_type, llong>(); binary_op_return_type, ullong>(); + binary_op_return_type(); + binary_op_return_type(); + binary_op_return_type, long>(); + binary_op_return_type, ulong>(); + binary_op_return_type, long>(); + binary_op_return_type, ulong>(); } VERIFY((is_substitution_failure, vldouble>));