[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]
Richard Guenther
richard.guenther@gmail.com
Mon Mar 31 11:04:00 GMT 2008
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.
>
More information about the Gcc-patches
mailing list