This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Avoid creating useless BIT_FIELD_REFs (PR middle-end/19858)


On Thu, 10 Feb 2005, Jakub Jelinek wrote:
> 2005-02-10  Jakub Jelinek  <jakub@redhat.com>
>
> 	PR middle-end/19858
> 	* fold-const.c (make_bit_field_ref): If bitpos == 0 and bitsize
> 	is number of inner's bits, avoid creating a BIT_FIELD_REF.
>
> 	* gcc.c-torture/compile/20050210-1.c: New test.

This is OK for mainline.  We should probably also add this optimization
to fold (which doesn't currently do anything for BIT_FIELD_REF) and
document BIT_FIELD_REF in c-tree.texi.  However, neither of these need
hold up a 4.0 regression fix.

Thanks,

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]