From 1fccdd40cf7a4802a3e78c0e5197332c69be3b5e Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Fri, 14 Apr 2017 13:40:43 +0200 Subject: [PATCH] [ARC] Update mode_dependent_address_p hook. Update arc_mode_dependent_address_p to avoid emitting subreg(mem (reg ..)) when expanding by relaxing the conditions. gcc/ 2017-04-14 Claudiu Zissulescu * config/arc/arc.c (arc_mode_dependent_address_p): Relax conditions to take advantage of various optimizations. From-SVN: r246925 --- gcc/ChangeLog | 5 +++++ gcc/config/arc/arc.c | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 788f02942cc..27cfef5a72e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-04-14 Claudiu Zissulescu + + * config/arc/arc.c (arc_mode_dependent_address_p): Relax + conditions to take advantage of various optimizations. + 2017-04-13 Jeff Law * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 0563a74b724..b28c590ed26 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -5509,13 +5509,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; } -- 2.30.2