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 4BC50386EC78 for ; Mon, 21 Sep 2020 15:58:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4BC50386EC78 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@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 08LFu6k2025823; Mon, 21 Sep 2020 10:56:06 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 08LFu66I025822; Mon, 21 Sep 2020 10:56:06 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 21 Sep 2020 10:56:06 -0500 From: Segher Boessenkool To: Alan Modra Cc: gcc-patches@sourceware.org, Peter Bergner Subject: Re: [RS6000] rotate and mask constants Message-ID: <20200921155606.GB28786@gate.crashing.org> References: <20200915011946.3395-1-amodra@gmail.com> <20200915011946.3395-9-amodra@gmail.com> <20200915071608.GJ5452@bubble.grove.modra.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200915071608.GJ5452@bubble.grove.modra.org> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Mon, 21 Sep 2020 15:58:09 -0000 On Tue, Sep 15, 2020 at 04:46:08PM +0930, Alan Modra wrote: > On Tue, Sep 15, 2020 at 10:49:46AM +0930, Alan Modra wrote: > > Implement more two insn constants. > > And tests. rot_cst1 checks the values generated, rot_cst2 checks > instruction count. > > * gcc.target/powerpc/rot_cst.h, > * gcc.target/powerpc/rot_cst1.c, > * gcc.target/powerpc/rot_cst2.c: New tests. > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/rot_cst1.c > @@ -0,0 +1,68 @@ > +/* { dg-do run { target lp64 } } */ This doesn't need lp64. > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/rot_cst2.c > @@ -0,0 +1,6 @@ > +/* { dg-do compile { target lp64 } } */ > +/* { dg-options "-O2" } */ > + > +#include "rot_cst.h" > + > +/* { dg-final { scan-assembler-times {(?n)^\s+[a-z]} 122 } } */ Please write (in comments) how much of each insn are expected, and possibly for what function? Also, bonus points if you make this work for 32 bit as well (it is almost required even). Segher