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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:2349c6a442df76acd15b6efcd70f77ecd718f46a

commit r14-11285-g2349c6a442df76acd15b6efcd70f77ecd718f46a
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Jan 17 11:30:07 2025 +0100

    match.pd: Fix (FTYPE) N CMP (FTYPE) M optimization for GENERIC [PR118522]

    The last case of this optimization assumes that if 2 integral types
    have same precision and TYPE_UNSIGNED, then they are uselessly convertible.
    While that is very likely the case for GIMPLE, it is not the case for
    GENERIC, so the following patch adds there a convert so that the
    optimization produces also valid GENERIC.  Without it we got
    (int) p == b where b had _BitInt(32) type, so incompatible types.

    2025-01-17  Jakub Jelinek  <ja...@redhat.com>

            PR tree-optimization/118522
            * match.pd ((FTYPE) N CMP (FTYPE) M): Add convert, as in GENERIC
            integral types with the same precision and sign might actually not
            be compatible types.

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

    (cherry picked from commit 3ab9eb6946f7b832834b3d808c5617935e0be727)
  • [Bug middle-end/118522] ICE: 'v... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to