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

--- Comment #9 from GCC 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:ce489c870bf28e5e3ffd5fe6730727d1ea942b3f

commit r16-244-gce489c870bf28e5e3ffd5fe6730727d1ea942b3f
Author: Andrew MacLeod <amacl...@redhat.com>
Date:   Mon Apr 14 16:25:15 2025 -0400

    Always reflect lower bits from mask in subranges.

    During intersection, we expand the subranges to exclude the lower values
    from a bitmask with trailing zeros.  This leads to inconsistant evaluations
    and in this case of this PR, that lead to an infinite cycle.

    Always expand the lower subranges in set_range_from_bitmask instead.

            PR tree-optimization/119712
            gcc/
            * value-range.cc (range_bitmask::adjust_range): Delete.
            (irange::set_range_from_bitmask): Integrate adjust_range.
            (irange::update_bitmask): Do nothing if bitmask doesnt change.
            (irange:intersect_bitmask): Do not call adjust_range. Exit if there
            is no second bitmask.
            * value-range.h (adjust_range): Remove prototype.

            gcc/testsuite/
            * gcc.dg/pr119712.c: New.
            * gcc.dg/pr83072-2.c: Adjust.
            * gcc.dg/tree-ssa/phi-opt-value-5.c: Adjust.
            * gcc.dg/tree-ssa/vrp122.c: Adjust
  • [Bug tree-optimization/119712] ... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to