aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2020-05-31 11:16:37 -0600
committerJeff Law <law@redhat.com>2020-05-31 11:18:15 -0600
commitc25d0fa4d76cbc46078624d101ac019ff3df1142 (patch)
tree891b08fcc93545e2d2a8d02ad1c402c76a544dcf /gcc/lra.c
parent05430b9b6a7c4aeaab595787ac1fbf6f3e0196a0 (diff)
downloadgcc-c25d0fa4d76cbc46078624d101ac019ff3df1142.zip
gcc-c25d0fa4d76cbc46078624d101ac019ff3df1142.tar.gz
gcc-c25d0fa4d76cbc46078624d101ac019ff3df1142.tar.bz2
Fix execute/20071219-1.c regression on H8 due to loss of REG_INC notes in peephole2.
gcc/ * lra.c (add_auto_inc_notes): Remove function. * reload1.c (add_auto_inc_notes): Similarly. Move into... * rtlanal.c (add_auto_inc_notes): New function. * rtl.h (add_auto_inc_notes): Add prototype. * recog.c (peep2_attempt): Scan and add REG_INC notes to new insns as needed.
Diffstat (limited to 'gcc/lra.c')
-rw-r--r--gcc/lra.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/gcc/lra.c b/gcc/lra.c
index 5e8b75b..3435cff 100644
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -2231,34 +2231,6 @@ has_nonexceptional_receiver (void)
return false;
}
-
-/* Process recursively X of INSN and add REG_INC notes if necessary. */
-static void
-add_auto_inc_notes (rtx_insn *insn, rtx x)
-{
- enum rtx_code code = GET_CODE (x);
- const char *fmt;
- int i, j;
-
- if (code == MEM && auto_inc_p (XEXP (x, 0)))
- {
- add_reg_note (insn, REG_INC, XEXP (XEXP (x, 0), 0));
- return;
- }
-
- /* Scan all X sub-expressions. */
- fmt = GET_RTX_FORMAT (code);
- for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
- {
- if (fmt[i] == 'e')
- add_auto_inc_notes (insn, XEXP (x, i));
- else if (fmt[i] == 'E')
- for (j = XVECLEN (x, i) - 1; j >= 0; j--)
- add_auto_inc_notes (insn, XVECEXP (x, i, j));
- }
-}
-
-
/* Remove all REG_DEAD and REG_UNUSED notes and regenerate REG_INC.
We change pseudos by hard registers without notification of DF and
that can make the notes obsolete. DF-infrastructure does not deal