https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105559
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:6007449a1c3bd116e431fe53d4dfe2d1c67c1076 commit r10-10763-g6007449a1c3bd116e431fe53d4dfe2d1c67c1076 Author: Richard Biener <rguent...@suse.de> Date: Wed May 11 13:34:37 2022 +0200 rtl-optimization/105559 - avoid quadratic behavior in delete_insn_and_edges When the insn to delete is a debug insn there's no point in figuring out whether it might be the last real insn and thus we have to purge dead edges. 2022-05-11 Richard Biener <rguent...@suse.de> PR rtl-optimization/105559 * cfgrtl.c (delete_insn_and_edges): Only perform search to BB_END for non-debug insns. (cherry picked from commit 37a8220fa9188470c677abfef50c1b120c0b6c76)