https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120817
--- Comment #21 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:0ebeed53983dbcefcf7b950895c9d88c85342cf4 commit r15-9941-g0ebeed53983dbcefcf7b950895c9d88c85342cf4 Author: Richard Biener <rguent...@suse.de> Date: Mon Jul 7 09:56:50 2025 +0200 tree-optimization/120817 - bogus DSE of .MASK_STORE DSE used ao_ref_init_from_ptr_and_size for .MASK_STORE but alias-analysis will use the specified size to disambiguate against smaller objects. For .MASK_STORE we instead have to make the access size unspecified but we can still constrain the access extent based on the maximum size possible. PR tree-optimization/120817 * tree-ssa-dse.cc (initialize_ao_ref_for_dse): Use ao_ref_init_from_ptr_and_range with unknown size for .MASK_STORE and .MASK_LEN_STORE. * gcc.dg/vect/pr120817.c: New testcase. (cherry picked from commit 439b14e222571da76da2bfec04b9035fb9f1862d)