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]

[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]


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.

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.

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]