https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108821
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:bd0192968999661d103bb9d974a8ad3be4ef3d9b commit r11-10681-gbd0192968999661d103bb9d974a8ad3be4ef3d9b Author: Richard Biener <rguent...@suse.de> Date: Fri Feb 17 12:36:44 2023 +0100 tree-optimization/108821 - store motion and volatiles The following fixes store motion to not re-issue volatile stores to preserve TBAA behavior since that will result in the number of volatile accesses changing. PR tree-optimization/108821 * tree-ssa-loop-im.c (sm_seq_valid_bb): We can also not move volatile accesses. * gcc.dg/tree-ssa/ssa-lim-24.c: New testcase. (cherry picked from commit 4c4f0f7acd6b96ee744ef598cbea5c7046a33654)