[Bug middle-end/110495] fre introduces signed wrap for vector
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 4 07:08:14 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110495
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:f703d2fd3f03890a180e8cc04df087c208999e81
commit r14-2282-gf703d2fd3f03890a180e8cc04df087c208999e81
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jul 3 10:28:10 2023 +0200
middle-end/110495 - avoid associating constants with (VL) vectors
When trying to associate (v + INT_MAX) + INT_MAX we are using
the TREE_OVERFLOW bit to check for correctness. That isn't
working for VECTOR_CSTs and it can't in general when one considers
VL vectors. It looks like it should work for COMPLEX_CSTs but
I didn't try to single out _Complex int in this change.
The following makes sure that for vectors we use the fallback of
using unsigned arithmetic when associating the above to
v + (INT_MAX + INT_MAX).
PR middle-end/110495
* tree.h (TREE_OVERFLOW): Do not mention VECTOR_CSTs
since we do not set TREE_OVERFLOW on those since the
introduction of VL vectors.
* match.pd (x +- CST +- CST): For VECTOR_CST do not look
at TREE_OVERFLOW to determine validity of association.
* gcc.dg/tree-ssa/addadd-2.c: Amend.
* gcc.dg/tree-ssa/forwprop-27.c: Adjust.
More information about the Gcc-bugs
mailing list