Commit 1fccdd40 by Claudiu Zissulescu Committed by Claudiu Zissulescu

[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
parent 1f33abd7
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
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment