This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] [tree-ssa] Fix handling of BIT_FIELD_REFs and VECTOR_TYPEs
- From: Richard Henderson <rth at redhat dot com>
- To: bonzini at gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 Mar 2004 13:36:01 -0800
- Subject: Re: [RFC] [tree-ssa] Fix handling of BIT_FIELD_REFs and VECTOR_TYPEs
- References: <405F60FB.email@example.com>
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).