diff options
author | Jeff Law <law@redhat.com> | 2020-05-31 11:16:37 -0600 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 2020-05-31 11:18:15 -0600 |
commit | c25d0fa4d76cbc46078624d101ac019ff3df1142 (patch) | |
tree | 891b08fcc93545e2d2a8d02ad1c402c76a544dcf /gcc/recog.c | |
parent | 05430b9b6a7c4aeaab595787ac1fbf6f3e0196a0 (diff) | |
download | gcc-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/recog.c')
-rw-r--r-- | gcc/recog.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index 8c098cf..25f19b1 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -3501,6 +3501,13 @@ peep2_attempt (basic_block bb, rtx_insn *insn, int match_len, rtx_insn *attempt) if (as_note) fixup_args_size_notes (before_try, last, get_args_size (as_note)); + /* Scan the new insns for embedded side effects and add appropriate + REG_INC notes. */ + if (AUTO_INC_DEC) + for (x = last; x != before_try; x = PREV_INSN (x)) + if (NONDEBUG_INSN_P (x)) + add_auto_inc_notes (x, PATTERN (x)); + /* If we generated a jump instruction, it won't have JUMP_LABEL set. Recompute after we're done. */ for (x = last; x != before_try; x = PREV_INSN (x)) |