From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19248 invoked by alias); 15 Jan 2013 14:41:20 -0000 Received: (qmail 18956 invoked by uid 48); 15 Jan 2013 14:40:52 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/21485] [4.6/4.7/4.8 Regression] missed load PRE, PRE makes i?86 suck Date: Tue, 15 Jan 2013 14:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.4 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-01/txt/msg01354.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21485 --- Comment #54 from Richard Biener 2013-01-15 14:40:39 UTC --- (In reply to comment #48) > I noticed PR 32120 is also involved. > > D.1716_7 = k_4 * 8; > D.1717_9 = array_8(D) + D.1716_7; > D.1718_10 = *D.1717_9; > k_11 = k_4 + 1; > D.1720_12 = k_11 * 8; > > > The D.1720_12 should be converted to D.1716_7 + 8. For this the straight-line strenght-reduction pass now does : _8 = i_6 * 8; _10 = array_9(D) + _8; _11 = *_10; i_12 = i_6 + 1; _13 = _8 + 8; _14 = array_9(D) + _13; _15 = *_14; replacing i_12 * 8 with _8 + 8. The association / CSE opportunity is undetected (maybe it makes sense to schedule pass_strength_reduction before the 2nd pass_reassoc?).