From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28984 invoked by alias); 2 May 2013 03:03:39 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28937 invoked by uid 48); 2 May 2013 03:03:35 -0000 From: "vmakarov at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/57131] [4.8/4.9 Regression] Wrong register assignment? Date: Thu, 02 May 2013 03:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vmakarov at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.1 X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-05/txt/msg00052.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57131 Vladimir Makarov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at redhat dot com --- Comment #3 from Vladimir Makarov 2013-05-02 03:03:34 UTC --- (In reply to comment #2) > Apparently went away with the http://gcc.gnu.org/r198432 fix, but it isn't > clear whether that change was meant to fix this or just made the bug latent. > Anyway, still reproduceable on the 4.8 branch. > What I'm seeing before that change is that extendsidi2_1 pattern with MEM > destination LRA chooses %ebx as (clobber (scratch:SI)) register, eventhough > %ebx > is live across that instruction (there is > (insn 14 74 68 2 (set (reg:SI 3 bx [orig:83 D.1395 ] [83]) > (mem/v/c:SI (plus:SI (reg/f:SI 7 sp) > (const_int 72 [0x48])) [0 x4+0 S4 A64])) pr57131.c:11 85 > {*movsi_internal} > (nil)) > (insn 68 14 73 2 (set (reg:SI 3 bx [orig:83 D.1395 ] [83]) > (reg:SI 3 bx [orig:83 D.1395 ] [83])) pr57131.c:11 85 {*movsi_internal} > (expr_list:REG_DEAD (reg:SI 3 bx [orig:83 D.1395 ] [83]) > (nil))) > some insns before it and: > (insn 65 24 26 2 (set (reg:SI 5 di [orig:83 D.1395 ] [83]) > (reg:SI 3 bx [orig:83 D.1395 ] [83])) pr57131.c:11 85 {*movsi_internal} > (expr_list:REG_DEAD (reg:SI 3 bx [orig:83 D.1395 ] [83]) > (nil))) > some insns after it. Not sure if the noop move with REG_DEAD has anything to > do with that. Vlad, can you please have a look? http://gcc.gnu.org/r198432 was a right solution for this bug. LRA don't pay attention to NO_REGS pseudos during assignment although ebx was assigned to NO_REGS r95 (which is reflected in reg_renumber). At some points of LRA work reg notes can be invalid. LRA makes them up to date after live subpass (lra-lives.c). It needs only correct live info on bb borders. So I'd close this PR.