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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>:

https://gcc.gnu.org/g:7c04da768c1fc22e0607e3ccad87e2c793499797

commit r14-3540-g7c04da768c1fc22e0607e3ccad87e2c793499797
Author: Andrew Pinski <apin...@marvell.com>
Date:   Mon Aug 28 10:04:00 2023 -0700

    MATCH: Move `(x | y) & (~x ^ y)` over to use bitwise_inverted_equal_p

    This moves the match pattern `(x | y) & (~x ^ y)` over to use
bitwise_inverted_equal_p.
    This now also allows to optmize comparisons and also catches the missed
`(~x | y) & (x ^ y)`
    transformation into `~x & y`.

    OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

    gcc/ChangeLog:

            PR tree-optimization/111147
            * match.pd (`(x | y) & (~x ^ y)`) Use bitwise_inverted_equal_p
            instead of matching bit_not.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/111147
            * gcc.dg/tree-ssa/cmpbit-4.c: New test.

Reply via email to