https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117709
--- 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:f5bd88b5e874751d17a2f18c1cfc5bd054da8308 commit r15-5524-gf5bd88b5e874751d17a2f18c1cfc5bd054da8308 Author: Richard Biener <rguent...@suse.de> Date: Wed Nov 20 16:47:08 2024 +0100 tree-optimization/117709 - bogus offset for gather load When diverting to VMAT_GATHER_SCATTER we fail to zero *poffset which was previously set if a load was classified as VMAT_CONTIGUOUS_REVERSE. The following refactors get_group_load_store_type a bit to avoid this but this all needs some serious TLC. PR tree-optimization/117709 * tree-vect-stmts.cc (get_group_load_store_type): Only set *poffset when we end up with VMAT_CONTIGUOUS_DOWN or VMAT_CONTIGUOUS_REVERSE.