From patchwork Fri Oct 4 16:40:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 1992914 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gjlay.de header.i=@gjlay.de header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=MSnNzZ75; dkim=pass header.d=gjlay.de header.i=@gjlay.de header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=kCC4fspb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XKvSM0JxNz1xt7 for ; Sat, 5 Oct 2024 02:41:05 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 84D4C385EC04 for ; Fri, 4 Oct 2024 16:41:03 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.21]) by sourceware.org (Postfix) with ESMTPS id 8ACB73858417 for ; Fri, 4 Oct 2024 16:40:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8ACB73858417 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gjlay.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=gjlay.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8ACB73858417 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=85.215.255.21 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1728060044; cv=pass; b=WzSzgXo+0pSkDCCqkkfO8M3eztK/SqTGZUjWrKhPTvl5s/KJ8XMHgug+fxGFzxoTyL8P0Fsfdxezr92hY85jH1gIppz+RXAf32EDnlivgkiYfBRMPgMKMNk0OuHcA1qtqZi6rzrPy585Z1xocnJWhNby0r7/CyEk2559sUu/HgE= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1728060044; c=relaxed/simple; bh=bSsNpKLe01auBGQWizmuqKspLNtyc02CcpbjBANT+N8=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version:From: To:Subject; b=Tq+J+tXkC1MXHq2qsJsCpRPtyE5+ikuAzMS1vm3tZRPUAnKJ7Gu4Vfs6oyDODrwQg2E+kHU6lY/CWMnR5m3m2qbHBLkppD+awp4xNYaP1nT6WSKuP6rsi6l4MPSW8qJ3IfGEQujQ4H2j4UMa4vDoZ0BaG3KNCPfXsTIULbHRFFU= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1728060041; cv=none; d=strato.com; s=strato-dkim-0002; b=KPtuKzCgh1HHPqPmgorSdsWUGdjeAA4WfNa9/iVVJQDvW9Cmseu79GAy25t9Xnq0ZJ hp2tJAsmDkISvE1PLF0Ja+kFof6eKzlj+DLo7/IlATxzRrPjD9i3cDyP0d8moRf/urdP epbNkhFVSbpVQtquwySM2zhbo4/IiU6PwHUeR6/gfRPq/H96tz0DssBbbHJDU9+zRWs6 e0l1nUUiE5CqiSelo91Ip1E2m1eQJJRmoa0ixXjTpVbokfz3LM+NPVLevP2ExTueyDYc Byl8I3ERR+NOpC/xuBtQVr/0e6JWXvxuQY6zrnkK91HicRPx7Qcre1uTeb/J43edDHGd FRXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1728060041; s=strato-dkim-0002; d=strato.com; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=tNYrxRhf1xgyfxWejbpSWV+dZpZjUgLalxAk0B7XpmQ=; b=C++5EsaQwuggWBunSWiiZDwHIY5EE8JyNQrtVCrGQjYXFx3WFZ/vIhSyi+vz10XfYg YXI/olOZKSOQUNu6kSTr7T42yMpKK37fRjTy4HGv4X8O51OzzTk0Ld16zWSKefy1iHL0 ZTaQvmnSOOBedSNpFj3ksT1VaHNoU2BFPTJ++ydErVBsTcniYV6GiRqaf/R9ytB7ccfy LVl7TepqLicGpPXzZxWqBrboeUPSoF1txcPFq68KbkdHc6bexqg5ZK5rJPn9KmrmTXSE V60myWvp5UeTwEdu2nCjaVeXAbf045D5qoby+bcypOVC2PbmIDQ8Y8CMgSdG9Bp55ajK afEw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1728060041; s=strato-dkim-0002; d=gjlay.de; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=tNYrxRhf1xgyfxWejbpSWV+dZpZjUgLalxAk0B7XpmQ=; b=MSnNzZ75DlopZ7ANrDYSXrSEkbaXwEktthFOWeBD6LdhiOfGNh0m/djkArMKJManEN 2QXNtT+8KoksFHjOjc92jMSNYY05qGRwfP5ZgPp5BJeSljbQ/U4LNtx5YMpIjiGyJJcm zXz8mh7ILBQ53wJiAUO34bVJaL4l5jDnsTJCmMjzL3v/j5HKWYmFRxLg2JaSawqw6/Se xVTVc0dCEpCZufFKJ2J5odWq6yQs14qRW2JwS1AeZqnckAJvWP29k8HIw2K6MwhuqQ9F 0/7l8n+QRZ50czRhdRDLm2f35CRkmmDKUlf1gXA2VCHyshh+FLDvcMAL76kUbeyj6CK+ Wvgg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1728060041; s=strato-dkim-0003; d=gjlay.de; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=tNYrxRhf1xgyfxWejbpSWV+dZpZjUgLalxAk0B7XpmQ=; b=kCC4fspbjz5v8llNlr2i1/wVp8Vx/2DTiKQoRA4U2RXbrEXDmEn8WDDIo/bRxKe8zb fPbRatHgxtal6i0HM5AA== X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKXKoq0dKoR0vVqyQb0R7G22gRW+Qr5Q==" Received: from [192.168.2.102] by smtp.strato.de (RZmta 51.2.8 AUTH) with ESMTPSA id x2e25d094Gee2jB (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Fri, 4 Oct 2024 18:40:40 +0200 (CEST) Message-ID: Date: Fri, 4 Oct 2024 18:40:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Georg-Johann Lay Content-Language: en-US To: "gcc-patches@gcc.gnu.org" Subject: [patch,testsuite] Some float64 and float32x test require double64plus. X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Some of the float64 and float32x test cases are using double built-ins and hence require double64plus resp. double_float32xplus, i.e. double is at least as good as float32x. This patch adds according dg-require-effective-target filters. (But only for test cases where I can verify that they are working with double64+ but are failing with double32.) Ok for trunk? Johann --- testsuite - Some float64 and float32x test require double64plus. Some of the float64 and float32x test cases are using double built-ins and hence require double64plus resp. that double is at least as good as float32x (double_float32xplus). gcc/testsuite/ * lib/target-supports.exp (check_effective_target_double_float32xplus): New proc. * gcc.dg/torture/float32x-builtin.c: Add dg-require-effective-target double_float32xplus. * gcc.dg/torture/float32x-tg-2.c: Same. * gcc.dg/torture/float32x-tg.c: Same. * gcc.dg/torture/float64-builtin.c: Add dg-require-effective-target double64plus. * gcc.dg/torture/float64-tg-2.c: Same. * gcc.dg/torture/float64-tg.c: Same. testsuite - Some float64 and float32x test require double64plus. Some of the float64 and float32x test cases are using double built-ins and hence require double64plus resp. that double is at least as good as float32x (double_float32xplus). gcc/testsuite/ * lib/target-supports.exp (check_effective_target_double_float32xplus): New proc. * gcc.dg/torture/float32x-builtin.c: Add dg-require-effective-target double_float32xplus. * gcc.dg/torture/float32x-tg-2.c: Same. * gcc.dg/torture/float32x-tg.c: Same. * gcc.dg/torture/float64-builtin.c: Add dg-require-effective-target double64plus. * gcc.dg/torture/float64-tg-2.c: Same. * gcc.dg/torture/float64-tg.c: Same. diff --git a/gcc/testsuite/gcc.dg/torture/float32x-builtin.c b/gcc/testsuite/gcc.dg/torture/float32x-builtin.c index 71eb7e2cdc8..0404d392705 100644 --- a/gcc/testsuite/gcc.dg/torture/float32x-builtin.c +++ b/gcc/testsuite/gcc.dg/torture/float32x-builtin.c @@ -4,6 +4,7 @@ /* { dg-add-options float32x } */ /* { dg-add-options ieee } */ /* { dg-require-effective-target float32x_runtime } */ +/* { dg-require-effective-target double_float32xplus } */ #define WIDTH 32 #define EXT 1 diff --git a/gcc/testsuite/gcc.dg/torture/float32x-tg-2.c b/gcc/testsuite/gcc.dg/torture/float32x-tg-2.c index 6179aba7cdd..dd7e2064a1a 100644 --- a/gcc/testsuite/gcc.dg/torture/float32x-tg-2.c +++ b/gcc/testsuite/gcc.dg/torture/float32x-tg-2.c @@ -4,6 +4,7 @@ /* { dg-add-options float32x } */ /* { dg-add-options ieee } */ /* { dg-require-effective-target float32x_runtime } */ +/* { dg-require-effective-target double_float32xplus } */ #define WIDTH 32 #define EXT 1 diff --git a/gcc/testsuite/gcc.dg/torture/float32x-tg.c b/gcc/testsuite/gcc.dg/torture/float32x-tg.c index b65b03f558b..87d9bef2b03 100644 --- a/gcc/testsuite/gcc.dg/torture/float32x-tg.c +++ b/gcc/testsuite/gcc.dg/torture/float32x-tg.c @@ -4,6 +4,7 @@ /* { dg-add-options float32x } */ /* { dg-add-options ieee } */ /* { dg-require-effective-target float32x_runtime } */ +/* { dg-require-effective-target double_float32xplus } */ #define WIDTH 32 #define EXT 1 diff --git a/gcc/testsuite/gcc.dg/torture/float64-builtin.c b/gcc/testsuite/gcc.dg/torture/float64-builtin.c index 413768443ae..2462017e4d5 100644 --- a/gcc/testsuite/gcc.dg/torture/float64-builtin.c +++ b/gcc/testsuite/gcc.dg/torture/float64-builtin.c @@ -4,6 +4,7 @@ /* { dg-add-options float64 } */ /* { dg-add-options ieee } */ /* { dg-require-effective-target float64_runtime } */ +/* { dg-require-effective-target double64plus } */ #define WIDTH 64 #define EXT 0 diff --git a/gcc/testsuite/gcc.dg/torture/float64-tg-2.c b/gcc/testsuite/gcc.dg/torture/float64-tg-2.c index d0e4316611f..f034e76cfeb 100644 --- a/gcc/testsuite/gcc.dg/torture/float64-tg-2.c +++ b/gcc/testsuite/gcc.dg/torture/float64-tg-2.c @@ -4,6 +4,7 @@ /* { dg-add-options float64 } */ /* { dg-add-options ieee } */ /* { dg-require-effective-target float64_runtime } */ +/* { dg-require-effective-target double64plus } */ #define WIDTH 64 #define EXT 0 diff --git a/gcc/testsuite/gcc.dg/torture/float64-tg.c b/gcc/testsuite/gcc.dg/torture/float64-tg.c index a7188312d57..d17ee0ecb19 100644 --- a/gcc/testsuite/gcc.dg/torture/float64-tg.c +++ b/gcc/testsuite/gcc.dg/torture/float64-tg.c @@ -4,6 +4,7 @@ /* { dg-add-options float64 } */ /* { dg-add-options ieee } */ /* { dg-require-effective-target float64_runtime } */ +/* { dg-require-effective-target double64plus } */ #define WIDTH 64 #define EXT 0 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index f92f7f1af9c..459af8e58c6 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3965,6 +3965,17 @@ proc check_effective_target_floatn_nx_runtime {} { return 1 } +# Return 1 when double is at least as good as _Float32x, i.e. double can +# be used to emulate _Float32x. + +proc check_effective_target_double_float32xplus {} { + return [check_no_compiler_messages_nocache double_float32xplus object { + _Float32x x; + int dummy1[__DBL_MANT_DIG__ >= __FLT32X_MANT_DIG__ ? 1 : -1]; + int dummy2[__DBL_MAX_EXP__ >= __FLT32X_MAX_EXP__ ? 1 : -1]; + } [add_options_for_float32x ""]] +} + # Add options needed to use the _FloatN / _FloatNx type indicated in # the function name.