https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95045
--- Comment #3 from CVS 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:bb63ca63e744c08bc5a9ffa53df62ea35f098b0b commit r11-308-gbb63ca63e744c08bc5a9ffa53df62ea35f098b0b Author: Richard Biener <rguent...@suse.de> Date: Mon May 11 15:26:09 2020 +0200 tree-optimization/95045 - fix SM with exit exiting multiple loops Since we apply SM to an edge which exits multiple loops we have to make sure to commit insertions on it immediately since otherwise store order is not preserved. 2020-05-12 Richard Biener <rguent...@suse.de> PR tree-optimization/95045 * dbgcnt.def (lim): Add debug-counter. * tree-ssa-loop-im.c: Include dbgcnt.h. (find_refs_for_sm): Use lim debug counter for store motion candidates. (do_store_motion): Rename form store_motion. Commit edge insertions... (store_motion_loop): ... here. (tree_ssa_lim): Adjust.