Message ID | 20230127114627.243812-1-xry111@xry111.site |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp788807wrn; Fri, 27 Jan 2023 03:47:46 -0800 (PST) X-Google-Smtp-Source: AK7set+G0co47zJYvqQ9GBJ4Rq3b8tgYXtnIXRnsBPxxoMxZZJLENqZgZtqv4jTUKJKB7ky1DY7S X-Received: by 2002:a17:907:77cf:b0:87b:d4e8:5f9a with SMTP id kz15-20020a17090777cf00b0087bd4e85f9amr1509861ejc.50.1674820066390; Fri, 27 Jan 2023 03:47:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674820066; cv=none; d=google.com; s=arc-20160816; b=F2Xbgm1JbzkGPmmPycarJGyJ6cfIi6DEtdZkJYdZNHyYfLIAl4zNV1pA/3p01L6vyc bI4F62/I08Z+dwaDbMCvRCJdLCSOkHbWFTnPKAJOr8LHO1jdO5xSYcoETVia7uZ1VDFG UB8jcF5eQgO24GJVWmJ05/57JvAINssf9D00nvsc9xLoBqvf+I2Bs5vyvZKYOa4cSIvU hKwm+jX+Ky3Z/yJkVpf9OLMhD+ofXfhsoKjjFjOIwKYN2hqIhBZRvjSyGPUpZ5MkC60T BeSG9C4qYJPBIhNp4F8jNjS10ElUZVuNhJOw0yGJZwqcpvX6znMWGOSr09JyyCNyUlSa w8rw== 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:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=BrPlohQ/u0q9NlpzWLZxHhfJFQLoA2iqDUMx9AlKUKw=; b=EzxDO1LmnqBvW7UMOd4bOwHVSFrf5HWitLd/6tfS+aZrHRb8HNl//Zgr+XmGSWk887 Atgtk2xPikcwexxyUY29TWBFojFMgJUZN4AOUGhuyzZB3Jbxfw4gn5a2FC2avO8sN5sV 1I+UQ5jnjUGtdT0hQgHPh79/VYE1qXa/vTU/EbUUJhLBkGefJ2qPLh6KwPiFKgKanCsg xp1vtFhI6jjohE2TmpObuVt99H5O9JrRkveYACcb9AJ88vEY3uAcQ4c+WVxWSdkdQEpT 0RzorQt8IEcaqb1TW/IOXr2D0d7dkbeo7AS1OLC4nmzbLirkhyIoiq8bLbp9qs832XcJ RLNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=nPmQnYb0; 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 bf10-20020a170906c50a00b007c31c5206c5si4879217ejb.436.2023.01.27.03.47.46 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 03:47:46 -0800 (PST) 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=nPmQnYb0; 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 6499F38582B0 for <ouuuleilei@gmail.com>; Fri, 27 Jan 2023 11:47:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6499F38582B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674820062; bh=BrPlohQ/u0q9NlpzWLZxHhfJFQLoA2iqDUMx9AlKUKw=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=nPmQnYb0LgOhcpwpMIUcrnaRY0Mz28zfePSy6KWuaE4YgOJmMtbeCUgRJG60YfsTC YpWpn2RjYvsR3UF78CHgeUNNxYNRIARwyOElPkz4o7hcVdmIdVkkyfb5kAsyYVxznC gjgAAI+fITwKEUDBXIEPtT07ktb08nyzgJj9tpUQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 2E0DB3858C74 for <gcc-patches@gcc.gnu.org>; Fri, 27 Jan 2023 11:46:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2E0DB3858C74 Received: from xry111-x57s1.. (unknown [IPv6:240e:358:11ca:f700:dc73:854d:832e:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 0C35E6688D; Fri, 27 Jan 2023 06:46:53 -0500 (EST) To: gcc-patches@gcc.gnu.org Cc: Richard Biener <rguenther@suse.de>, Jakub Jelinek <jakub@redhat.com>, Xi Ruoyao <xry111@xry111.site> Subject: [PATCH] testsuite: Use noipa and noinline attributes for pr95115 test Date: Fri, 27 Jan 2023 19:46:27 +0800 Message-Id: <20230127114627.243812-1-xry111@xry111.site> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, FROM_SUSPICIOUS_NTLD_FP, GIT_PATCH_0, LIKELY_SPAM_FROM, SPF_HELO_PASS, SPF_PASS, TXREP, T_PDS_OTHER_BAD_TLD 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Xi Ruoyao via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Xi Ruoyao <xry111@xry111.site> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756176126352593741?= X-GMAIL-MSGID: =?utf-8?q?1756176126352593741?= |
Series |
testsuite: Use noipa and noinline attributes for pr95115 test
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Xi Ruoyao
Jan. 27, 2023, 11:46 a.m. UTC
They prevent the compiler from deeming the NaN result "unused" and remove the calculation raising INVALID exception. See the discussion in PR107608 for details. Tested on x86_64-linux-gnu where the change fixes the test failure. Ok for trunk? gcc/testsuite/ChangeLog: * gcc.dg/pr95115.c (x): Add noipa and noinline attributes. --- gcc/testsuite/gcc.dg/pr95115.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Fri, Jan 27, 2023 at 07:46:27PM +0800, Xi Ruoyao wrote: > They prevent the compiler from deeming the NaN result "unused" and > remove the calculation raising INVALID exception. See the discussion > in PR107608 for details. > > Tested on x86_64-linux-gnu where the change fixes the test failure. > Ok for trunk? > > gcc/testsuite/ChangeLog: > > * gcc.dg/pr95115.c (x): Add noipa and noinline attributes. noipa implies noinline, so unless one targets both very old gcc versions which didn't have noipa attribute in addition to current ones, it is sufficient to specify just noipa. Otherwise LGTM. > diff --git a/gcc/testsuite/gcc.dg/pr95115.c b/gcc/testsuite/gcc.dg/pr95115.c > index 69c4f83250c..11620acccae 100644 > --- a/gcc/testsuite/gcc.dg/pr95115.c > +++ b/gcc/testsuite/gcc.dg/pr95115.c > @@ -6,7 +6,7 @@ > #include <fenv.h> > #include <stdlib.h> > > -double > +__attribute__ ((noipa, noinline)) double > x (void) > { > double d = __builtin_inf (); > -- > 2.39.1 Jakub
On Fri, 2023-01-27 at 12:50 +0100, Jakub Jelinek wrote: > On Fri, Jan 27, 2023 at 07:46:27PM +0800, Xi Ruoyao wrote: > > They prevent the compiler from deeming the NaN result "unused" and > > remove the calculation raising INVALID exception. See the discussion > > in PR107608 for details. > > > > Tested on x86_64-linux-gnu where the change fixes the test failure. > > Ok for trunk? > > > > gcc/testsuite/ChangeLog: > > > > * gcc.dg/pr95115.c (x): Add noipa and noinline attributes. > > noipa implies noinline, so unless one targets both very old gcc > versions > which didn't have noipa attribute in addition to current ones, it is > sufficient to specify just noipa. > > Otherwise LGTM. Pushed with only noipa. I must have some flawed memory abort the interaction between noipa and noinline. Thanks for pointing that out!
On Fri, Jan 27, 2023 at 08:08:26PM +0800, Xi Ruoyao via Gcc-patches wrote: > On Fri, 2023-01-27 at 12:50 +0100, Jakub Jelinek wrote: > > On Fri, Jan 27, 2023 at 07:46:27PM +0800, Xi Ruoyao wrote: > > > They prevent the compiler from deeming the NaN result "unused" and > > > remove the calculation raising INVALID exception. See the discussion > > > in PR107608 for details. > > > > > > Tested on x86_64-linux-gnu where the change fixes the test failure. > > > Ok for trunk? > > > > > > gcc/testsuite/ChangeLog: > > > > > > * gcc.dg/pr95115.c (x): Add noipa and noinline attributes. > > > > noipa implies noinline, so unless one targets both very old gcc > > versions > > which didn't have noipa attribute in addition to current ones, it is > > sufficient to specify just noipa. > > > > Otherwise LGTM. > > Pushed with only noipa. I must have some flawed memory abort the > interaction between noipa and noinline. Thanks for pointing that out! /* A "noipa" function attribute implies "noinline", "noclone" and "no_icf" for those targets that support it. */ if (TREE_CODE (*node) == FUNCTION_DECL && attributes && lookup_attribute ("noipa", attributes) != NULL && lookup_attribute_spec (get_identifier ("noipa"))) { if (lookup_attribute ("noinline", attributes) == NULL) attributes = tree_cons (get_identifier ("noinline"), NULL, attributes); if (lookup_attribute ("noclone", attributes) == NULL) attributes = tree_cons (get_identifier ("noclone"), NULL, attributes); if (lookup_attribute ("no_icf", attributes) == NULL) attributes = tree_cons (get_identifier ("no_icf"), NULL, attributes); } plus various spots check just for "noipa", so noipa isn't just equivalent to noinline, noclone, no_icf. Jakub
diff --git a/gcc/testsuite/gcc.dg/pr95115.c b/gcc/testsuite/gcc.dg/pr95115.c index 69c4f83250c..11620acccae 100644 --- a/gcc/testsuite/gcc.dg/pr95115.c +++ b/gcc/testsuite/gcc.dg/pr95115.c @@ -6,7 +6,7 @@ #include <fenv.h> #include <stdlib.h> -double +__attribute__ ((noipa, noinline)) double x (void) { double d = __builtin_inf ();