From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31388 invoked by alias); 30 Jan 2010 16:07:08 -0000 Received: (qmail 31324 invoked by uid 48); 30 Jan 2010 16:06:57 -0000 Date: Sat, 30 Jan 2010 16:07:00 -0000 Message-ID: <20100130160657.31323.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/42720] Problematic condition simplification logic at unswitch-loops pass 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: 2010-01/txt/msg03423.txt.bz2 ------- Comment #9 from rguenth at gcc dot gnu dot org 2010-01-30 16:06 ------- (In reply to comment #6) > The interesting thing is that the empty loop is not removed by > the control-dependent DCE pass that follows the 2nd VRP. > > This happens because > > > : > if (obj_7(D) != 0B) > goto ; > else > goto ; > > : > # i_36 = PHI <0(3)> > > : > # i_25 = PHI > i_35 = i_25 + 1; > if (i_35 != num_6(D)) > goto ; > else > goto ; > > : > goto ; > > ... > > : > Invalid sum of incoming frequencies 6888, should be 7735 > # s_2 = PHI > i_20 = i_18 + 1; > if (i_20 != num_6(D)) > goto ; > else > goto ; > > ... > > : > # s_3 = PHI > > > the PHI node defining s_3 marks the controlling statement necessary > which in turn marks the loop necessary. Now the question is if this > is an inherent limitation of CD-DCE or if the controlling stmt > should be that in BB3 instead (the immediate common dominator of > bb7 and bb10 is bb3). Steven? You implemented that CD-DCE stuff? -> PR42906 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42720