Gentle ping:

https://gcc.gnu.org/pipermail/gcc-patches/2021-December/587449.html

on 2021/12/29 下午5:36, Kewen.Lin via Gcc-patches wrote:
> Hi,
> 
> When TARGET_AVOID_XFORM is set, we turn off VSX.  But at least from
> ISA3.0 (Power9), we support DQ form vector load/store.  This patch
> is to make it not clear VSX when P9 VECTOR supported, it also checks
> some flags which P9 VECTOR relies on, otherwise those flags could
> disable P9 VECTOR later.
> 
> Bootstrapped and regtested on powerpc64le-linux-gnu P9 and
> powerpc64-linux-gnu P8.
> 
> Is it ok for trunk?
> 
> BR,
> Kewen
> -----
> gcc/ChangeLog:
> 
>       * config/rs6000/rs6000.c (rs6000_option_override_internal): Consider
>       P9 VECTOR when determining to disable VSX for TARGET_AVOID_XFORM.
> ---
>  gcc/config/rs6000/rs6000.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> index 66b01e589b0..c020947abc8 100644
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -3865,7 +3865,10 @@ rs6000_option_override_internal (bool global_init_p)
>             rs6000_isa_flags_explicit |= OPTION_MASK_VSX;
>           }
>       }
> -      else if (TARGET_AVOID_XFORM > 0)
> +      else if (TARGET_AVOID_XFORM > 0
> +            /* Exclude P9 VECTOR which supports DQ form, but need to check
> +               some flags which are able to disable it as well.  */
> +            && !(TARGET_ALTIVEC && TARGET_P8_VECTOR && TARGET_P9_VECTOR))
>       msg = N_("%<-mvsx%> needs indexed addressing");
>        else if (!TARGET_ALTIVEC && (rs6000_isa_flags_explicit
>                                  & OPTION_MASK_ALTIVEC))
> --
> 2.27.0
> 

Reply via email to