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: [RFC] [tree-ssa] Fix handling of BIT_FIELD_REFs and VECTOR_TYPEs


On Mon, Mar 22, 2004 at 04:56:11PM -0500, bonzini wrote:
> Unfortunately, I don't.  These (seems to me) bugs are exposed by my work 
> to lower vectors into scalars if there is no instruction for that.  That 
> code puts BIT_FIELD_REFs of VECTOR_TYPE variables in the left side of 
> MODIFY_EXPRs, like
> 
>  v4qi a, b, c;
>  ...
>  T_3 = BIT_FIELD_REF (b_1, 0, 8);
>  T_4 = BIT_FIELD_REF (c_2, 0, 8);
>  T_5 = T_3 + T_4;
>  BIT_FIELD_REF (a_6, 0, 8) = T_5;

This won't work.  Vector types are not treated as aggregates, and so there
can be *no* partial modifications.  All sets must kill the entire value.

Fortunately, this is easy to do: do all your operations and then construct
the new value all at once with a_6 = CONSTRUCTOR (t_5, t_6, t_7, t_8).


r~


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