Hi!

On Wed, Nov 25, 2020 at 02:02:16PM +0800, Kewen.Lin wrote:
> This patch is to set param_vect_partial_vector_usage as 1 on P10
> by default.  Due to the unexpected performance on Power9 of those
> vector with length instructions, we didn't enable vectorization
> with partial vectors before.  Some recent testings show that they
> perform expectedly on Power10 now.  The performance evaluation
> on the whole SPEC2017 with latest trunk and option set power10/
> Ofast/unroll shows it can speed up 525.x264_r by 10.80% and
> 554.roms_r by 1.94%.  One remarkable degradation is 523.xalancbmk_r
> -1.79% but it's identified not directly related to this enablement
> by some investigation.


> +      if (TARGET_POWER10)
> +       SET_OPTION_IF_UNSET (&global_options, &global_options_set,
> +                         param_vect_partial_vector_usage, 1);
> +      else
> +       /* Disable it on the default supported hardware Power9 since
> +       lxvl/stxvl have unexpected performance behaviors.  */
> +       SET_OPTION_IF_UNSET (&global_options, &global_options_set,
> +                         param_vect_partial_vector_usage, 0);

Maybe write this like

      /* The lxvl/stxvl instructions don't perform well before Power10.  */
      if (TARGET_POWER10)
       SET_OPTION_IF_UNSET (&global_options, &global_options_set,
                            param_vect_partial_vector_usage, 1);
      else
       SET_OPTION_IF_UNSET (&global_options, &global_options_set,
                            param_vect_partial_vector_usage, 0);

Okay for trunk with such a comment (before the "if").  Thanks!


Segher

Reply via email to