From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3940 invoked by alias); 9 Nov 2015 19:48:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 3866 invoked by uid 89); 9 Nov 2015 19:48:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 09 Nov 2015 19:48:41 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id tA9JmacM031453; Mon, 9 Nov 2015 13:48:36 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id tA9JmZAM031451; Mon, 9 Nov 2015 13:48:35 -0600 Date: Mon, 09 Nov 2015 19:48:00 -0000 From: Segher Boessenkool To: Michael Meissner , gcc-patches@gcc.gnu.org, dje.gcc@gmail.com Subject: Re: [PATCH], Add power9 support to GCC, patch #4 Message-ID: <20151109194835.GA31155@gate.crashing.org> References: <20151103202911.GA5304@ibm-tiger.the-meissners.org> <20151109003914.GD17170@ibm-tiger.the-meissners.org> <20151109162910.GA9602@gate.crashing.org> <20151109172734.GB32705@ibm-tiger.the-meissners.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151109172734.GB32705@ibm-tiger.the-meissners.org> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg01080.txt.bz2 On Mon, Nov 09, 2015 at 12:27:34PM -0500, Michael Meissner wrote: > On Mon, Nov 09, 2015 at 10:29:10AM -0600, Segher Boessenkool wrote: > > On Sun, Nov 08, 2015 at 07:39:14PM -0500, Michael Meissner wrote: > > > +;; Pretend we have a memory form of extswsli until register allocation is done > > > +;; so that we use LWZ to load the value from memory, instead of LWA. > > > > We generate sign_extend loads for many cases where zero_extend would be > > preferable. We should deal with that generically, and then we can lose > > this hack. > > Well it would be nice in theory. But since we don't have that generic pass, I > need to use the combiner to generate the instruction. Yes, it's for a todo list. And it doesn't have to be a separate pass, just a bit of tuning here or there. This is a lot of complex work to treat a special case of a more general problem. > > > +(define_insn_and_split "*ashdi3_extswsli_dot" > > > > ... > > > > > + if (REGNO (cr) == CR0_REGNO) > > > + { > > > + emit_insn (gen_ashdi3_extswsli_dot2 (dest, src2, shift, cr)); > > > + DONE; > > > + } > > > > s/dot2/dot/ > > No, it will endless recurse until there is a stack overflow if you use dot > (since it will call itself, generating the same pattern over and over again). Generating dot2 from dot does not make much sense, and dot2 calls itself as well. Are you sure? Something is off here. Cheers, Segher