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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

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

commit r10-10711-gdaf9bd6c5c7835bdbca47c8f798bd110cc8f5be8
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Apr 22 13:38:11 2022 +0200

    rtlanal: Fix up replace_rtx [PR105333]

    The following testcase FAILs, because replace_rtx replaces a REG with
    CONST_WIDE_INT inside of a SUBREG, which is an invalid transformation
    because a SUBREG relies on SUBREG_REG having non-VOIDmode but
    CONST_WIDE_INT has VOIDmode.

    replace_rtx already has code to deal with it, but it was doing
    it only for CONST_INTs.  The following patch does it also for
    VOIDmode CONST_DOUBLE or CONST_WIDE_INT.

    2022-04-22  Jakub Jelinek  <ja...@redhat.com>

            PR rtl-optimization/105333
            * rtlanal.c (replace_rtx): Use simplify_subreg or
            simplify_unary_operation if CONST_SCALAR_INT_P rather than just
            CONST_INT_P.

            * gcc.dg/pr105333.c: New test.

    (cherry picked from commit 7092b7aea122a91824d048aeb23834cf1d19b1a1)

Reply via email to