https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93385
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Looking at tree-ssa-dce.c, it uses remove_phi_node rather than gsi_remove for PHIs. And for non-PHIs, it calls release_defs after gsi_remove.