From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24190 invoked by alias); 24 Dec 2004 12:52:41 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24161 invoked by uid 48); 24 Dec 2004 12:52:34 -0000 Date: Fri, 24 Dec 2004 12:52:00 -0000 Message-ID: <20041224125234.24160.qmail@sourceware.org> From: "steven at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041216155140.19038.dje@gcc.gnu.org> References: <20041216155140.19038.dje@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/19038] [4.0 Regression] out-of ssa causing loops to have more than one BB X-Bugzilla-Reason: CC X-SW-Source: 2004-12/txt/msg03463.txt.bz2 List-Id: ------- Additional Comments From steven at gcc dot gnu dot org 2004-12-24 12:52 ------- Silly bugzilla... Sorry about that. A piece of unidiff, then. (-) is the smaller test that works, (+) is the test where we get the extra copy. What I wanted to show is that only the root variable is different in the PHI argument: @@ -28,10 +29,10 @@ # BLOCK 1 # PRED: 0 [100.0%] (fallthru,exec) 1 [89.0%] (dfs_back,false,exec) - # temp2D.1464_1 = PHI ; + # temp2D.1464_1 = PHI ; :; - temp2D.1464_4 = temp2D.1464_1 * xlvj_D.1465_3; - if (temp2D.1464_4 != 0) goto ; else goto ; + temp1D.1468_4 = temp2D.1464_1 * xlvj_D.1465_3; + if (temp1D.1468_4 != 0) goto ; else goto ; # SUCC: 2 [11.0%] (loop_exit,true,exec) 1 [89.0%] (dfs_back,false,exec) # BLOCK 2 @@ -48,45 +49,45 @@ This comes from DOM copy-proping around the loop. Before DOM1 we have a function that looks like this (.dce1): ;; Function f (f) f (temp2, xlvj_) { int temp1; int D.1471; # temp2_1 = PHI ; :; temp1_4 = temp2_1 * xlvj__3; temp2_5 = temp1_4; if (temp1_4 != 0) goto ; else goto ; :; xlvj__6 = xlvj__3; return xlvj__6; } After DOM1 (the .dom1 dump) we have this: ;; Function f (f) f (temp2, xlvj_) { int temp1; int D.1471; # temp2_1 = PHI ; :; temp1_4 = temp2_1 * xlvj__3; temp2_5 = temp1_4; if (temp1_4 != 0) goto ; else goto ; :; xlvj__6 = xlvj__3; return xlvj__3; } We never recover from this, we don't coalesce, and there's your copy. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19038