diff options
author | Richard Biener <rguenther@suse.de> | 2023-07-03 10:28:10 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2023-07-04 09:04:51 +0200 |
commit | f703d2fd3f03890a180e8cc04df087c208999e81 (patch) | |
tree | 29d94f79261e9b5025f0a5aaf3b2e4814ad6ef34 /gcc/rust/backend | |
parent | 0682a32c026f1e246eb07bb8066abca4636f01d8 (diff) | |
download | gcc-f703d2fd3f03890a180e8cc04df087c208999e81.zip gcc-f703d2fd3f03890a180e8cc04df087c208999e81.tar.gz gcc-f703d2fd3f03890a180e8cc04df087c208999e81.tar.bz2 |
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.
Diffstat (limited to 'gcc/rust/backend')
0 files changed, 0 insertions, 0 deletions