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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <[email protected]>:

https://gcc.gnu.org/g:41439e1f6d2da1e86538c726f0603cffd5dd098e

commit r12-3182-g41439e1f6d2da1e86538c726f0603cffd5dd098e
Author: Richard Biener <[email protected]>
Date:   Fri Aug 27 09:47:49 2021 +0200

    tree-optimization/45178 - DCE of dead control flow in infinite loop

    This fixes DCE to be able to elide dead control flow in an
    infinite loop without an exit edge.  This special situation is
    handled well by the code finding an edge to preserve since there's
    no chance it will find the exit edge and make the loop finite.

    2021-08-27  Richard Biener  <[email protected]>

            PR tree-optimization/45178
            * tree-ssa-dce.c (find_obviously_necessary_stmts): For
            infinite loops without exit do not mark control dependent
            edges of the latch necessary.

            * gcc.dg/tree-ssa/ssa-dce-3.c: Adjust testcase.

Reply via email to