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: [PATCH][RFC] Do some vectorizer-friendly canonicalization before vectorization


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


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