[Bug middle-end/126410] [14/15 Regression] vectorizer aligns 16-byte array to 64byte

"cvs-commit at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126410

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Richard Biener
<[email protected]>:

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

commit r15-11490-gfafb0599acc780009c23514d373d17589b73fdff
Author: H.J. Lu <[email protected]>
Date:   Sun Jul 26 19:21:55 2026 +0800

    vectorizer: Don't enlarge base alignment during costing

    We errorneously commit the recorded base alignment during costing
    since the costing refactoring.  This causes alignment to be
    computed based on a possibly larger vector type than used in the
    end.

    gcc/

            PR middle-end/126410
            * tree-vect-stmts.cc (vectorizable_store): Only commit to
            recorded base alignment when transforming.
            (vectorizable_load): Likewise.

    gcc/testsuite/

            PR middle-end/126410
            * gcc.target/i386/pr126410-1a.c: New test.
            * gcc.target/i386/pr126410-1b.c: Likewise.
            * gcc.target/i386/pr126410-1c.c: Likewise.
            * gcc.target/i386/pr126410-2a.c: Likewise.
            * gcc.target/i386/pr126410-2b.c: Likewise.
            * gcc.target/i386/pr126410-2c.c: Likewise.

    Co-Authored-By: Richard Biener  <[email protected]>
    Signed-off-by: H.J. Lu <[email protected]>
    (cherry picked from commit 7c7c6626410c261d188a96d9b2a15d3781d0dcfb)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.