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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Richard Sandiford
<rsand...@gcc.gnu.org>:

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

commit r13-7961-gf5e56c5857cc6b704446c3666213468d25f6dcb2
Author: Richard Sandiford <richard.sandif...@arm.com>
Date:   Wed Oct 18 18:44:57 2023 +0100

    lra: Avoid unfolded plus-0

    While backporting another patch to an earlier release, I hit a
    situation in which lra_eliminate_regs_1 would eliminate an address to:

        (plus (reg:P R) (const_int 0))

    This address compared not-equal to plain:

        (reg:P R)

    which caused an ICE in a later peephole2.  (The ICE showed up in
    gfortran.fortran-torture/compile/pr80464.f90 on the branch but seems
    to be latent on trunk.)

    These unfolded PLUSes shouldn't occur in the insn stream, and later code
    in the same function tried to avoid them.

    gcc/
            PR target/111528
            * lra-eliminations.cc (lra_eliminate_regs_1): Use
simplify_gen_binary
            rather than gen_rtx_PLUS.

    (cherry picked from commit 10d59b802a7db9ae908291fb20627c1493cfa26c)

Reply via email to