https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81165
--- Comment #14 from Alexandre Oliva <aoliva at gcc dot gnu.org> --- Created attachment 42802 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42802&action=edit patch, second try (following backlinks from dead uses to maybe-dead defs) Here's an alternate patch that gets us the same generated code, but using a different approach to determine dead stmts (that I described in my previous comment): by following backlinks from uses found to be dead, to defs that may also be dead. A worklist of size 4 was enough to build nearly all of the target libraries, much smaller than I'd anticipated. This, and the extra work I put into deciding when to record (and remove) information about a SSA_NAME in the hash_map, and the reduced work to determine dead nodes, makes me confident that this approach is superior. I'm yet to regstrap it, though.