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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <[email protected]>:

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

commit r17-418-g5e933bd275f0e6eef18692ef351cb5d617f48d51
Author: Andrew Pinski <[email protected]>
Date:   Fri May 8 12:46:32 2026 -0700

    match: Fix merged patterns for a!=b implies a and b are not zero [PR125234]

    In r17-231-gc65691bc5a2873, I messed up the resulting constant for
    `(a != b) & ((a | b) == 0)` and `(a == b) | ((a | b) != 0)`. I had
    swapped which one was resulting in true/false. This fixes the issue
    and adds a testcase to make sure it does not regress again.

    Pushed as obvious after a bootstrap/test on x86_64-linux-gnu.

            PR tree-optimization/125234

    gcc/ChangeLog:

            * match.pd (`(a !=/== b) &\| ((a|b) ==/!= 0)`): Fix
            resulting constant form.

    gcc/testsuite/ChangeLog:

            * gcc.dg/torture/pr125234-1.c: New test.

    Signed-off-by: Andrew Pinski <[email protected]>

Reply via email to