https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106722

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:338739645b8e5bf34636d8d4829d7650001ad08c

commit r13-5958-g338739645b8e5bf34636d8d4829d7650001ad08c
Author: Richard Biener <rguent...@suse.de>
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.

Reply via email to