https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90273
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rsandifo at gcc dot gnu.org --- Comment #17 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- Created attachment 46261 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46261&action=edit Doing the removal in find_obviously_necessary_stmts Just for the record: I'd written this over the weekend for completely unrelated reasons (was looking at debug info, and wanted to replicate the DCE that is already done in RTL). It doesn't include the DEBUG_EXPR_DECL stuff, so obviously can't go in as-is, but it means that we never even add the redundant instructions to the worklist.