]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/115528 - fix vect alignment analysis for outer loop vect
authorRichard Biener <rguenther@suse.de>
Fri, 21 Jun 2024 11:19:26 +0000 (13:19 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 24 Jun 2024 11:28:26 +0000 (13:28 +0200)
commit2f83ea87ee328d337f87d4430861221be9babe1e
tree2d4b2dfb6918f7f3d56e05ce0e239a54da56e467
parent0de0476e47c774db21c94a75d60485a55ec7b5b4
tree-optimization/115528 - fix vect alignment analysis for outer loop vect

For outer loop vectorization of a data reference in the inner loop
we have to look at both steps to see if they preserve alignment.

What is special for this testcase is that the outer loop step is
one element but the inner loop step four and that we now use SLP
and the vectorization factor is one.

PR tree-optimization/115528
* tree-vect-data-refs.cc (vect_compute_data_ref_alignment):
Make sure to look at both the inner and outer loop step
behavior.

* gfortran.dg/vect/pr115528.f: New testcase.
gcc/testsuite/gfortran.dg/vect/pr115528.f [new file with mode: 0644]
gcc/tree-vect-data-refs.cc