From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9240 invoked by alias); 10 Jan 2013 15:02:55 -0000 Received: (qmail 9173 invoked by uid 48); 10 Jan 2013 15:02:38 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/55833] [4.6/4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1582 (BB should be marked irreducible !) Date: Thu, 10 Jan 2013 15:02: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-Keywords: 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/msg00943.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55833 --- Comment #6 from Richard Biener 2013-01-10 15:02:37 UTC --- By unswitching on an exit test that exits to the enclosing loop we create an unswitched loop that is now reached by what looks like an exit test of the outer loop which is part of an irreducible region. I'm not sure we can reliably detect all cases we need to manually mark the entry edge for. So ... re-mark_irreducible_loops () after each transform? And cheaper checking by Index: loop-unswitch.c =================================================================== --- loop-unswitch.c (revision 195085) +++ loop-unswitch.c (working copy) @@ -145,12 +145,7 @@ unswitch_loops (void) /* Go through inner loops (only original ones). */ FOR_EACH_LOOP (li, loop, LI_ONLY_INNERMOST) - { - unswitch_single_loop (loop, NULL_RTX, 0); -#ifdef ENABLE_CHECKING - verify_loop_structure (); -#endif - } + unswitch_single_loop (loop, NULL_RTX, 0); iv_analysis_done (); } @@ -370,6 +365,10 @@ unswitch_single_loop (struct loop *loop, nloop = unswitch_loop (loop, bbs[i], copy_rtx_if_shared (cond), cinsn); gcc_assert (nloop); +#ifdef ENABLE_CHECKING + verify_loop_structure (); +#endif + /* Invoke itself on modified loops. */ unswitch_single_loop (nloop, rconds, num + 1); unswitch_single_loop (loop, conds, num + 1);