From 04bf300e86bc88617a709bebe29787f95aec59cc Mon Sep 17 00:00:00 2001 From: Oleg Endo Date: Tue, 1 Oct 2019 14:55:34 +0000 Subject: [PATCH] re PR c++/88562 (Incorrect pointer incrementing on SH4) gcc/ 2019-10-01 Oleg Endo PR target/88562 * config/sh/sh.c (sh_extending_set_of_reg::use_as_extended_reg): Use sh_check_add_incdec_notes to preserve REG_INC notes when replacing a memory access insn. From-SVN: r276411 --- gcc/ChangeLog | 7 +++++++ gcc/config/sh/sh.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b671ae61e46..bb4de20ab16 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-10-01 Oleg Endo + + PR target/88562 + * config/sh/sh.c (sh_extending_set_of_reg::use_as_extended_reg): Use + sh_check_add_incdec_notes to preserve REG_INC notes when replacing + a memory access insn. + 2019-10-01 Bill Schmidt * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Don't swap diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 9917f2b9d34..ffab94f4dba 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -12068,9 +12068,11 @@ sh_extending_set_of_reg::use_as_extended_reg (rtx_insn* use_at_insn) const rtx r = gen_reg_rtx (SImode); rtx_insn* i0; if (from_mode == QImode) - i0 = emit_insn_after (gen_extendqisi2 (r, set_src), insn); + i0 = sh_check_add_incdec_notes ( + emit_insn_after (gen_extendqisi2 (r, set_src), insn)); else if (from_mode == HImode) - i0 = emit_insn_after (gen_extendhisi2 (r, set_src), insn); + i0 = sh_check_add_incdec_notes ( + emit_insn_after (gen_extendhisi2 (r, set_src), insn)); else gcc_unreachable (); -- 2.30.2