]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/119589 - alignment analysis for VF > 1 and VMAT_STRIDED_SLP
authorRichard Biener <rguenther@suse.de>
Tue, 6 May 2025 11:29:42 +0000 (13:29 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 8 May 2025 06:36:53 +0000 (08:36 +0200)
commit9e85d056cd15befffb39d2f84902d21eda4d98eb
treeeceb75a1d9b7dd19f05caba69246546688a4bca5
parentda377e7ebf84a05943fb768eaeb7d682dee865fa
tree-optimization/119589 - alignment analysis for VF > 1 and VMAT_STRIDED_SLP

The following fixes the alignment analysis done by the VMAT_STRIDED_SLP
code which for the case of VF > 1 currently relies on dataref analysis
which assumes consecutive accesses.  But the code generation advances
by DR_STEP between each iteration which requires us to assess that
individual DR_STEP preserve the alignment rather than only VF * DR_STEP.
This allows us to use vector aligned accesses in some cases.

PR tree-optimization/119589
PR tree-optimization/119586
PR tree-optimization/119155
* tree-vect-stmts.cc (vectorizable_store): Verify
DR_STEP_ALIGNMENT preserves DR_TARGET_ALIGNMENT when
VF > 1 and VMAT_STRIDED_SLP.  Use vector aligned accesses when
we can.
(vectorizable_load): Likewise.
gcc/tree-vect-stmts.cc