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

--- Comment #4 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:aa15952d646fd5dd569fce287b719a737ae66e4f

commit r12-4650-gaa15952d646fd5dd569fce287b719a737ae66e4f
Author: Richard Biener <rguent...@suse.de>
Date:   Mon Oct 25 09:33:15 2021 +0200

    tree-optimization/102920 - fix PHI VN with undefined args

    This fixes a latent issue exposed by now allowing VN_TOP in PHI
    arguments.  We may only use optimistic equality when merging values on
    different edges, not when merging values on the same edge - in particular
    we may not choose the undef value on any edge when there's a not undef
    value as well.

    2021-10-25  Richard Biener  <rguent...@suse.de>

            PR tree-optimization/102920
            * tree-ssa-sccvn.h (expressions_equal_p): Add argument
            controlling VN_TOP matching behavior.
            * tree-ssa-sccvn.c (expressions_equal_p): Likewise.
            (vn_phi_eq): Do not optimistically match VN_TOP.

            * gcc.dg/torture/pr102920.c: New testcase.

Reply via email to