[Bug middle-end/126410] [14/15/16/17 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 #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <[email protected]>:

https://gcc.gnu.org/g:7c7c6626410c261d188a96d9b2a15d3781d0dcfb

commit r17-2749-g7c7c6626410c261d188a96d9b2a15d3781d0dcfb
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.
            * gcc.target/i386/preserve-none-35a.c: Adjust.
            * gcc.target/i386/preserve-none-35b.c: Likewise.
            * gcc.target/i386/preserve-none-35c.c: Likewise.
            * gcc.target/i386/preserve-none-35d.c: Likewise.
            * gcc.target/i386/preserve-none-35e.c: Likewise.
            * gcc.target/i386/preserve-none-35f.c: Likewise.
            * gcc.target/i386/preserve-none-35g.c: Likewise.

    Co-Authored-By: Richard Biener  <[email protected]>
    Signed-off-by: H.J. Lu <[email protected]>
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.