This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix intermittent simd-5 failure
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 16 Feb 2004 14:27:05 +0100
- Subject: Re: fix intermittent simd-5 failure
- References: <20040216120303.GA5227@redhat.com>
> Comparison of VECTOR_CSTs never could work, since passing the
> TREE_LIST back to operand_equal_p would result in trying to
> take TYPE_UNSIGNED (TREE_TYPE (X)) of the TREE_LIST.
>
> The test passes quite often by accident because the two vectors
> that are being compared turn out to be the same vector, so the
> earlier pointer comparison succeeds.
Another related note :) The testcase:
t()
{
int __attribute__ ((mode(V2DF)) a,b;
return a==b;
}
Ice 3.4 branch and mainline (I noticed this recently while working on
fixing the generic vector support on SSE). If your patch fix it, can
you please commit it to 3.4 too?
Honza
>
> Applied mainline and tree-ssa.
>
>
> r~
>
>
>
> * fold-const.c (operand_equal_p): Fix VECTOR_CST comparison.
>
> Index: gcc/fold-const.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v
> retrieving revision 1.213.2.70
> diff -c -p -d -u -r1.213.2.70 fold-const.c
> --- gcc/fold-const.c 13 Feb 2004 13:11:26 -0000 1.213.2.70
> +++ gcc/fold-const.c 16 Feb 2004 11:45:43 -0000
> @@ -2185,7 +2185,8 @@ operand_equal_p (tree arg0, tree arg1, i
> v2 = TREE_VECTOR_CST_ELTS (arg1);
> while (v1 && v2)
> {
> - if (!operand_equal_p (v1, v2, only_const))
> + if (!operand_equal_p (TREE_VALUE (v1), TREE_VALUE (v2),
> + only_const))
> return 0;
> v1 = TREE_CHAIN (v1);
> v2 = TREE_CHAIN (v2);