Vector subscription patch
Richard Guenther
richard.guenther@gmail.com
Wed Oct 20 21:02:00 GMT 2010
On Wed, Oct 20, 2010 at 8:57 PM, Richard Henderson <rth@redhat.com> wrote:
>> + c_common_mark_addressable_vec (array);
>> + type = build_qualified_type (TREE_TYPE (type), TYPE_QUALS (type));
>> + type = build_pointer_type (type);
>> + type1 = build_pointer_type (TREE_TYPE (array));
>> + array = build1 (ADDR_EXPR, type1, array);
>> + array = convert (type, array);
>
> I think it's a bit unfortunate to be expanding this to memory
> access and arithmetic immediately in the front end.
>
> We have vec_extract_optab in the backends that allows extraction
> of a single element of a vector, and vec_set_optab that allows
> insertion of a single element of a vector.
>
> 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.
Richard.
>
>
> r~
>
More information about the Gcc-patches
mailing list