* Claudiu Zissulescu <claudiu.zissule...@synopsys.com> [2017-05-19 12:31:02 
+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-01-09  Claudiu Zissulescu  <claz...@synopsys.com>
> 
>       * config/arc/arc.c (arc_can_eliminate): Test against
>       arc_frame_pointer_needed.

Looks good,

thanks,
Andrew



> ---
>  gcc/config/arc/arc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
> index 0c4c901..aac1952 100644
> --- a/gcc/config/arc/arc.c
> +++ b/gcc/config/arc/arc.c
> @@ -4733,7 +4733,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
> -- 
> 1.9.1
> 

Reply via email to