http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57940
Bug ID: 57940 Summary: [PATCH] Rerun df_analyze after delete_unmarked_insns during DCE Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: makhaloff at gmail dot com Hello! If delete_unmarked_insns deletes some insn, DF state might be out of date, and, regs_ever_live might contain unused registers till the end. Fixed by forcing regs_ever_live update and rerunning df_analyze () at fini_dce(). I found this bug on my target (not included into main sources). But I can send everything you need to reproduce this bug. Using gcc-4.8.1 2013-07-20 Alexey Makhalov <makhal...@gmail.com> * dce.c (fini_dce): Call df_analyze again just in case delete_unmarked_insns removed anything. --- dce.c (revision 361) +++ dce.c (working copy) @@ -745,6 +745,12 @@ bitmap_obstack_release (&dce_blocks_bitmap_obstack); bitmap_obstack_release (&dce_tmp_bitmap_obstack); } + + if (!df_in_progress) + { + df_compute_regs_ever_live (true); + df_analyze (); + } }