Hi Martin,

On 10/14/21 2:49 AM, Martin Liška wrote:
> Hello.
>
> There's follow up flag handling simplification based on
> 4ab51fa0e1705201420d87b601bd92bc643b3d52.
>
> Patch can bootstrap on ppc64le-linux-gnu and survives regression tests.
>
> Ready to be installed?
> Thanks,
> Martin
>
> gcc/ChangeLog:
>
>     * config/rs6000/rs6000.c (rs6000_override_options_after_change):
>     Do not set flag_rename_registers, it's already default behavior.
>     Use EnabledBy for unroll_only_small_loops.
>     * config/rs6000/rs6000.opt: Use EnabledBy for
>     unroll_only_small_loops.
> ---
>  gcc/config/rs6000/rs6000.c   | 7 +------
>  gcc/config/rs6000/rs6000.opt | 2 +-
>  2 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> index acba4d9f26c..40146179e06 100644
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -3472,13 +3472,8 @@ rs6000_override_options_after_change (void)
>    /* Explicit -funroll-loops turns -munroll-only-small-loops off, and
>       turns -frename-registers on.  */
>    if ((OPTION_SET_P (flag_unroll_loops) && flag_unroll_loops)
> -       || (OPTION_SET_P (flag_unroll_all_loops)
> -       && flag_unroll_all_loops))
> +       || (OPTION_SET_P (flag_unroll_all_loops && flag_unroll_all_loops)))

Looks like you got your parentheses wrong here.

Thanks,
Bill

>      {
> -      if (!OPTION_SET_P (unroll_only_small_loops))
> -    unroll_only_small_loops = 0;
> -      if (!OPTION_SET_P (flag_rename_registers))
> -    flag_rename_registers = 1;
>        if (!OPTION_SET_P (flag_cunroll_grow_size))
>      flag_cunroll_grow_size = 1;
>      }
> diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
> index 9d7878f144a..faeb7423ca7 100644
> --- a/gcc/config/rs6000/rs6000.opt
> +++ b/gcc/config/rs6000/rs6000.opt
> @@ -546,7 +546,7 @@ Target Undocumented Var(rs6000_optimize_swaps) Init(1) 
> Save
>  Analyze and remove doubleword swaps from VSX computations.
>  
>  munroll-only-small-loops
> -Target Undocumented Var(unroll_only_small_loops) Init(0) Save
> +Target Undocumented Var(unroll_only_small_loops) Init(0) Save 
> EnabledBy(funroll-loops)
>  ; Use conservative small loop unrolling.
>  
>  mpower9-misc

Reply via email to