https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118669
--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:c625bc9c7c294ef2851ae42d4a5b6cc899fecb5e commit r15-9943-gc625bc9c7c294ef2851ae42d4a5b6cc899fecb5e Author: Richard Biener <rguent...@suse.de> Date: Wed Jul 2 09:30:05 2025 +0200 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. (cherry picked from commit 37bf13adcda564dfdb28c3aa736f2cac71c73d09)