This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Vector subscription patch
On Wed, Oct 20, 2010 at 11:13 PM, Richard Henderson <rth@redhat.com> wrote:
> On 10/20/2010 01:55 PM, Richard Guenther wrote:
>>> These patterns are used by store_bit_field and extract_bit_field,
>>> generally in response to BIT_FIELD_REF. ?This is probably a better
>>> way to represent the operation.
>>
>> But that's only possible for constant indices, but yes I remember having
>> similar comments initially.
>
> Then we should invent a VEC_ELT_REF or something. ?In most
> cases I expect we'll be able to reduce the argument to a
> constant. ?If not... well, too bad, we'll dump it to memory.
>
> But doing it right away in the front-end has got to be the
> least efficient idea.
Sure.
A VIEW_CONVERT_EXPR <ARRAY_TYPE, register>[index] should also work.
Richard.
>
> r~
>