Update arc_mode_dependent_address_p to avoid emitting subreg(mem (reg
..)) when expanding.

gcc/
2016-10-11  Claudiu Zissulescu  <claz...@synopsys.com>

        * config/arc/arc.c (arc_mode_dependent_address_p): Relax
        conditions to take advantage of various optimizations.
---
 gcc/config/arc/arc.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 50bfa11..165f3d6 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -5641,13 +5641,9 @@ arc_mode_dependent_address_p (const_rtx addr, 
addr_space_t)
 {
   /* SYMBOL_REF is not mode dependent: it is either a small data reference,
      which is valid for loads and stores, or a limm offset, which is valid for
-     loads.  */
-  /* Scaled indices are scaled by the access mode; likewise for scaled
-     offsets, which are needed for maximum offset stores.  */
+     loads.  Scaled indices are scaled by the access mode.  */
   if (GET_CODE (addr) == PLUS
-      && (GET_CODE (XEXP ((addr), 0)) == MULT
-         || (CONST_INT_P (XEXP ((addr), 1))
-             && !SMALL_INT (INTVAL (XEXP ((addr), 1))))))
+      && GET_CODE (XEXP ((addr), 0)) == MULT)
     return true;
   return false;
 }
-- 
1.9.1

Reply via email to