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

--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <[email protected]>:

https://gcc.gnu.org/g:9e61a171244110a45a87bb010704f2f9d4030181

commit r16-6350-g9e61a171244110a45a87bb010704f2f9d4030181
Author: Andrew Pinski <[email protected]>
Date:   Mon Dec 22 17:58:35 2025 -0800

    ifcvt: Fix noce_try_cond_zero_arith after get_base_reg change [PR123267]

    A few fixes are needed after the change to get_base_reg of
    r16-6333-gac64ceb33bf05b. First we need to use the correct target mode
    of the operand, this means if we are doing a subreg of QI mode, using
    QImode for the conditional move.
    Second we also need to use the original operands instead of the ones
    removing the subreg still.

    Pushed as obvious after a bootstrap/test on x86_64-linux-gnu.

            PR rtl-optimization/123267
    gcc/ChangeLog:

            * ifcvt.cc (noce_try_cond_zero_arith): Pass the original operands
            of a instead of the stripped off values. The mode of the operand
            which is being used.

    gcc/testsuite/ChangeLog:

            * gcc.dg/torture/pr123267-1.c: New test.

    Signed-off-by: Andrew Pinski <[email protected]>

Reply via email to