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

--- Comment #23 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Author: rearnsha
Date: Mon Aug 19 16:11:30 2019
New Revision: 274675

URL: https://gcc.gnu.org/viewcvs?rev=274675&root=gcc&view=rev
Log:
[aarch64] PR target/91386 Use copy_rtx to avoid modifying original insns in
peep2 pattern

PR target/91386 is a situation where a peephole2 pattern substitution
is discarded late because the selected instructions contain
frame-related notes that we cannot redistribute (because the pattern
has more than one insn in the output).  Unfortunately, the original
insns were being modified during the generation, so after the undo we
are left with corrupt RTL.

We avoid this by ensuring that the modifications are always made on a
copy, so that the original insns are never changed.

        Backport from mainline
        2019-09-09  Richard Earnshaw  <rearn...@arm.com>

        PR target/91386
        * config/aarch64/aarch64.c (aarch64_gen_adjusted_ldpstp): Use copy_rtx
        to preserve the contents of the original insns.


Modified:
    branches/gcc-9-branch/gcc/ChangeLog
    branches/gcc-9-branch/gcc/config/aarch64/aarch64.c

Reply via email to