https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46590
--- Comment #54 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- Author: rsandifo Date: Thu Apr 4 07:35:34 2019 New Revision: 270142 URL: https://gcc.gnu.org/viewcvs?rev=270142&root=gcc&view=rev Log: DF usage in loop-invariant.c (PR46590) - df_live is already present at -O2, so we only need to add it and mark all blocks dirty for -O - df_process_deferred_rescans should be enough to force a rescan of blocks affected by moving invariants, but calling it in find_defs means that we don't do any rescans for the final loop 2019-04-04 Richard Sandiford <richard.sandif...@arm.com> gcc/ PR rtl-optimization/46590 * loop-invariant.c (find_defs): Move df_remove_problem and df_process_deferred_rescans to move_invariants. Move df_live_add_problem and df_live_set_all_dirty calls to move_invariants. (move_invariants): Likewise. (move_loop_invariants): Likewise, making the df_live calls conditional on -O. Remove the problem again if we added it locally. Modified: trunk/gcc/ChangeLog trunk/gcc/loop-invariant.c