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: Vector subscription patch


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



r~


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