This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 1/3] [ARC] Update mode_dependent_address_p hook.
- From: Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Cc: <Claudiu dot Zissulescu at synopsys dot com>, <Francois dot Bedard at synopsys dot com>, <andrew dot burgess at embecosm dot com>
- Date: Tue, 4 Apr 2017 11:58:59 +0200
- Subject: [PATCH 1/3] [ARC] Update mode_dependent_address_p hook.
- Authentication-results: sourceware.org; auth=none
- References: <1491299941-3908-1-git-send-email-claziss@synopsys.com>
Update arc_mode_dependent_address_p to avoid emitting subreg(mem (reg
..)) when expanding.
gcc/
2016-10-11 Claudiu Zissulescu <claziss@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