aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@synopsys.com>2017-04-14 13:40:43 +0200
committerClaudiu Zissulescu <claziss@gcc.gnu.org>2017-04-14 13:40:43 +0200
commit1fccdd40cf7a4802a3e78c0e5197332c69be3b5e (patch)
tree02c431585a916dc679c06310173ac5d400354ff7 /gcc
parent1f33abd75db99567376f41a9f21cbf509167aa97 (diff)
downloadgcc-1fccdd40cf7a4802a3e78c0e5197332c69be3b5e.zip
gcc-1fccdd40cf7a4802a3e78c0e5197332c69be3b5e.tar.gz
gcc-1fccdd40cf7a4802a3e78c0e5197332c69be3b5e.tar.bz2
[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 <claziss@synopsys.com> * config/arc/arc.c (arc_mode_dependent_address_p): Relax conditions to take advantage of various optimizations. From-SVN: r246925
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/arc/arc.c8
2 files changed, 7 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 788f029..27cfef5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-14 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * config/arc/arc.c (arc_mode_dependent_address_p): Relax
+ conditions to take advantage of various optimizations.
+
2017-04-13 Jeff Law <law@redhat.com>
* 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 0563a74..b28c590 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;
}