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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Earnshaw <[email protected]>:

https://gcc.gnu.org/g:c48b55fa7764477008fbf187fadb352e3391a3f5

commit r16-5914-gc48b55fa7764477008fbf187fadb352e3391a3f5
Author: Richard Earnshaw <[email protected]>
Date:   Fri Dec 5 14:34:38 2025 +0000

    arm: avoid invalid shift in arm_canonicalize_comparison [PR122999]

    There was UB in arm_canonicalize_comparison if it is called with
    both operands of type VOIDmode.  Avoid this by first handling
    floating-point types, then returning if we are left with anything
    other than an integer mode.  For belt-and-braces also check that
    the mode does not require a mask larger than HOST_WIDE_INT.

    gcc/ChangeLog:

            PR target/122999
            * config/arm/arm.cc (arm_canonicalize_comparison): Defer
            initializing maxval until we know we are dealing with an
            integer mode.

Reply via email to