From: Claudiu Zissulescu Date: Thu, 1 Jun 2017 09:42:59 +0000 (+0200) Subject: [ARC] Test against frame_pointer_needed in arc_can_eliminate. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=19dc47524f9bd79cf5c8bc0dcb4a1c381b88391d;p=gcc.git [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 --- 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