]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/118669 - fixup wrongly aligned loads/stores
authorRichard Biener <rguenther@suse.de>
Wed, 2 Jul 2025 07:30:05 +0000 (09:30 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 3 Jul 2025 07:30:53 +0000 (09:30 +0200)
commit37bf13adcda564dfdb28c3aa736f2cac71c73d09
tree3df9013ed076d0dec9966ce5be5d2388443add2b
parentd8d5e2a8031e74f08f61ccdd727476f97940c5a6
tree-optimization/118669 - fixup wrongly aligned loads/stores

The vectorizer tracks alignment of datarefs with dr_aligned
and dr_unaligned_supported but that's aligned with respect to
the target alignment which can be less aligned than the mode
used for the access.  The following fixes this discrepancy
for vectorizing loads and stores.  The issue is visible for
aarch64 SVE and risc-v where VLA vector modes have larger than
element alignment but the target handles element alignment
just fine.

PR tree-optimization/118669
* tree-vect-stmts.cc (vectorizable_load): Emit loads
with proper (element) alignment.
(vectorizable_store): Likewise.
gcc/tree-vect-stmts.cc