From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30107 invoked by alias); 13 Sep 2011 15:25:31 -0000 Received: (qmail 30096 invoked by uid 22791); 13 Sep 2011 15:25:30 -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; Tue, 13 Sep 2011 15:24:44 +0000 From: "wschmidt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/50183] ICE in verify_ssa for 416.gamess when optimizing using profile data Date: Tue, 13 Sep 2011 15:56: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: wschmidt at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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-09/txt/msg00912.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50183 --- Comment #9 from William J. Schmidt 2011-09-13 15:24:08 UTC --- OK, the problem appears to originate earlier, sometime during canonicalize_loop_closed_ssa_form (). After canonicalization, we have: : # err2.395_571 = PHI # err2_lsm.820_574 = PHI This violates the last documented condition of canonicalized loop-closed SSA form: /* Converts the current loop closed SSA form to a canonical form expected by the Graphite code generation. The loop closed SSA form has the following invariant: a variable defined in a loop that is used outside the loop appears only in the phi nodes in the destination of the loop exit. These phi nodes are called close phi nodes. The canonical loop closed SSA form contains the extra invariants: - when the loop contains only one exit, the close phi nodes contain only one argument. That implies that the basic block that contains the close phi nodes has only one predecessor, that is a basic block in the loop. - the basic block containing the close phi nodes does not contain other statements. - there exist only one phi node per definition in the loop. */ The definition of err2.395_561 in block 43 reaches both of these PHIs. Furthermore, the PHIs indicate the definition is in the newly introduced block 73, which is not the case: : # err2.395_561 = PHI : n_223 = n_33 + 1; if (n_33 == 12) goto ; else goto ; I'll dig into the canonicalization code to see what's going on.