https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119155

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:adb14c7625178b501389c2d7d7c2feec37da7a19

commit r15-8047-gadb14c7625178b501389c2d7d7c2feec37da7a19
Author: Richard Biener <rguent...@suse.de>
Date:   Fri Mar 7 12:57:42 2025 +0100

    tree-optimization/119155 - wrong aligned access for vectorized packed
access

    When doing strided SLP vectorization we use the wrong alignment for
    the possibly piecewise access of the vector elements for loads and
    stores.  While we are carefully using element aligned loads and
    stores that isn't enough for the case the original scalar accesses
    are packed.  The following instead honors larger alignment when
    present but correctly falls back to the original scalar alignment
    used.

            PR tree-optimization/119155
            * tree-vect-stmts.cc (vectorizable_store): Do not always
            use vector element alignment for VMAT_STRIDED_SLP but
            a more correct alignment towards both ends.
            (vectorizable_load): Likewise.

            * gcc.dg/vect/pr119155.c: New testcase.

Reply via email to