[Bug tree-optimization/96707] Failure to optimize right shift+unsigned compare of two variables optimally

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 13 18:52:16 GMT 2022


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

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

https://gcc.gnu.org/g:27e4260166950b784fe270ba4f0cae9a66faf1c4

commit r12-6558-g27e4260166950b784fe270ba4f0cae9a66faf1c4
Author: Andrew MacLeod <amacleod@redhat.com>
Date:   Wed Jan 12 13:28:55 2022 -0500

    Add relation to unsigned right shift.

    If the first operand and the shift value of a right shift operation are
both
    >= 0, then we know the LHS of the operation is <= the first operand.

            PR tree-optimization/96707
            gcc/
            * range-op.cc (operator_rshift::lhs_op1_relation): New.

            gcc/testsuite/
            * g++.dg/pr96707.C: New.


More information about the Gcc-bugs mailing list