From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29675 invoked by alias); 15 Feb 2013 10:17:48 -0000 Received: (qmail 29598 invoked by uid 48); 15 Feb 2013 10:17:20 -0000 From: "steven at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/56339] [4.8 Regression]: Suboptimal register allocation Date: Fri, 15 Feb 2013 10:17: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: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: steven at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: 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 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 X-SW-Source: 2013-02/txt/msg01559.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56339 --- Comment #3 from Steven Bosscher 2013-02-15 10:17:19 UTC --- Before regmove, both input operands die in insn 12: 12: r67:DF=r66:DF+r64:DF REG_DEAD r66:DF REG_DEAD r64:DF and because reg classes haven't been set up, r66 and r67 both have GENERAL_REGS as their preferred register class so regmove doesn't see that r64 and r67 share the same preferred register %xmm0: Breakpoint 1, regmove_backward_pass () at ../../trunk/gcc/regmove.c:1088 1088 if (dump_file) (gdb) p reg_preferred_class (64) $10 = GENERAL_REGS (gdb) p reg_preferred_class (66) $11 = GENERAL_REGS (gdb) p reg_preferred_class (67) $12 = GENERAL_REGS (gdb) p ira_set_pseudo_classes (true, dump_file) $13 = void (gdb) p reg_preferred_class (64) $14 = SSE_FIRST_REG (gdb) p reg_preferred_class (66) $15 = SSE_REGS (gdb) p reg_preferred_class (67) $16 = SSE_FIRST_REG (gdb)