Message ID | 20230421193338.3874230-1-sam@gentoo.org |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1298530vqo; Fri, 21 Apr 2023 12:34:51 -0700 (PDT) X-Google-Smtp-Source: AKy350YHTeUV5IxWCjiy/t/ODY+qE6kjikleRSD8PGjfO2nEDEbgLADVuOIiOWvrqhgAe5LMw2Xm X-Received: by 2002:aa7:d458:0:b0:506:bb4f:ec with SMTP id q24-20020aa7d458000000b00506bb4f00ecmr6065717edr.33.1682105691617; Fri, 21 Apr 2023 12:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682105691; cv=none; d=google.com; s=arc-20160816; b=U/X7JjU5snrEktqFZgD36dkgyoCRBG1ZYLV7c7jc8DpXVAK/QegpOx5d3OzH+GsmgV OppfU7XWfiXTI76svcjfLpP9Oo/JsPU0ciwLA8b19ov1Uw/la54GiHj9Evig5R4L2oyz wTyM4Hg55+VVpKH5NahirPINTVQNEr6PojTDkoUOCeiqOZSe+qKAlIpXCHX/FxaOWIBq 6hYrrQt5D+ykezxZZ2JgsW7C7cer6gA0u+jottwUWab0qv43+ufexpa/VadAi3sBaDQk +UESvbw29GWGvdHg3BU5wYcOcToQgsw2K0rpy49E7K7KI87JRdfWofLd2236rbx6ppXm GRfA== 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=g9INr0BHYpL06mrAGQgUao06DKzSwRaCfY5WpMFD4Qc=; b=wv3TKMmZxPC4/1MlSq8pkkqkvu9LU6jOcJ76+Ktb9rdfYms+G4zUG2de0Z/KXmqjJa PTYVvJ4sjx2ijbTNVdcwRzJzIa4iae0W4ENxyO1sWyoOgn+0jw2437ikNb3kLtPAOg0M y+gbLLCGNX3zrF7TsV2PdZB+rG6BBdhNmYHzxSK663U+PCl1J/TJRM0C9vsVMukxTp48 7Ci5tEa17wvSAhWh087o2iyN6+Rsc3TKdV8b1bgtCP46OUBtL89ECJVFijwTBNw4cgv6 R6S4WuBfSLMUveLGy0kgBkSzSzI8zFHgs2/6kbasBBJNxzUWNXVbJ57FSIGqiUrmErQv ueVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=uH8dN0aA; 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 j17-20020a50ed11000000b00506a4037a0bsi4304882eds.491.2023.04.21.12.34.51 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 12:34:51 -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=uH8dN0aA; 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 D8C14385696D for <ouuuleilei@gmail.com>; Fri, 21 Apr 2023 19:34:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8C14385696D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682105675; bh=g9INr0BHYpL06mrAGQgUao06DKzSwRaCfY5WpMFD4Qc=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=uH8dN0aA8aPK8Gb2W5Xj57JvirCGoiWT2JgZzs9E1sEJJJzY5YsitQswB/G9Q9sgj WB284Nh9niKWzcwknA+uKhkzSbzIADIKDCrK84mrmVlB62MJ/0xWXCWwYHJ1Seik7E 2gaWIBtD+2vYlJ+G8x+F6YNS6ZVrzs8+MbuHG8xA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id B1EEF385702A; Fri, 21 Apr 2023 19:33:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B1EEF385702A To: gcc-patches@gcc.gnu.org Cc: pinskia@gcc.gnu.org, rguenth@gcc.gnu.org, Sam James <sam@gentoo.org> Subject: [PATCH] testsuite: Add testcase for sparc ICE [PR105573] Date: Fri, 21 Apr 2023 20:33:38 +0100 Message-Id: <20230421193338.3874230-1-sam@gentoo.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 <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: Sam James via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Sam James <sam@gentoo.org> 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?1763815657411775201?= X-GMAIL-MSGID: =?utf-8?q?1763815657411775201?= |
Series |
testsuite: Add testcase for sparc ICE [PR105573]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Sam James
April 21, 2023, 7:33 p.m. UTC
r11-10018-g33914983cf3734c2f8079963ba49fcc117499ef3 fixed PR105312 and added
a test case for target/arm but the duplicate PR105573 has a test case for
target/sparc that was uncommitted until now.
2023-04-21 Sam James <sam@gentoo.org>
PR tree-optimization/105312
PR target/105573
* gcc/testsuite/gcc.target/sparc/pr105573.c: New test.
Signed-off-by: Sam James <sam@gentoo.org>
---
gcc/testsuite/gcc.target/sparc/pr105573.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/sparc/pr105573.c
Comments
On Fri, 21 Apr 2023, Sam James wrote: > r11-10018-g33914983cf3734c2f8079963ba49fcc117499ef3 fixed PR105312 and added > a test case for target/arm but the duplicate PR105573 has a test case for > target/sparc that was uncommitted until now. OK. But see below for a question > 2023-04-21 Sam James <sam@gentoo.org> > PR tree-optimization/105312 > PR target/105573 > * gcc/testsuite/gcc.target/sparc/pr105573.c: New test. > > Signed-off-by: Sam James <sam@gentoo.org> > --- > gcc/testsuite/gcc.target/sparc/pr105573.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > create mode 100644 gcc/testsuite/gcc.target/sparc/pr105573.c > > diff --git a/gcc/testsuite/gcc.target/sparc/pr105573.c b/gcc/testsuite/gcc.target/sparc/pr105573.c > new file mode 100644 > index 00000000000..9eba2e4beba > --- /dev/null > +++ b/gcc/testsuite/gcc.target/sparc/pr105573.c > @@ -0,0 +1,14 @@ > +/* { dg-do compile } */ > +/* { dg-options "-O2 -mvis3" } */ > + > +int *UINT_sign_args, UINT_sign_steps; > +int *UINT_sign_ip1; > +__attribute__((optimize("O3"))) void UINT_sign() { is the optimize attribute necessary or does -O3 -mvis3 also reproduce the issue? > + char *op1 = (char*) UINT_sign_args; > + int os1 = UINT_sign_steps, i; > + for (; i; i++, op1 += os1) { > + unsigned in = *(unsigned *)UINT_sign_ip1; > + int *out = (int*) op1; > + *out = in > 0; > + } > +}
Richard Biener <rguenther@suse.de> writes: > On Fri, 21 Apr 2023, Sam James wrote: > >> r11-10018-g33914983cf3734c2f8079963ba49fcc117499ef3 fixed PR105312 and added >> a test case for target/arm but the duplicate PR105573 has a test case for >> target/sparc that was uncommitted until now. > > OK. But see below for a question > >> 2023-04-21 Sam James <sam@gentoo.org> >> PR tree-optimization/105312 >> PR target/105573 >> * gcc/testsuite/gcc.target/sparc/pr105573.c: New test. >> >> Signed-off-by: Sam James <sam@gentoo.org> >> --- >> gcc/testsuite/gcc.target/sparc/pr105573.c | 14 ++++++++++++++ >> 1 file changed, 14 insertions(+) >> create mode 100644 gcc/testsuite/gcc.target/sparc/pr105573.c >> >> diff --git a/gcc/testsuite/gcc.target/sparc/pr105573.c b/gcc/testsuite/gcc.target/sparc/pr105573.c >> new file mode 100644 >> index 00000000000..9eba2e4beba >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/sparc/pr105573.c >> @@ -0,0 +1,14 @@ >> +/* { dg-do compile } */ >> +/* { dg-options "-O2 -mvis3" } */ >> + >> +int *UINT_sign_args, UINT_sign_steps; >> +int *UINT_sign_ip1; >> +__attribute__((optimize("O3"))) void UINT_sign() { > > is the optimize attribute necessary or does -O3 -mvis3 also reproduce > the issue? Good point - -O3 -mvis3 is enough, so I've resent w/ that & dropped attribute. I don't have push access so will need someone to push for me. Cheers.
diff --git a/gcc/testsuite/gcc.target/sparc/pr105573.c b/gcc/testsuite/gcc.target/sparc/pr105573.c new file mode 100644 index 00000000000..9eba2e4beba --- /dev/null +++ b/gcc/testsuite/gcc.target/sparc/pr105573.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mvis3" } */ + +int *UINT_sign_args, UINT_sign_steps; +int *UINT_sign_ip1; +__attribute__((optimize("O3"))) void UINT_sign() { + char *op1 = (char*) UINT_sign_args; + int os1 = UINT_sign_steps, i; + for (; i; i++, op1 += os1) { + unsigned in = *(unsigned *)UINT_sign_ip1; + int *out = (int*) op1; + *out = in > 0; + } +}