From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17365 invoked by alias); 4 Feb 2013 12:04:21 -0000 Received: (qmail 17262 invoked by uid 48); 4 Feb 2013 12:03:54 -0000 From: "jakub 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 12:04: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: jakub 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/msg00252.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56151 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |uros at gcc dot gnu.org --- Comment #6 from Jakub Jelinek 2013-02-04 12:03:52 UTC --- Well, we already have peephole2s for MEM op= ARG (the TARGET_READ_MODIFY_WRITE guarded peephole2s), the reason why it doesn't trigger in this case is that ARG in this case ends up being a MEM, and MEM op= MEM2 isn't a valid insn: (insn 95 94 96 11 (set (reg:SI 3 bx [orig:135 D.1801 ] [135]) (mem:SI (reg/f:SI 4 si [orig:86 D.1803 ] [86]) [2 *_41+0 S4 A32])) pr56151.c:32 89 {*movsi_internal} (nil)) (insn 96 95 97 11 (parallel [ (set (reg:SI 3 bx [orig:135 D.1801 ] [135]) (ior:SI (reg:SI 3 bx [orig:135 D.1801 ] [135]) (mem:SI (plus:SI (mult:SI (reg:SI 6 bp [orig:132 D.1801 ] [132]) (const_int 4 [0x4])) (symbol_ref:SI ("setmask") )) [2 setmask S4 A32]))) (clobber (reg:CC 17 flags)) ]) pr56151.c:32 421 {*iorsi_1} (expr_list:REG_DEAD (reg:SI 6 bp [orig:132 D.1801 ] [132]) (nil))) (insn 97 96 98 11 (set (mem:SI (reg/f:SI 4 si [orig:86 D.1803 ] [86]) [2 *_41+0 S4 A32]) (reg:SI 3 bx [orig:135 D.1801 ] [135])) pr56151.c:32 89 {*movsi_internal} (expr_list:REG_DEAD (reg:SI 3 bx [orig:135 D.1801 ] [135]) (expr_list:REG_DEAD (reg/f:SI 4 si [orig:86 D.1803 ] [86]) (nil)))) I guess for temp = MEM; temp op= MEM2; MEM = temp; for temp dead afterwards (this case), we could as well just add another set of the (up to 3?) peephole2's, that would transform that into temp = MEM2; MEM op= temp; instead.