This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] BIT_FIELD_REF on VECTOR_CST
- 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: Mon, 30 May 2005 14:22:49 -0600 (MDT)
- Subject: Re: [PATCH] BIT_FIELD_REF on VECTOR_CST
On Mon, 30 May 2005, Jakub Jelinek wrote:
> 2005-05-30 Jakub Jelinek <jakub@redhat.com>
>
> * fold-const.c (fold_ternary): Optimize BIT_FIELD_REF of VECTOR_CST.
This is OK for mainline.
We don't have particularly strong documentation (ha!) on which tree
nodes can occur as particular operands of others. But in this
case, it seems to make some sense that constants can appear inside
BIT_FIELD_REF. In fact, it should be possible to improve on your
patch and lower a BIT_FIELD_REF of a VECTOR_CST to a BIT_FIELD_REF
of a REAL_CST or INTEGER_CST even if the offset and length aren't
perfectly aligned.
Thanks for fixing this,
Roger
--