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

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

https://gcc.gnu.org/g:013ac06a2d75f392a3acf8d2f775f1e9fdc54815

commit r17-5321-g013ac06a2d75f392a3acf8d2f775f1e9fdc54815
Author: Jakub Jelinek <[email protected]>
Date:   Mon Oct 19 10:01:22 2026 +0200

    bitintlower: Fix up lowering of large/huge _BitInt rotates with signed
operand [PR127921]

    I believe we never have LROTATE_EXPRs/RROTATE_EXPRs with signed large/huge
    _BitInt operands in the IL, because the forwprop pattern matching doesn't
    try to match those (because we know they will be split again) and while
    __builtin_stdc_rotate_* emits them, it is only for unsigned operands.
    That said, in the lowering I actually attempted to write support for
    those, just made two errors in there if the operand is not INTEGER_CST.
    One is creating a cast from the signed type to the signed type again
    instead of its unsigned variant, and the other is not actually using
    the result of the cast later on.

    The following patch fixes both of those.

    2026-10-19  Jakub Jelinek  <[email protected]>

            PR middle-end/127921
            * gimple-lower-bitint.cc (gimple_lower_bitint) <case LROTATE_EXPR>:
            Fix up cast to utype if rhs1 is not INTEGER_CST.

    Reviewed-by: Richard Biener <[email protected]>

Reply via email to