]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/116010 - dr_may_alias regression
authorRichard Biener <rguenther@suse.de>
Fri, 24 Jan 2025 12:20:12 +0000 (13:20 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 24 Jan 2025 13:58:48 +0000 (14:58 +0100)
commit02fc12b04017d20345e208d65fd7a33d62f0cded
tree9e9d318cd7cb013c8cba92d3e11975b850483ed9
parentb00bd29286345cc90afc61dcb16d1fa44976dae6
tree-optimization/116010 - dr_may_alias regression

r15-491-gc290e6a0b7a9de fixed a latent issue with dr_analyze_innermost
and dr_may_alias where not properly analyzed DRs would yield an invalid
answer.  This caused some missed optimizations in case there is not
actually any evolution in the not analyzed base part.  The following
recovers this by only handling base parts which reference SSA vars
as index in the conservative way.

The gfortran.dg/vect/vect-8.f90 testcase is difficult to deal with,
so the following merely bumps the maximum number of expected vectorized loops
for both aarch64 and x86-64.

PR tree-optimization/116010
* tree-data-ref.cc (contains_ssa_ref_p_1): New function.
(contains_ssa_ref_p): Likewise.
(dr_may_alias_p): Avoid treating unanalyzed base parts without
SSA reference conservatively.

* gfortran.dg/vect/vect-8.f90: Adjust.
gcc/testsuite/gfortran.dg/vect/vect-8.f90
gcc/tree-data-ref.cc