From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44922 invoked by alias); 8 Jul 2015 11:13:52 -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 44882 invoked by uid 48); 8 Jul 2015 11:13:48 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap Date: Wed, 08 Jul 2015 11:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 6.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to 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-07/txt/msg00630.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66801 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #3 from Richard Biener --- Hmpf. Can't see why it should - I suppose the only "questionable" hunk _may_ be + /* Visit the statement only if its block is marked executable. + If it is not executable then it will be visited when we simulate + all statements in the block as soon as an incoming edge gets + marked executable. */ + if (!bitmap_bit_p (executable_blocks, bb->index)) + { + if (dump_file && (dump_flags & TDF_DETAILS)) + { + fprintf (dump_file, "\nDropping statement from SSA worklist: "); + print_gimple_stmt (dump_file, stmt, 0, dump_flags); + } + continue; ... + simulate_stmt (stmt); - /* PHI nodes are always visited, regardless of whether or not - the destination block is executable. Otherwise, visit the - statement only if its block is marked executable. */ - if (gimple_code (stmt) == GIMPLE_PHI - || bitmap_bit_p (executable_blocks, bb->index)) - simulate_stmt (stmt); + return true; Thus, does the following fix it? (I'd have to try reproducing it first) Index: gcc/tree-ssa-propagate.c =================================================================== --- gcc/tree-ssa-propagate.c (revision 225534) +++ gcc/tree-ssa-propagate.c (working copy) @@ -444,7 +444,8 @@ process_ssa_edge_worklist (vec * If it is not executable then it will be visited when we simulate all statements in the block as soon as an incoming edge gets marked executable. */ - if (!bitmap_bit_p (executable_blocks, bb->index)) + if (gimple_code (stmt) != GIMPLE_PHI + && !bitmap_bit_p (executable_blocks, bb->index)) { if (dump_file && (dump_flags & TDF_DETAILS)) { not that I have an idea _why_ it should fix something.