From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19716 invoked by alias); 19 Mar 2005 18:58:21 -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 19632 invoked by uid 48); 19 Mar 2005 18:58:15 -0000 Date: Sat, 19 Mar 2005 18:58:00 -0000 Message-ID: <20050319185815.19630.qmail@sourceware.org> From: "steven at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040318034843.14627.dann@godzilla.ics.uci.edu> References: <20040318034843.14627.dann@godzilla.ics.uci.edu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/14627] [tree-ssa] extra assignment inserted on the tree level X-Bugzilla-Reason: CC X-SW-Source: 2005-03/txt/msg02369.txt.bz2 List-Id: ------- Additional Comments From steven at gcc dot gnu dot org 2005-03-19 18:58 ------- Actually you can get this from any trivial "implicit set"-like code, for example: int b; void foo (int a) { if (a) a = 3; b = a; } The out-of-ssa pass turns that into foo (aD.1461) { intD.0 a.0D.1468; # BLOCK 0 # PRED: ENTRY [100.0%] (fallthru,exec) if (aD.1461 != 0) goto ; else goto ; # SUCC: 3 [67.0%] (true,exec) 1 [33.0%] (false,exec) # BLOCK 3 # PRED: 0 [67.0%] (true,exec) :; a.0D.1468 = 3; goto (); # SUCC: 2 [100.0%] (fallthru) # BLOCK 1 # PRED: 0 [33.0%] (false,exec) :; a.0D.1468 = 0; # SUCC: 2 [100.0%] (fallthru) # BLOCK 2 # PRED: 1 [100.0%] (fallthru) 3 [100.0%] (fallthru) :; # bD.1460_4 = V_MUST_DEF ; bD.1460 = a.0D.1468; return; # SUCC: EXIT [100.0%] } We do not get rid of the "a.0 = 0" set until the first RTL if conversion pass. (Also note the useless live range splitting of a!) This is IMHO a little more important than the normal enhancement request, so I'm making this a "normal" bug. Andrew, any comments on this bug??? -- What |Removed |Added ---------------------------------------------------------------------------- CC| |amacleod at redhat dot com Severity|enhancement |normal Known to fail| |4.0.0 4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14627