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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jakub Jelinek
<[email protected]>:

https://gcc.gnu.org/g:8910ccc73acd643917b6a00968d65865ffd1795b

commit r14-12786-g8910ccc73acd643917b6a00968d65865ffd1795b
Author: Jakub Jelinek <[email protected]>
Date:   Thu Jul 30 09:52:45 2026 +0200

    match.pd: Fix .PARITY(~x) simplification [PR126471]

    The parity(~X) simpliciation to parity(X) is incorrect for types with
    odd element precision, in that case parity(~X) is equivalent to
    parity(X) ^ 1.
    The following patch fixes this.

    2026-07-30  Jakub Jelinek  <[email protected]>

            PR tree-optimization/126471
            * match.pd (parity(~X) is parity(X)): Only optimize this way
            if element_precision is even, otherwise optimize into parity(X) ^
1.

            * gcc.dg/bitint-139.c: New test.

    Reviewed-by: Andrea Pinski <[email protected]>
    (cherry picked from commit 1f4cc0f7a14b52fdfbd02ac890cc7aedbdfb1979)

Reply via email to