From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4860 invoked by alias); 4 Feb 2013 10:34:41 -0000 Received: (qmail 1401 invoked by uid 48); 4 Feb 2013 10:34:25 -0000 From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/56151] [4.8 Regression] Performance degradation after r194054 on x86 Atom. Date: Mon, 04 Feb 2013 10:34: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 X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou 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: 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 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/msg00246.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56151 Eric Botcazou changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ebotcazou at gcc dot | |gnu.org --- Comment #5 from Eric Botcazou 2013-02-04 10:34:25 UTC --- > Patch to help explain the problem: > > Index: optabs.c > =================================================================== > --- optabs.c (revision 195687) > +++ optabs.c (working copy) > @@ -1452,8 +1452,13 @@ expand_binop_directly (enum machine_mode > { > /* If PAT is composed of more than one insn, try to add an appropriate > REG_EQUAL note to it. If we can't because TEMP conflicts with an > - operand, call expand_binop again, this time without a target. */ > + operand, call expand_binop again, this time without a target. > + > + However, if target is a MEM, just accept the lossage of not having > + a REG_EQUAL note. This avoids splitting up insns of the form > + "MEM=MEM op X", a form we may not be able to reconstruct later. */ > if (INSN_P (pat) && NEXT_INSN (pat) != NULL_RTX > + && ! (target && MEM_P (target)) > && ! add_equal_note (pat, ops[0].value, optab_to_code (binoptab), > ops[1].value, ops[2].value)) > { I agree that we should try to do something like that. Generating inferior code to be able to add a REG_EQUAL that doesn't help in the end isn't very clever. There is also the same pattern in expand_unop_direct. Is that the "maximal" test that can be added to catch this case or could it be made more precise?