aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/stormy16/stormy16.c12
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6317e38..25d1c5d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2020-04-03 Jeff Law <law@redhat.com>
+
+ PR rtl-optimization/92264
+ * config/stormy16/stormy16.c (xstormy16_preferred_reload_class): Handle
+ reloading of auto-increment addressing modes.
+
2020-04-03 H.J. Lu <hongjiu.lu@intel.com>
PR target/94467
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 55fe829..2141531 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -497,7 +497,17 @@ xstormy16_secondary_reload_class (enum reg_class rclass,
static reg_class_t
xstormy16_preferred_reload_class (rtx x, reg_class_t rclass)
{
- if (rclass == GENERAL_REGS && MEM_P (x))
+ /* Only the first eight registers can be moved to/from memory.
+ So those prefer EIGHT_REGS.
+
+ Similarly reloading an auto-increment address is going to
+ require loads and stores, so we must use EIGHT_REGS for those
+ too. */
+ if (rclass == GENERAL_REGS
+ && (MEM_P (x)
+ || GET_CODE (x) == POST_INC
+ || GET_CODE (x) == PRE_DEC
+ || GET_CODE (x) == PRE_MODIFY))
return EIGHT_REGS;
return rclass;