From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23593 invoked by alias); 18 Nov 2014 12:38: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 23584 invoked by uid 89); 18 Nov 2014 12:38:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 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; Tue, 18 Nov 2014 12:38:54 +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 sAICcnhC009040; Tue, 18 Nov 2014 06:38:50 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id sAICcnss009039; Tue, 18 Nov 2014 06:38:49 -0600 Date: Tue, 18 Nov 2014 12:52:00 -0000 From: Segher Boessenkool To: Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH 5/5] combine: preferably delete dead SETs in PARALLELs Message-ID: <20141118123849.GA7676@gate.crashing.org> References: <6d31ccdf868ceee465d89fbc6ae80c141244f42b.1415984897.git.segher@kernel.crashing.org> <546A64F2.1040700@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <546A64F2.1040700@redhat.com> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg02273.txt.bz2 On Mon, Nov 17, 2014 at 02:13:22PM -0700, Jeff Law wrote: > On 11/14/14 12:19, Segher Boessenkool wrote: > >If the result of combining some insns is a PARALLEL of two SETs, and that > >is not a recognised insn, and one of the SETs is dead, combine tries to > >use the remaining SET as insn. > > > >This patch changes things around so that the one SET is preferably used, > >not the PARALLEL. > > > > > >2014-11-14 Segher Boessenkool > > > >gcc/ > > * combine.c (try_combine): Prefer to delete dead SETs inside > > a PARALLEL over keeping them. > OK. Can this go forward independent of the other changes? Seems like > it should. Yes, only 4 depends on 3, the rest are independent patches. > Does it help pr52714 where we'd like to rip apart a PARALLEL with two > sets, one of which is dead. If so, it might allow us to optimize that > code better. It does not seem to fix the testcase. I'll investigate why not. You're talking about the (parallel [(set (pc) (pc)) (set (X) (sp))]) right? I guess the "set pc pc" is not marked as unused... > Granted, it originally was an m68k issue, but presumably > it's happening eleswhere or you wouldn't be poking at it :-) The case that made me do this is PowerPC, where (with more patches) for long long subfM1(long long a) { return 0x1ffffffff - a; } we generated (-m32) subfic 4,4,-1 ; subfic 3,3,1 where that first subfic is (parallel [(set (reg 4) (not (reg 4))) (set (ca) (const_int 1))]) with that second set dead, so we can just do not 4,4 ; subfic 3,3,1 which is cheaper. Segher