https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108737
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
I botched the changelog. Fixed with the following, but latent everywhere.
commit 338739645b8e5bf34636d8d4829d7650001ad08c (origin/master, origin/HEAD)
Author: Richard Biener <[email protected]>
Date: Fri Feb 10 10:28:29 2023 +0100
tree-optimization/106722 - fix CD-DCE edge marking
The following fixes a latent issue when we mark control edges but
end up with marking a block with no stmts necessary. In this case
we fail to mark dependent control edges of that block.
PR tree-optimization/106722
* tree-ssa-dce.cc (mark_last_stmt_necessary): Return
whether we marked a stmt.
(mark_control_dependent_edges_necessary): When
mark_last_stmt_necessary didn't mark any stmt make sure
to mark its control dependent edges.
(propagate_necessity): Likewise.
* gcc.dg/torture/pr108737.c: New testcase.