Message ID | orcz4xgr2u.fsf@lxoliva.fsfla.org |
---|---|
State | Committed |
Commit | 0580ea4b7a6dc8ee981b08f936b3ce62c6dfe200 |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 57DE738768BC for <patchwork@sourceware.org>; Sat, 25 Mar 2023 11:45:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57DE738768BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679744738; bh=CVp0Q3KuDCU1zF09vTkporUEwJJzxdnf/EJ9sFMiSno=; h=To:Cc:Cc:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=aOeiEzWa4u8cNlNZE4tGWsli/GdfmDSNXn5pWKRH29Ruh9qJxwjEFUNZ4cR7ob3YC y6oVEo8QiySHYupOEjQiNMsa7SSEFamMt3uUPJiBu9gZqk1q9qxJCD0dQLU/RPTSEi mjMGkBV8p5DaZgtG0AR7SPVJHbI/QBtTEypAkZl8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTPS id A0EFA3858412; Sat, 25 Mar 2023 11:45:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A0EFA3858412 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 79ECB1165CB; Sat, 25 Mar 2023 07:45:01 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com X-Amavis-Alert: BAD HEADER SECTION, Header field occurs more than once: "Cc" occurs 3 times Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OfFflapkYiz0; Sat, 25 Mar 2023 07:45:01 -0400 (EDT) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id 3FC1A1165C9; Sat, 25 Mar 2023 07:45:01 -0400 (EDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 32P8gH041349870 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 25 Mar 2023 05:42:17 -0300 To: gcc-patches@gcc.gnu.org Cc: Haochen Gui <guihaoc@linux.ibm.com> Cc: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>, Mike Stump <mikestump@comcast.net> Cc: David Edelsohn <dje.gcc@gmail.com>, Segher Boessenkool <segher@kernel.crashing.org>, Kewen Lin <linkw@gcc.gnu.org> Subject: [PATCH] [rs6000] Correct match pattern in pr56605.c Organization: Free thinker, does not speak for AdaCore Date: Sat, 25 Mar 2023 05:42:17 -0300 Message-ID: <orcz4xgr2u.fsf@lxoliva.fsfla.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DATE_IN_PAST_03_06, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_NONE, 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 <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: Alexandre Oliva via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Alexandre Oliva <oliva@adacore.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
[rs6000] Correct match pattern in pr56605.c
|
|
Commit Message
Alexandre Oliva
March 25, 2023, 8:42 a.m. UTC
Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590958.html
From: Haochen Gui <guihaoc@linux.ibm.com>
This patch corrects the match pattern in pr56605.c. The former pattern
is wrong and test case fails with GCC11. It should match following
insn on each subtarget after mode promotion is disabled. The patch
need to be backported to GCC11.
//gimple
_17 = (unsigned int) _20;
prolog_loop_niters.4_23 = _17 & 3;
//rtl
(insn 19 18 20 2 (parallel [
(set (reg:CC 208)
(compare:CC (and:SI (subreg:SI (reg:DI 207) 0)
(const_int 3 [0x3]))
(const_int 0 [0])))
(set (reg:SI 129 [ prolog_loop_niters.5 ])
(and:SI (subreg:SI (reg:DI 207) 0)
(const_int 3 [0x3])))
]) 197 {*andsi3_imm_mask_dot2}
Rebased. Regstrapped on ppc64-linux-gnu. Also tested with
ppc64-vxworks7r2 (gcc-12), where it's also needed. Ok to install?
for gcc/testsuite/ChangeLog
PR target/102146
* gcc.target/powerpc/pr56605.c: Correct match pattern in
combine pass.
---
gcc/testsuite/gcc.target/powerpc/pr56605.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
Hi Alexandre and Haochen, on 2023/3/25 16:42, Alexandre Oliva via Gcc-patches wrote: > > Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590958.html > > From: Haochen Gui <guihaoc@linux.ibm.com> > > This patch corrects the match pattern in pr56605.c. The former pattern > is wrong and test case fails with GCC11. It should match following > insn on each subtarget after mode promotion is disabled. The patch > need to be backported to GCC11. Comment https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102146#c21 made me feel that this test issue was just in branches, but this proposed patch seems to say it still exists on trunk, could you confirm that? BR, Kewen > > //gimple > _17 = (unsigned int) _20; > prolog_loop_niters.4_23 = _17 & 3; > > //rtl > (insn 19 18 20 2 (parallel [ > (set (reg:CC 208) > (compare:CC (and:SI (subreg:SI (reg:DI 207) 0) > (const_int 3 [0x3])) > (const_int 0 [0]))) > (set (reg:SI 129 [ prolog_loop_niters.5 ]) > (and:SI (subreg:SI (reg:DI 207) 0) > (const_int 3 [0x3]))) > ]) 197 {*andsi3_imm_mask_dot2} > > Rebased. Regstrapped on ppc64-linux-gnu. Also tested with > ppc64-vxworks7r2 (gcc-12), where it's also needed. Ok to install? > > > for gcc/testsuite/ChangeLog > > PR target/102146 > * gcc.target/powerpc/pr56605.c: Correct match pattern in > combine pass. > --- > gcc/testsuite/gcc.target/powerpc/pr56605.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c > index 7695f87db6f66..651a88e3cc7f9 100644 > --- a/gcc/testsuite/gcc.target/powerpc/pr56605.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c > @@ -11,5 +11,4 @@ void foo (short* __restrict sb, int* __restrict ia) > ia[i] = (int) sb[i]; > } > > -/* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:[SD]I) \((?:sub)?reg:[SD]I} 1 "combine" } } */ > - > +/* { dg-final { scan-rtl-dump-times {\(compare:CC \(and:SI \(subreg:SI \(reg:DI} 1 "combine" } } */
Kewen, The case still fails with trunk. FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine "\\(compare:CC \\((?:and|zero_extend):(?:[SD]I) \\((?:sub)?reg:[SD]I" 1 === gcc Summary === # of expected passes 1 # of unexpected failures 1 With the trunk, it should match the pattern. (compare:CC (and:SI (subreg:SI (reg:DI 207) 0) Thanks Gui Haochen 在 2023/3/27 15:41, Kewen.Lin 写道: > Hi Alexandre and Haochen, > > on 2023/3/25 16:42, Alexandre Oliva via Gcc-patches wrote: >> >> Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590958.html >> >> From: Haochen Gui <guihaoc@linux.ibm.com> >> >> This patch corrects the match pattern in pr56605.c. The former pattern >> is wrong and test case fails with GCC11. It should match following >> insn on each subtarget after mode promotion is disabled. The patch >> need to be backported to GCC11. > > Comment https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102146#c21 made me > feel that this test issue was just in branches, but this proposed patch > seems to say it still exists on trunk, could you confirm that? > > BR, > Kewen > >> >> //gimple >> _17 = (unsigned int) _20; >> prolog_loop_niters.4_23 = _17 & 3; >> >> //rtl >> (insn 19 18 20 2 (parallel [ >> (set (reg:CC 208) >> (compare:CC (and:SI (subreg:SI (reg:DI 207) 0) >> (const_int 3 [0x3])) >> (const_int 0 [0]))) >> (set (reg:SI 129 [ prolog_loop_niters.5 ]) >> (and:SI (subreg:SI (reg:DI 207) 0) >> (const_int 3 [0x3]))) >> ]) 197 {*andsi3_imm_mask_dot2} >> >> Rebased. Regstrapped on ppc64-linux-gnu. Also tested with >> ppc64-vxworks7r2 (gcc-12), where it's also needed. Ok to install? >> >> >> for gcc/testsuite/ChangeLog >> >> PR target/102146 >> * gcc.target/powerpc/pr56605.c: Correct match pattern in >> combine pass. >> --- >> gcc/testsuite/gcc.target/powerpc/pr56605.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c >> index 7695f87db6f66..651a88e3cc7f9 100644 >> --- a/gcc/testsuite/gcc.target/powerpc/pr56605.c >> +++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c >> @@ -11,5 +11,4 @@ void foo (short* __restrict sb, int* __restrict ia) >> ia[i] = (int) sb[i]; >> } >> >> -/* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:[SD]I) \((?:sub)?reg:[SD]I} 1 "combine" } } */ >> - >> +/* { dg-final { scan-rtl-dump-times {\(compare:CC \(and:SI \(subreg:SI \(reg:DI} 1 "combine" } } */ >
Hi Haochen, on 2023/3/27 17:46, HAO CHEN GUI wrote: > Kewen, > The case still fails with trunk. > OK, thanks for checking, the proposed patch can catch the expected pattern accurately (excluding noises), so okay for trunk and branches, thanks! BR, Kewen > FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine "\\(compare:CC \\((?:and|zero_extend):(?:[SD]I) \\((?:sub)?reg:[SD]I" 1 > > === gcc Summary === > > # of expected passes 1 > # of unexpected failures 1 > > With the trunk, it should match the pattern. > (compare:CC (and:SI (subreg:SI (reg:DI 207) 0)
diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c index 7695f87db6f66..651a88e3cc7f9 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr56605.c +++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c @@ -11,5 +11,4 @@ void foo (short* __restrict sb, int* __restrict ia) ia[i] = (int) sb[i]; } -/* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:[SD]I) \((?:sub)?reg:[SD]I} 1 "combine" } } */ - +/* { dg-final { scan-rtl-dump-times {\(compare:CC \(and:SI \(subreg:SI \(reg:DI} 1 "combine" } } */