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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>:

https://gcc.gnu.org/g:1a15a91a0015208eafb797e4de1348c9877fd6d0

commit r12-5333-g1a15a91a0015208eafb797e4de1348c9877fd6d0
Author: Andrew Pinski <apin...@marvell.com>
Date:   Tue Nov 16 23:37:08 2021 +0000

    Fix PR 103288, ICE after PHI-OPT, move an assigment when still in use for
another bb

    The problem is r12-5300-gf98f373dd822b35c allows phiopt to recognize more
basic blocks
    but missed one location where phiopt could move an assignment from the
middle block
    to the non-middle one.  This patch fixes that.

    OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

            PR tree-optimization/103288

    gcc/ChangeLog:

            * tree-ssa-phiopt.c (value_replacement): Return early if middle
            block has more than one pred.

    gcc/testsuite/ChangeLog:

            * gcc.c-torture/compile/pr103288-1.c: New test.

Reply via email to