From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 67A3F3848407 for ; Wed, 21 Jul 2021 22:52:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 67A3F3848407 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 16LMpK2Y020762; Wed, 21 Jul 2021 17:51:20 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 16LMpKnU020761; Wed, 21 Jul 2021 17:51:20 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 21 Jul 2021 17:51:19 -0500 From: Segher Boessenkool To: HAO CHEN GUI Cc: gcc-patches , Bill Schmidt Subject: Re: [PATCH, rs6000] fix failure test cases caused by disabling mode promotion for pseudos [PR100952] Message-ID: <20210721225119.GM1583@gate.crashing.org> References: <3544e148-761a-1691-0b49-7d131739dd76@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3544e148-761a-1691-0b49-7d131739dd76@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Wed, 21 Jul 2021 22:52:22 -0000 Hi! On Tue, Jul 06, 2021 at 11:11:05AM +0800, HAO CHEN GUI wrote: >    The patch changed matching conditions in pr81384.c and pr56605.c. > The original conditions failed to match due to mode promotion disabled. > PR target/100952 > * gcc/testsuite/gcc.target/powerpc/pr56605.c: Change matching > conditions. > * gcc/testsuite/gcc.target/powerpc/pr81348.c: Likewise. > > diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c > index 29efd815adc..2b7ddbd7410 100644 > --- a/gcc/testsuite/gcc.target/powerpc/pr56605.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c > @@ -11,5 +11,5 @@ void foo (short* __restrict sb, int* __restrict ia) > ia[i] = (int) sb[i]; > } > > -/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\((?:and|zero_extend):DI \\\(reg:\[SD\]I" 1 "combine" } } */ > +/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\((?:and|zero_extend):SI \\\(subreg:SI \\\(reg:\[SD\]I" 1 "combine" } } */ So, this testcase only runs on 64-bit machines (even only on lp64 configurations). But do we now always get a subreg? And, can that change again some time in the future? Writing it as /* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):SI \(subreg:SI \(reg:[SD]I} 1 "combine" } } */ is easier to read btw. If you get a subreg:SI of a reg:SI here, something is wrong. And you cannot have a zero_extend:SI of anything :SI either. So what the original matched were (compare:CC (and:DI (reg:DI and (compare:CC (zero_extend:DI (reg:SI and now you want to allow a subreg:SI in that last one as well (and you do not really care what it is a subreg of, you don't check what offset anyway), so maybe just /* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:DI \((?:sub)?reg:[SD]I} 1 "combine" } } */ will do what you want? > --- a/gcc/testsuite/gcc.target/powerpc/pr81348.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr81348.c > @@ -19,5 +19,5 @@ void d(void) > ***c = e; > } > > -/* { dg-final { scan-assembler {\mlxsihzx\M} } } */ > -/* { dg-final { scan-assembler {\mvextsh2d\M} } } */ > +/* { dg-final { scan-assembler {\mlha\M} } } */ > +/* { dg-final { scan-assembler {\mmtvsrwa\M} } } */ (This test should not test for powerpc64*-*-* but powerpc*-*-* btw, and that means it can just be left out, so just /* { dg-do compile { target lp64 } } */ and nothing more). Okay for trunk with those changes (the RE and lp64). Thanks! (Test if it works of course; I did not :-) ) Segher