Segher Boessenkool <seg...@kernel.crashing.org> writes:
> The regrename pass temporarily changes some operand RTL to CC0 so that
> note_stores and scan_rtx don't see those operands.  CC0 is deprecated
> and we want to remove it, so we need to use something else here.
> PC fits the bill fine.
>
> Tested on powerpc64-linux {-m32,-m64}.  Is this okay for trunk?
>
>
> Segher
>
>
> 2019-10-01  Segher Boessenkool  <seg...@kernel.crashing.org>
>
>       * regrename.c (hide_operands): Use pc_rtx instead of cc0_rtx.
>
> ---
>  gcc/regrename.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/regrename.c b/gcc/regrename.c
> index 8c3bae8..ed1dcde 100644
> --- a/gcc/regrename.c
> +++ b/gcc/regrename.c
> @@ -1517,7 +1517,7 @@ scan_rtx (rtx_insn *insn, rtx *loc, enum reg_class cl, 
> enum scan_actions action,
>  }
>  
>  /* Hide operands of the current insn (of which there are N_OPS) by
> -   substituting cc0 for them.
> +   substituting pc for them.
>     Previous values are stored in the OLD_OPERANDS and OLD_DUPS.
>     For every bit set in DO_NOT_HIDE, we leave the operand alone.
>     If INOUT_AND_EC_ONLY is set, we only do this for OP_INOUT type operands
> @@ -1541,7 +1541,7 @@ hide_operands (int n_ops, rtx *old_operands, rtx 
> *old_dups,
>       continue;
>        if (!inout_and_ec_only || recog_data.operand_type[i] == OP_INOUT
>         || op_alt[i].earlyclobber)
> -     *recog_data.operand_loc[i] = cc0_rtx;
> +     *recog_data.operand_loc[i] = pc_rtx;
>      }
>    for (i = 0; i < recog_data.n_dups; i++)
>      {
> @@ -1551,7 +1551,7 @@ hide_operands (int n_ops, rtx *old_operands, rtx 
> *old_dups,
>       continue;
>        if (!inout_and_ec_only || recog_data.operand_type[opn] == OP_INOUT
>         || op_alt[opn].earlyclobber)
> -     *recog_data.dup_loc[i] = cc0_rtx;
> +     *recog_data.dup_loc[i] = pc_rtx;
>      }
>  }

It's mentioned by name later too:

          /* Step 2: Mark chains for which we have reads outside operands
             as unrenamable.
             We do this by munging all operands into CC0, and closing
             everything remaining.  */

OK with the same change there.

Thanks,
Richard

Reply via email to