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] accessing an element via a "pointer" on a vector does not cause vec_extract to be used (non-zero index) [PR tree-opt/30186]


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.
>


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