From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28561 invoked by alias); 23 Mar 2007 08:01:48 -0000 Received: (qmail 28214 invoked by alias); 23 Mar 2007 08:01:32 -0000 Date: Fri, 23 Mar 2007 08:01:00 -0000 Message-ID: <20070323080132.28213.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/31136] [4.2 Regression] FRE ignores bit-field truncation (C and C++ front-end don't produce bit-field truncation In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gmail dot com" 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: 2007-03/txt/msg02208.txt.bz2 ------- Comment #9 from pinskia at gmail dot com 2007-03-23 08:01 ------- Subject: Re: [4.2 Regression] FRE ignores bit-field truncation (C and C++ front-end don't produce bit-field truncation On 3/23/07, Andrew Pinski wrote: > On 23 Mar 2007 05:01:00 -0000, spark at gcc dot gnu dot org > wrote: > > The problematic STRIP_SIGN_NOPS() call is from fold_unary() > > which is called from try_combine_conversion() in tree-ssa-pre.c. > > > > STRIP_SIGN_NOPS() is called with the expression: > > No, STRIP_SIGN_NOPS is correct, just fold_unary is incorrect in its > folding. It should have called fold_convert on the expression if the > types are different and it is a constant. Ok, the real issue is that we call fold with NOP_EXPR> instead of just NOP_EXPR so you have to figure out where we should fold the first NOP_EXPR instead of that patch. -- Pinski -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31136