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

--- Comment #11 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:bf20b770d9aabb15faf2644b5e3106249cb175f3

commit r14-2648-gbf20b770d9aabb15faf2644b5e3106249cb175f3
Author: Andrew Pinski <apin...@marvell.com>
Date:   Tue Jul 18 21:11:46 2023 +0000

    Fix PR110726: a | (a == b) can sometimes produce wrong code

    So I had missed/forgot that EQ_EXPR could have an non boolean
    type for generic when I implemented r14-2556-g0407ae8a7732d9.
    This patch adds check for one bit precision intergal type
    which fixes the problem.

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

            PR tree-optimization/110726

    gcc/ChangeLog:

            * match.pd ((a|b)&(a==b),a|(a==b),(a&b)|(a==b)):
            Add checks to make sure the type was one bit precision
            intergal type.

    gcc/testsuite/ChangeLog:

            * gcc.c-torture/execute/bitops-1.c: New test.

Reply via email to