This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch: optimized constant vector initializers
- From: Richard Henderson <rth at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Stan Shebs <shebs at apple dot com>
- Date: Mon, 31 Mar 2003 13:52:15 -0800
- Subject: Re: patch: optimized constant vector initializers
- References: <BD1D0EA4-63C1-11D7-ACB7-000393750C1E@redhat.com>
On Mon, Mar 31, 2003 at 05:42:58PM -0400, Aldy Hernandez wrote:
> - static int
> ! int
> is_zeros_p (exp)
Left over from a previous patch? It's not required here...
> + for (; link; link = TREE_CHAIN (link))
> + output_constant (TREE_VALUE (link), elt_size, align);
You've specified bogus alignment. Only the first element
should be aligned like this; subsequent ones will use much
less alignment, usually. You want something like
unsigned int nalign = min (align, GET_MODE_ALIGNMENT (inner));
output_constant (TREE_VALUE (link), elt_size, align);
while ((link = TREE_CHAIN (link)) != NULL)
output_constant (TREE_VALUE (link), elt_size, nalign);
r~