From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7596 invoked by alias); 21 Jan 2005 13:22:38 -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 7546 invoked by alias); 21 Jan 2005 13:22:32 -0000 Date: Fri, 21 Jan 2005 13:22:00 -0000 Message-ID: <20050121132232.7544.qmail@sourceware.org> From: "rakdver at atrey dot karlin dot mff dot cuni dot cz" 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: 2005-01/txt/msg03015.txt.bz2 List-Id: ------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz 2005-01-21 13:22 ------- Subject: Re: [4.0 Regression] out of ssa causing loops to have more than one BB > No, tree-ssa-live is quite right. ivtmp.3_12 and ivtmp.3_20 are defined > and live at some common statements, so they conflict: > > # BLOCK 1 > # PRED: 0 [88.4%] (true,exec) 1 [89.0%] (dfs_back,false,exec) > # ivtmp.3_12 = PHI <0(0), ivtmp.3_20(1)>; > :; > D.501_28 = &__BLNK__.array1[ivtmp.3_12]; > # __BLNK___11 = V_MAY_DEF <__BLNK___2>; > *D.501_28 = 1.0e+0; > ivtmp.3_20 = ivtmp.3_12 + 1; > D.503_30 = D.457_4 - 1; > D.504_31 = () D.503_30; > D.505_32 = D.504_31 + 1; > if (ivtmp.3_20 == D.505_32) goto ; else goto ; > # SUCC: 2 [11.0%] (loop_exit,true,exec) 1 [89.0%] (dfs_back,false,exec) > > # BLOCK 2 > # PRED: 1 [11.0%] (loop_exit,true,exec) > :; > D.497_22 = ivtmp.3_12 + 2; > lsm_tmp.2_23 = (int4) D.497_22; > # j_7 = V_MUST_DEF ; > j = lsm_tmp.2_23; > # SUCC: 3 [100.0%] (fallthru) > > Between "ivtmp.3_20 = ivtmp.3_12 + 1;" and "D.497_22 = ivtmp.3_12 + 2;" > both versions of ivtmp.3 are live. I have not looked at what causes this, > but IMOH all passes should avoid letting induction variables escape a loop. There's not much to avoid -- the iv is simply used outside of the loop, and we cannot do anything about it. > Interesting note: I think "D.497_22 = ivtmp.3_12 + 2;" could be replaced > with "D.497_22 = ivtmp.3_20 + 1;" which would fix this problem. I think this is how it is immediately after ivopts (if not, it would be a bug); but dom performs this replacement. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19038