[PATCH][RFC] Do some vectorizer-friendly canonicalization before vectorization

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Tue Nov 21 13:05:00 GMT 2006


Hello,

> On Tue, 21 Nov 2006, Zdenek Dvorak wrote:
> 
> > Hello,
> > 
> > > +   /* Catch squaring.  */
> > > +   if ((host_integerp (exp, 0)
> > > +        && TREE_INT_CST_LOW (exp) == 2)
> > 
> > tree_low_cst (exp, 0) == 2.  Otherwise, the patch is OK.
> 
> I don't think so.
> 
> HOST_WIDE_INT
> tree_low_cst (tree t, int pos)
> {
>   gcc_assert (host_integerp (t, pos));
>   return TREE_INT_CST_LOW (t);
> }
> 
> so we'll ICE if it is not host_integerp

of course, you need to keep the check of host_integerp.  Nevertheless,
TREE_INT_CST_LOW should not be used unless necessary, to make
possible transition to a different representation of long integers
as simple as possible.

Zdenek



More information about the Gcc-patches mailing list