This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Avoid creating useless BIT_FIELD_REFs (PR middle-end/19858)
- From: Roger Sayle <roger at eyesopen dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Feb 2005 17:54:48 -0700 (MST)
- Subject: 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
--