aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Endo <olegendo@gcc.gnu.org>2019-10-01 14:55:34 +0000
committerOleg Endo <olegendo@gcc.gnu.org>2019-10-01 14:55:34 +0000
commit04bf300e86bc88617a709bebe29787f95aec59cc (patch)
tree63e3ce269d35017f8c69e7cc578472b95e6b33a9
parent2a2592a10c13c53fc1fbac0bfe9e661201dab53f (diff)
downloadgcc-04bf300e86bc88617a709bebe29787f95aec59cc.zip
gcc-04bf300e86bc88617a709bebe29787f95aec59cc.tar.gz
gcc-04bf300e86bc88617a709bebe29787f95aec59cc.tar.bz2
re PR c++/88562 (Incorrect pointer incrementing on SH4)
gcc/ 2019-10-01 Oleg Endo <olegendo@gcc.gnu.org> 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
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/sh/sh.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b671ae6..bb4de20 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2019-10-01 Oleg Endo <olegendo@gcc.gnu.org>
+
+ 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 <wschmidt@linux.ibm.com>
* 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 9917f2b..ffab94f 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 ();