From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29768 invoked by alias); 23 Dec 2011 21:47:37 -0000 Received: (qmail 29759 invoked by uid 22791); 23 Dec 2011 21:47:36 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Dec 2011 21:47:12 +0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/48641] [4.7 Regression] ICE: verify_flow_info failed: Wrong frequency of block 77 -419530 with -O -fno-tree-ccp -fno-tree-copy-prop Date: Fri, 23 Dec 2011 22:01: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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.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: 2011-12/txt/msg02563.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48641 --- Comment #4 from Jan Hubicka 2011-12-23 21:47:08 UTC --- OK, the problem is that profile is wrong and jump threading gets into conflicting results and the results are propagated through the testcase because of specific CFG. I think all we can do is to add capping. I am testing Index: tree-ssa-threadupdate.c =================================================================== --- tree-ssa-threadupdate.c (revision 182657) +++ tree-ssa-threadupdate.c (working copy) @@ -513,7 +513,11 @@ redirect_edges (void **slot, void *data) e->src->index, e->dest->index, rd->dup_block->index); rd->dup_block->count += e->count; - rd->dup_block->frequency += EDGE_FREQUENCY (e); + + /* Excessive jump threading may make frequencies large enough so + the computation overflows. */ + if (rd->dup_block->frequency < BB_FREQ_MAX * 2) + rd->dup_block->frequency += EDGE_FREQUENCY (e); EDGE_SUCC (rd->dup_block, 0)->count += e->count; /* Redirect the incoming edge to the appropriate duplicate block. */