From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15330 invoked by alias); 27 Feb 2013 09:41:06 -0000 Received: (qmail 12993 invoked by uid 48); 27 Feb 2013 09:40:11 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/56466] [4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1629 (loop with header n not in loop tree !) Date: Wed, 27 Feb 2013 09: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 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-02/txt/msg02570.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56466 --- Comment #4 from Richard Biener 2013-02-27 09:40:09 UTC --- RTL unrolling does excessive manual verify_loop_structure calls. I suppose we can either add an argument to verify_loop_structure to say whether to check only existing loops or remove the checking, or make sure to fixup loops. For sure checking the whole loop tree after processing one innermost loop is excessive: /* Depending on FLAGS, check whether to peel loops completely and do so. */ static void peel_loops_completely (int flags) { struct loop *loop; loop_iterator li; /* Scan the loops, the inner ones first. */ FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) { ... if (loop->lpt_decision.decision == LPT_PEEL_COMPLETELY) { report_unroll_peel (loop, locus); peel_loop_completely (loop); #ifdef ENABLE_CHECKING verify_loop_structure (); #endif } } I'd have a changed flag and do a single if (changed) fix_loop_structure (NULL); which also does the verification at the end. Same applies to the loop in the caller.