From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89963 invoked by alias); 7 Oct 2015 22:37:16 -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 89950 invoked by uid 89); 7 Oct 2015 22:37:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 07 Oct 2015 22:37:13 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 4C7C08EA4C; Wed, 7 Oct 2015 22:37:11 +0000 (UTC) Received: from freie.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t97Mb7tC024596 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 7 Oct 2015 18:37:10 -0400 Received: from livre.home (livre.home [172.31.160.2]) by freie.home (8.14.9/8.14.9) with ESMTP id t97MagFG017832; Wed, 7 Oct 2015 19:36:42 -0300 From: Alexandre Oliva To: Szabolcs Nagy Cc: Alan Lawrence , Jeff Law , James Greenhalgh , "H.J. Lu" , Segher Boessenkool , Richard Biener , GCC Patches , Christophe Lyon , David Edelsohn , Eric Botcazou Subject: Re: [PR64164] drop copyrename, integrate into expand References: <20150723203112.GB27818@gate.crashing.org> <20150810082355.GA31149@arm.com> <55C8BFC3.3030603@redhat.com> <55E72D4C.40705@arm.com> <55FC3171.7040509@arm.com> <560A6B26.7010701@arm.com> Date: Wed, 07 Oct 2015 22:37:00 -0000 In-Reply-To: <560A6B26.7010701@arm.com> (Szabolcs Nagy's message of "Tue, 29 Sep 2015 11:42:46 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2015-10/txt/msg00763.txt.bz2 On Sep 29, 2015, Szabolcs Nagy wrote: > this commit > commit 33cc9081157a8c90460e4c0bdda2ac461a3822cc > Author: aoliva > Date: 2015-09-27 09:02:00 +0000 > revert to assign_parms assignments using default defs > ... > introduced a test failure on arm-none-eabi (using newlib, compiling > with -mthumb -march=armv8-a -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard ): > FAIL: gcc.target/arm/pr43920-2.c scan-assembler-times pop 2 Thanks for the report. The problem here is that we don't allocate the pseudo assigned to to r0. That's because we coalesce versions with another variable that crosses a function call. We do that because uncprop brings these unrelated variables, that happen to contain the same -1 value we want to return, into the PHI node with the final value. We can't coalesce both start and end with , because start and end conflict, but by chance we try start first, and that succeeds. If we tried end first (e.g., by giving it a higher coalesce priority, because fewer calls are crossed by its value in the path to the relevant edge), we could have got the coalesced variable assigned to r0, and that would enable us to optimize out the copy to r0 before return, and so merge the return-only basic block with other blocks. But ATM we don't take the definition point or path to the edge into account when computing coalesce costs, so we can't deterministically do better for this testcase, and I'm not sure using these additional information would make it better overall. Compiling with -fno-tree-dominator-opts skips uncprop so that we don't even try to coalesce other variables with , so we get the code expected by the testcase. But we obviously don't want to disable this optimization in general. Any other thoughts, anyone? -- Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/ You must be the change you wish to see in the world. -- Gandhi Be Free! -- http://FSFLA.org/ FSF Latin America board member Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer