From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30098 invoked by alias); 12 Nov 2014 01:29:56 -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 30086 invoked by uid 89); 12 Nov 2014 01:29:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: e39.co.us.ibm.com Received: from e39.co.us.ibm.com (HELO e39.co.us.ibm.com) (32.97.110.160) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 12 Nov 2014 01:29:54 +0000 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 11 Nov 2014 18:29:52 -0700 Received: from d01dlp03.pok.ibm.com (9.56.250.168) by e39.co.us.ibm.com (192.168.1.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 11 Nov 2014 18:29:51 -0700 Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id ACA31C90052 for ; Tue, 11 Nov 2014 20:19:28 -0500 (EST) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sAC1RORs21627088 for ; Wed, 12 Nov 2014 01:27:24 GMT Received: from d01av02.pok.ibm.com (localhost [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sAC1RN5D021804 for ; Tue, 11 Nov 2014 20:27:23 -0500 Received: from ibm-tiger.the-meissners.org (dhcp-9-32-77-206.usma.ibm.com [9.32.77.206]) by d01av02.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sAC1RNZj021774; Tue, 11 Nov 2014 20:27:23 -0500 Received: by ibm-tiger.the-meissners.org (Postfix, from userid 500) id AC6D04205F; Tue, 11 Nov 2014 20:27:22 -0500 (EST) Date: Wed, 12 Nov 2014 01:54:00 -0000 From: Michael Meissner To: Segher Boessenkool Cc: Michael Meissner , Alan Lawrence , "gcc-patches@gcc.gnu.org" , David Edelsohn Subject: Re: [PATCH 10/11][RS6000] Migrate reduction optabs to reduc_..._scal Message-ID: <20141112012722.GA5485@ibm-tiger.the-meissners.org> Mail-Followup-To: Michael Meissner , Segher Boessenkool , Alan Lawrence , "gcc-patches@gcc.gnu.org" , David Edelsohn References: <544A3E0B.2000803@arm.com> <544A40D1.1040605@arm.com> <20141110223624.GA19330@ibm-tiger.the-meissners.org> <20141111071001.GA15842@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141111071001.GA15842@gate.crashing.org> User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14111201-0033-0000-0000-000002A6AEDB X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg01119.txt.bz2 On Tue, Nov 11, 2014 at 01:10:01AM -0600, Segher Boessenkool wrote: > On Mon, Nov 10, 2014 at 05:36:24PM -0500, Michael Meissner wrote: > > However, the double pattern is completely broken. This cannot go in. > > [snip] > > > It is unacceptable to have to do the inner loop doing a load, vector add, and > > store in the loop. > > Before the patch, the final reduction used *vsx_reduc_splus_v2df; after > the patch, it is *vsx_reduc_plus_v2df_scalar. The former does a vector > add, the latter a float add. And it uses the same pseudoregister for the > accumulator throughout. IRA decides a register is more expensive than > memory for this, I suppose because it wants both V2DF and DF? It doesn't > seem to like the subreg very much. I haven't looked into in detail (I've been a little busy with th upper regs patch), but I suspect the problem is that 128-bit and 64-bit types cannot overlap (i.e. rs6000_cannot_change_mode_class returns true). This is due to the fact that scalars in VSX registers occupy the upper 64-bits, which would not match the compiler's notion of that it should be in the bottom 64-bits. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797