This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] accessing an element via a "pointer" on a vector does not cause vec_extract to be used (non-zero index) [PR tree-opt/30186]
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Andrew Pinski" <pinskia at gcc dot gnu dot org>
- Cc: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 31 Mar 2008 10:10:05 +0100
- Subject: Re: [PATCH] accessing an element via a "pointer" on a vector does not cause vec_extract to be used (non-zero index) [PR tree-opt/30186]
- References: <de8d50360803302239r134d5c6fx77d7fbdcf22e1de5@mail.gmail.com>
On Mon, Mar 31, 2008 at 6:39 AM, Andrew Pinski <pinskia@gcc.gnu.org> wrote:
> Hi,
> This extends fold_indirect_ref_1 to be able to handle non zero index
> for accessing an element of a vector. Nothing special was needed to
> support this as all the needed support came in with "2006-12-12
> Andrew Pinski <andrew_pinski@playstation.sony.com>" when accessing
> the first element of the vector was added.
>
> OK? Bootstrapped and tested on i686-linux-gnu with no regressions.
Ok if you add a runtime testcase that verifies you extract the correct
value and if that passes on both a little endian and a bigendian target.
Thanks,
Richard.
> Thanks,
> Andrew Pinski
>
> ChangeLog:
>
> * fold-const.c (fold_indirect_ref_1): Support accessing non first
> element of the vector via a pointer.
>
> * gcc.dg/tree-ssa/vector-1.c: New testcase.
>