From 19dc47524f9bd79cf5c8bc0dcb4a1c381b88391d Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Thu, 1 Jun 2017 11:42:59 +0200 Subject: [PATCH] [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 * config/arc/arc.c (arc_can_eliminate): Test against arc_frame_pointer_needed. From-SVN: r248782 --- gcc/ChangeLog | 5 +++++ gcc/config/arc/arc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 92a7c0ab6bc..ce7085b51ca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-06-01 Claudiu Zissulescu + + * config/arc/arc.c (arc_can_eliminate): Test against + arc_frame_pointer_needed. + 2017-06-01 Claudiu Zissulescu * config/arc/arc.c (arc_expand_prologue): Emit a special barrier diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index caf01c8b6e1..d9ad1390416 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -4644,7 +4644,7 @@ arc_final_prescan_insn (rtx_insn *insn, rtx *opvec ATTRIBUTE_UNUSED, static bool 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 -- 2.30.2