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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andrew Macleod <amacl...@gcc.gnu.org>:

https://gcc.gnu.org/g:0bdd2261c254f08b0f4437c156b79711d68c6e7f

commit r13-4806-g0bdd2261c254f08b0f4437c156b79711d68c6e7f
Author: Andrew MacLeod <amacl...@redhat.com>
Date:   Fri Dec 16 16:53:31 2022 -0500

    Don't use PHI equivalences in range-on-entry.

    If there is only one argument to a PHI which is defined, an equivalency is
    created between the def and the argument.  It is safe to consider the def
    equal to the argument, but it is dangerous to assume the argument is also
    equivalent to the def as there may be branches which change the range on
the
    path to the PHI on that argument

    This patch avoid using that relation in range-on-entry calculations.

            PR tree-optimization/108139
            gcc/
            * gimple-range-cache.cc (ranger_cache::fill_block_cache): Do not
            use equivalences originating from PHIS.

            gcc/testsuite/
            * gcc.dg/pr108139.c: New.

Reply via email to