From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8871 invoked by alias); 29 Apr 2014 09:21:44 -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 8811 invoked by uid 48); 29 Apr 2014 09:21:40 -0000 From: "abel at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/60901] [4.8/4.9/4.10 Regression] ICE: SIGSEGV in add_to_deps_list with -fsel-sched-pipelining-outer-loops Date: Tue, 29 Apr 2014 09:21: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-Version: 4.10.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: abel at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: abel at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.3 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: 2014-04/txt/msg02123.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60901 Andrey Belevantsev changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |abel at gcc dot gnu.org --- Comment #3 from Andrey Belevantsev --- The ix86_dependencies_evaluation_hook has the following code: 26230 /* Assume that region is SCC, i.e. all immediate predecessors 26231 of non-head block are in the same region. */ 26232 FOR_EACH_EDGE (e, ei, bb->preds) 26233 { The comment is wrong for selective scheduling with pipelining of outer loops enabled, as the regions then are formed started from the innermost loops and going up to the outer loops. So there could be a hole in the outer loop region. Fixed easily below like this, the comment has also to be adjusted of course. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 895ebbb..3f572fc 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -26233,7 +26233,8 @@ ix86_dependencies_evaluation_hook (rtx head, rtx tail) { /* Avoid creating of loop-carried dependencies through using topological odering in region. */ - if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index)) + if (rgn == CONTAINING_RGN (e->src->index) + && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index)) add_dependee_for_func_arg (first_arg, e->src); } }