on 2022/8/24 13:11, HAO CHEN GUI wrote:
> Hi Segher,
> 
> On 23/8/2022 下午 10:26, Segher Boessenkool wrote:
>> Hi!
>>
>> On Fri, Aug 19, 2022 at 10:35:54AM +0800, HAO CHEN GUI wrote:
>>> --- 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-options "-mdejagnu-cpu=power9" } */
>>> +/* { dg-additional-options "-mpowerpc64" { target { powerpc*-*-linux* && 
>>> ilp32 } } } */
>>
>> You can add this always.  It is default on 64-bit systems, but it is
>> simpler to just always add it:
>> /* { dg-additional-options "-mpowerpc64" } */
>>
>> Or are there subtargets that will error on this?
> Yes, AIX fails if TARGET_POWERPC64 is set and TARGET_64BIT is not set.
> So I add "-mpowerpc64" for Linux 32-bit environment.
> 
>   if (TARGET_POWERPC64 && ! TARGET_64BIT)                               \
>     {                                                                   \
>       error ("%<-maix64%> required: 64-bit computation with 32-bit addressing 
> not yet supported"); \
>     }
> 

Could you try to test with dg-options "-mdejagnu-cpu=power9 -mpowerpc64" all 
the time, but still
having that has_arch_ppc64 effective target on aix?

I'd expect has_arch_ppc64 check to fail on aix 32bit, the error will not be a 
problem (turning
into an UNSUPPORTED then)?

BR,
Kewen

Reply via email to