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/reload1.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/reload1.c')
-rw-r--r-- | gcc/reload1.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 88f4727..19a64f2 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -395,7 +395,6 @@ static void delete_output_reload (rtx_insn *, int, int, rtx); static void delete_address_reloads (rtx_insn *, rtx_insn *); static void delete_address_reloads_1 (rtx_insn *, rtx, rtx_insn *); static void inc_for_reload (rtx, rtx, rtx, poly_int64); -static void add_auto_inc_notes (rtx_insn *, rtx); static void substitute (rtx *, const_rtx, rtx); static bool gen_reload_chain_without_interm_reg_p (int, int); static int reloads_conflict (int, int); @@ -9071,28 +9070,3 @@ inc_for_reload (rtx reloadreg, rtx in, rtx value, poly_int64 inc_amount) emit_insn (gen_sub2_insn (reloadreg, inc)); } } - -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 the operand 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)); - } -} |