From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24525 invoked by alias); 8 Nov 2007 04:41:25 -0000 Received: (qmail 24513 invoked by uid 22791); 8 Nov 2007 04:41:24 -0000 X-Spam-Check-By: sourceware.org Received: from nikam-dmz.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Nov 2007 04:41:19 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 29025) id F1C1F5BA4A; Thu, 8 Nov 2007 05:41:16 +0100 (CET) Date: Thu, 08 Nov 2007 04:41:00 -0000 From: Zdenek Dvorak To: Sebastian Pop Cc: GCC Patches Subject: Re: Fix ICE in loop unrolling Message-ID: <20071108044116.GA11259@kam.mff.cuni.cz> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg00385.txt.bz2 Hi, > fixing one of the bugs of the loop distribution, I ended up fixing a > bug in the loop unrolling: try_unroll_loop_completely leaves the exit > edges that is intentional. > and does not update correctly the dominators information, Since it does not remove the exit edges, there is nothing to update. > so gcc > ends in an ICE just after the modified code in update_ssa that uses > this information. This is suspicious, though. Can you send me a testcase? > The proposed patch uses the exact same mechanism to > remove the unused edges as in tree_transform_and_unroll_loop. Although I thing the bug must be elsewhere, rewriting the function that way is a good idea, anyway: > > old_cond = COND_EXPR_COND (cond); > COND_EXPR_COND (cond) = dont_exit; Please remove also the unnecessary changes of the exit condition. Zdenek