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 2:10 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
>  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.

And this is what I committed (adding two testcases, one for extraction
and one for insertion, vectors are treated as arrays so the behavior
is the same on both bigendian (VMX) and little endian targets (SSE) ).

I forgot to mention this patch has been in the PS3 toolchain for at
least a couple of releases now so it has been tested on many vector
based programs inside the PS3 already.

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.
* gcc.c-torture/execute/vector-1.c: New testcase.
* gcc.c-torture/execute/vector-2.c: New testcase.

Attachment: vectorbitfieldref1.diff.txt
Description: Text document


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