[ARC] Test against frame_pointer_needed in arc_can_eliminate.
authorClaudiu Zissulescu <claziss@synopsys.com>
Thu, 1 Jun 2017 09:42:59 +0000 (11:42 +0200)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Thu, 1 Jun 2017 09:42:59 +0000 (11:42 +0200)
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

gcc/ChangeLog
gcc/config/arc/arc.c

index 92a7c0ab6bca7dd8eb6054f1aff8f99ce30f8568..ce7085b51cab2d9a575730ebada64eab8c32a96c 100644 (file)
@@ -1,3 +1,8 @@
+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
index caf01c8b6e135210c0375a51f13b4fdc65f6c833..d9ad1390416d92bab93df04ef3023c9a72ce67bb 100644 (file)
@@ -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