On 3/13/25 2:04 PM, Richard Biener wrote:


I think this is done by convert_vector_to_array_for_subscript in
c-common/, note that this handles lvalue conversion as well which
means it will not work in lvalue context where you'd possibly want
sth like a

  TARGET_EXPR <D.1234, .VEC_CONVERT (vector)>

but then the caller needs to assign D.1234 to 'vector' with a
conversion back.  This is going to be a bit difficult to deal
with given the parser structure.


This is precisely the issue I ran into.

Indexing bit-precision mask vectors really breaks the assumption
of convert_vector_to_array_for_subscript that there is an array
type that is layout-compatible to the vector.  So we'd need to
handle this situation upthread somehow.  The "cheap" way out
would be to use .VEC_SET and .VEC_EXTRACT temporarily (expansion
relies on the optabs to be presnet) and gimplify those away.


Thanks for the reviews - I'll try .VEC_SET and .VEC_EXTRACT.

Thanks,
Tejas.

Reply via email to