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

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <u...@gcc.gnu.org>:

https://gcc.gnu.org/g:76cbd678d123ed93f99c4c52456bc14290f19b7f

commit r16-1420-g76cbd678d123ed93f99c4c52456bc14290f19b7f
Author: Uros Bizjak <ubiz...@gmail.com>
Date:   Wed Jun 11 14:12:33 2025 +0200

    i386: Fix signed integer overflow in ix86_expand_int_movcc [PR120604]

    Patch for PR120553 enabled full 64-bit DImode immediates in
    ix86_expand_int_movcc.  However, the function calculates the difference
    between two immediate arguments using signed 64-bit HOST_WIDE_INT
    subtractions that can cause signed integer overflow.

    Avoid the overflow by casting operands of subtractions to
    (unsigned HOST_WIDE_INT).

            PR target/120604

    gcc/ChangeLog:

            * config/i386/i386-expand.cc (ix86_expand_int_movcc): Cast operands
of
            signed 64-bit HOST_WIDE_INT subtractions to (unsigned
HOST_WIDE_INT).

Reply via email to