From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103124 invoked by alias); 6 Nov 2015 22:00:26 -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 103046 invoked by uid 89); 6 Nov 2015 22:00:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD 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; Fri, 06 Nov 2015 22:00:19 +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 tA6M095N019666; Fri, 6 Nov 2015 16:00:09 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id tA6M08Xu019665; Fri, 6 Nov 2015 16:00:08 -0600 Date: Fri, 06 Nov 2015 22:00:00 -0000 From: Segher Boessenkool To: Jeff Law Cc: Kyrill Tkachov , gcc Patches Subject: Re: [PATCH][combine][RFC] Don't transform sign and zero extends inside mults Message-ID: <20151106220008.GA19110@gate.crashing.org> References: <56376FFF.3070008@arm.com> <20151104235015.GA13203@gate.crashing.org> <563B4516.5090001@arm.com> <20151106005636.GA31412@gate.crashing.org> <563CB6DE.7070106@arm.com> <563D1824.8000607@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <563D1824.8000607@redhat.com> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00742.txt.bz2 [ reordered a bit ] On Fri, Nov 06, 2015 at 02:14:12PM -0700, Jeff Law wrote: > On 11/06/2015 07:19 AM, Kyrill Tkachov wrote: > >>>I think we should also add: > >>> && REG_P (XEXP (XEXP (x, 0), 0)) > >>> && REG_P (XEXP (XEXP (x, 1), 0)) > I tend to agree. > >Indeed, this looks better but it still needs the REG_P checks for the inner > >operands of the extends to not screw up the arm case. > >P.S. Do we want to restrict this to targets that have a widening mul > >optab like I did in the original patch? > I don't think it's necessary or desirable. With the REG_P checks added, now simplification is only stopped for widening muls of registers, so all is fine -- any such construct _is_ a widening multiplication! This patch stops combine from generating widening muls of anything else but registers (immediates, memory, ...). This probably is a reasonable tradeoff for all targets, even those (if any) that have such insns. > >I'll let you put it through it's paces on your setup :) > I'll let Segher give the final yes/no on this, but it generally looks > good to me. It looks okay to me too. Testing now, combine patches have the tendency to do unforeseen things on other targets ;-) Segher