Commit 19dc4752 by Claudiu Zissulescu Committed by Claudiu Zissulescu

[ARC] Test against frame_pointer_needed in arc_can_eliminate.

arc_can_eliminate is using arc_frmae_pointer_required() which is wrong
as the frame_pointer_needed can be set on different conditions. Fix it
by calling arc_frame_pointer_needed().

gcc/
2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_can_eliminate): Test against
	arc_frame_pointer_needed.

From-SVN: r248782
parent 2daad50b
2017-06-01 Claudiu Zissulescu <claziss@synopsys.com> 2017-06-01 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_can_eliminate): Test against
arc_frame_pointer_needed.
2017-06-01 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_expand_prologue): Emit a special barrier * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
to prevent store reordering. to prevent store reordering.
* config/arc/arc.md (UNSPEC_ARC_STKTIE): Define. * config/arc/arc.md (UNSPEC_ARC_STKTIE): Define.
......
...@@ -4644,7 +4644,7 @@ arc_final_prescan_insn (rtx_insn *insn, rtx *opvec ATTRIBUTE_UNUSED, ...@@ -4644,7 +4644,7 @@ arc_final_prescan_insn (rtx_insn *insn, rtx *opvec ATTRIBUTE_UNUSED,
static bool static bool
arc_can_eliminate (const int from ATTRIBUTE_UNUSED, const int to) arc_can_eliminate (const int from ATTRIBUTE_UNUSED, const int to)
{ {
return to == FRAME_POINTER_REGNUM || !arc_frame_pointer_required (); return ((to == FRAME_POINTER_REGNUM) || !arc_frame_pointer_needed ());
} }
/* Define the offset between two registers, one to be eliminated, and /* Define the offset between two registers, one to be eliminated, and
......
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