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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:5c046034e3ea61dd68965154a398f8f813daf8f2

commit r11-6738-g5c046034e3ea61dd68965154a398f8f813daf8f2
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Jan 15 21:10:44 2021 +0100

    match.pd: Optimize (x < 0) ^ (y < 0) to (x ^ y) < 0 etc. [PR96681]

    This patch simplifies comparisons that test the sign bit xored together.
    If the comparisons are both < 0 or both >= 0, then we should xor the
operands
    together and compare the result to < 0, if the comparisons are different,
    we should compare to >= 0.

    2021-01-15  Jakub Jelinek  <ja...@redhat.com>

            PR tree-optimization/96681
            * match.pd ((x < 0) ^ (y < 0) to (x ^ y) < 0): New simplification.
            ((x >= 0) ^ (y >= 0) to (x ^ y) < 0): Likewise.
            ((x < 0) ^ (y >= 0) to (x ^ y) >= 0): Likewise.
            ((x >= 0) ^ (y < 0) to (x ^ y) >= 0): Likewise.

            * gcc.dg/tree-ssa/pr96681.c: New test.

Reply via email to