On Fri, 18 Mar 2016, Jakub Jelinek wrote:

> Hi!
> 
> This patch fixes one of the spots that use replace_rtx, as this changes
> debug insns, it clearly wants to replace just based on regno, not on pointer
> equality, and for debug insns simplification is always desirable too.
> The other place in reload1 that modifies DEBUG_INSNs also uses
> simplify_replace_rtx.
> 
> Bootstrapped/regtested on {x86_64,i686,powerpc64{,le}}-linux, ok for trunk?

Ok.

Thanks,
Richard.

> 2016-03-18  Jakub Jelinek  <ja...@redhat.com>
> 
>       * reload1.c (emit_input_reload_insns): Use simplify_replace_rtx
>       instead of replace_rtx for DEBUG_INSNs.
> 
> --- gcc/reload1.c.jj  2016-03-02 07:39:13.000000000 +0100
> +++ gcc/reload1.c     2016-03-16 10:41:34.622921016 +0100
> @@ -7395,7 +7395,9 @@ emit_input_reload_insns (struct insn_cha
>             /* Adjust any debug insns between temp and insn.  */
>             while ((temp = NEXT_INSN (temp)) != insn)
>               if (DEBUG_INSN_P (temp))
> -               replace_rtx (PATTERN (temp), old, reloadreg);
> +               INSN_VAR_LOCATION_LOC (temp)
> +                 = simplify_replace_rtx (INSN_VAR_LOCATION_LOC (temp),
> +                                         old, reloadreg);
>               else
>                 gcc_assert (NOTE_P (temp));
>           }

Reply via email to