[PATCH][RFC] Do some vectorizer-friendly canonicalization before vectorization
Richard Guenther
rguenther@suse.de
Tue Nov 21 12:26:00 GMT 2006
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 (and if you suggested to
only change TREE_INT_CST_LOW we'd get a redundant call to
host_integerp).
Though
rguenther@murzim:/space/rguenther/src/svn/trunk/gcc> grep -C 3
host_integerp *.c | grep TREE_INT_CST_LOW | wc -l
24
rguenther@murzim:/space/rguenther/src/svn/trunk/gcc> grep -C 3
host_integerp *.c | grep tree_low_cst | wc -l
84
shows using tree_low_cst even after checking host_integerp seems common.
So I'll switch to tree_low_cst in place of TREE_INT_CST_LOW.
Thanks,
Richard.
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
More information about the Gcc-patches
mailing list