Hi Segher,
  Thanks for your review comments.

On 2/9/2022 下午 11:56, Segher Boessenkool wrote:
>> -  const signed long __builtin_vsx_scalar_extract_exp (double);
>> +  const unsigned long long __builtin_vsx_scalar_extract_exp (double);
>>      VSEEDP xsxexpdp {}
>>
>> -  const signed long __builtin_vsx_scalar_extract_sig (double);
>> +  const unsigned long long __builtin_vsx_scalar_extract_sig (double);
>>      VSESDP xsxsigdp {}
> This also brings these legacy builtins in line with the vec_ versions,
> which are the preferred builtins (they are defined in the PVIPR).

The return type of vec_ version built-ins are different than their definition
in PVIPR. In PVIPR, they're vector unsigned int or vector unsigned long long.
Shall we correct them?

  const vd __builtin_vsx_extract_exp_dp (vd);
    VEEDP xvxexpdp {}

  const vf __builtin_vsx_extract_exp_sp (vf);
    VEESP xvxexpsp {}

  const vd __builtin_vsx_extract_sig_dp (vd);
    VESDP xvxsigdp {}

  const vf __builtin_vsx_extract_sig_sp (vf);
    VESSP xvxsigsp {}
> 
>> --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-0.c
>> +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-0.c
>> @@ -1,7 +1,8 @@
>> -/* { dg-do compile { target { powerpc*-*-* } } } */
>> -/* { dg-require-effective-target lp64 } */
>> -/* { dg-require-effective-target powerpc_p9vector_ok } */
>> +/* { dg-do compile { target { powerpc*-*-linux* } } } */
> Why?
The powerpc*-*-linux* is no need as bfp.exp excludes AIX and Darwin.
I will modify it.

> 
>>  /* { dg-options "-mdejagnu-cpu=power9" } */
>> +/* { dg-additional-options "-mpowerpc64" } */
>> +/* { dg-require-effective-target has_arch_ppc64 } */
> This is guaranteed already by that -mpowerpc64.
> 
> It probably is best if you do not add -mpowerpc64 at all.  That solves
> both problems, is simpler, and gives better coverage as well :-)
> 
> So just use has_arch_ppc64 instead of lp64.  That makes it run on a
> strict superset of cases :-)
We commonly do regression test with -m32 and -m64. So if -mpowerpc64 is
not added, the combination of "-m32/-mpowerpc64" is not tested.

Thanks
Gui Haochen

Reply via email to