From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6166 invoked by alias); 17 Sep 2008 14:26:33 -0000 Received: (qmail 3929 invoked by uid 48); 17 Sep 2008 14:25:05 -0000 Date: Wed, 17 Sep 2008 14:26:00 -0000 Message-ID: <20080917142505.3928.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/37102] [4.3/4.4 Regression] out-of-SSA is broken In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" 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: 2008-09/txt/msg02015.txt.bz2 ------- Comment #12 from rguenth at gcc dot gnu dot org 2008-09-17 14:25 ------- Ok, so I think we should be fine if we ignore PHI nodes with zero-use results during building the elimination graph - chained unused PHIs will have lifeness computed for all but the PHI node with the zero-use result. So, on the 4.3 branch the following fixes the failure for me: Index: tree-outof-ssa.c =================================================================== *** tree-outof-ssa.c (revision 140417) --- tree-outof-ssa.c (working copy) *************** eliminate_build (elim_graph g, basic_blo *** 321,326 **** --- 321,329 ---- for (phi = phi_nodes (B); phi; phi = PHI_CHAIN (phi)) { + if (has_zero_uses (PHI_RESULT (phi))) + continue; + T0 = var_to_partition_to_var (g->map, PHI_RESULT (phi)); /* Ignore results which are not in partitions. */ I am now giving this testing. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37102