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 4A92B385802E for ; Wed, 14 Jul 2021 21:23:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4A92B385802E 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 16ELM7ei017439; Wed, 14 Jul 2021 16:22:07 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 16ELM6UR017438; Wed, 14 Jul 2021 16:22:06 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 14 Jul 2021 16:22:06 -0500 From: Segher Boessenkool To: Michael Meissner , gcc-patches@gcc.gnu.org, David Edelsohn , Bill Schmidt , Peter Bergner , Will Schmidt Subject: Re: Repost #2: [PATCH] PR 100170: Fix eq/ne tests on power10. Message-ID: <20210714212206.GE1583@gate.crashing.org> References: <20210714175205.GA4593@ibm-toto.the-meissners.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210714175205.GA4593@ibm-toto.the-meissners.org> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no 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, 14 Jul 2021 21:23:09 -0000 On Wed, Jul 14, 2021 at 01:52:05PM -0400, Michael Meissner wrote: > This patch updates eq/ne tests in the testsuite to adjust the test if > power10 code generation is used. eq0/ne0. > --- a/gcc/testsuite/gcc.target/powerpc/ppc-eq0-1.c > +++ b/gcc/testsuite/gcc.target/powerpc/ppc-eq0-1.c > -/* { dg-final { scan-assembler "cntlzw|isel" } } */ > +/* { dg-final { scan-assembler {\mcntlzw|isel|setbc\M} } } */ This does not do wha you perhaps think it does. It looks for one of the three atoms "\mcntlzw", "isel", or "setbc\M". You should write \m(cntlzw|isel|setbc)\M or, if you need it to not capture (like in a scan-assembler-times) \m(?:cntlzw|isel|setbc)\M > --- a/gcc/testsuite/gcc.target/powerpc/ppc-ne0-1.c > +++ b/gcc/testsuite/gcc.target/powerpc/ppc-ne0-1.c > -/* { dg-final { scan-assembler-times "addic" 4 } } */ > -/* { dg-final { scan-assembler-times "subfe" 1 } } */ > -/* { dg-final { scan-assembler-times "addze" 3 } } */ > +/* { dg-final { scan-assembler-times {\maddic\M} 4 { target { ! has_arch_pwr10 } } } } */ > +/* { dg-final { scan-assembler-times {\msubfe\M} 1 { target { ! has_arch_pwr10 } } } } */ > +/* { dg-final { scan-assembler-times {\maddic\M} 3 { target { has_arch_pwr10 } } } } */ > +/* { dg-final { scan-assembler-not {\msubfe\M} { target { has_arch_pwr10 } } } } */ > +/* { dg-final { scan-assembler-times {\msetbcr\M} 1 { target { has_arch_pwr10 } } } } */ > +/* { dg-final { scan-assembler-times {\maddze\M} 3 } } */ It may be easier to split the patch into two, where one part can get the setbcr (the first, simplest function), and the rest stays the same. Okay for trunk like that. Thanks! Segher