From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10595 invoked by alias); 14 Jan 2015 12:00:21 -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 10414 invoked by uid 55); 14 Jan 2015 12:00:04 -0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/64541] FRE pass optimization failure Date: Wed, 14 Jan 2015 12:00: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-Version: 5.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg01175.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64541 --- Comment #3 from rguenther at suse dot de --- On Wed, 14 Jan 2015, skvadrik at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64541 > > --- Comment #2 from Ulya --- > > we have to assume that p == q and thus the store to *q invalidates the previously load *p > > I see. > It seemed to me from GIMPLE dumps that both cases are equally easy to optimize, > perhaps I'm missing something. 1: _6 = *p_2(D); *q_7(D) = _6; _9 = *q_7(D); _10 = *_9; it's easy to see that the load _9 = *q_7(D) results in _6. 2: *p_2(D) = _4; _6 = *p_2(D); *q_7(D) = _6; _9 = *p_2(D); _10 = *_9; not so much here for the load _9 = *p_2(D) as I explained (the store *q_7(D) = _6 aliases it)