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

--- Comment #29 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:e0e1bcb3a132a2a21cf855607b6c6d269be90e3c

commit r16-8245-ge0e1bcb3a132a2a21cf855607b6c6d269be90e3c
Author: Andrew Pinski <[email protected]>
Date:   Sat Mar 21 15:15:07 2026 -0700

    sh: Fix modes on if_then_else [PR123852]

    Inside the machine description of the sh target,
    there are some modes missing on if_then_else rtl. This
    causes an ICE during the vartrack pass where it is
    creating a simplifying a subreg of that rtl.
    This worked before r16-3067-g8e3239e3e92f3c where
    simplify_gen_subreg would return NULL RTL on the
    case where the mode was VOIDmode.
    Anyways this is the obvious patch which adds the modes
    on the if_then_else and now fixes the Ada and algol68
    building (and some other code).

    Tested by Doko on sh-linux-gnu and the Ada and algol68
    langauges enabled.
    Pushed as obvious.

            PR target/123852

    gcc/ChangeLog:

            * config/sh/sh.md (movsicc_t_false): Add the SImode
            on the if_then_else.
            (movsicc_t_true): Likewise.
            (negsi_cond): Likewise.
            (negdi_cond): Add the DImode on the if_then_else.
            (bst_m2a): Add the QImode on the if_then_else.

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

Reply via email to