on 2024/7/29 23:47, Peter Bergner wrote:
> On 7/29/24 5:21 AM, Kewen.Lin wrote:
>> on 2024/7/27 06:37, Carl Love wrote:
>>> --- /dev/null
>>> +++ b/gcc/testsuite/gcc.target/powerpc/vec-shift-double-runnable-int128.c
>>> @@ -0,0 +1,358 @@
>>> +/* { dg-do run  { target power10_hw } } */
>>> +/* { dg-do link { target { ! power10_hw } } } */
>>> +/* { dg-require-effective-target power10_ok } */
>>
>> As Peter pointed out in another thread, you need int128 effective target 
>> check as well,
>> otherwise it will fail with power10 -m32.
>>
>> Another nit: power10_hw should already guarantee power10_ok, so power10_ok
>> is only required for dg-do link.
> 
> I really dislike those *_ok tests.  The power10_ok test doesn't verify that
> the options being used to compile the test case enables Power10.  It only
> verifies the assembler you're using is Power10 enabled.  I agree that the
> power10_hw test includes the same (useless) assembler check that power10_ok
> includes, so power10_ok isn't needed.
> 
> <rant>
> Those *_ok tests really should be verifying the compiler options that will
> be used to compile the test case enables the features the test case is
> attempting to use.
> </rant>
> 
> 

Yes!

> Maybe the following will work?
> 
> +/* { dg-do run  { target power10_hw } } */
> +/* { dg-do link { target { ! power10_hw } } } */

Maybe we can replace link by compile here, as we care about compilation and
execution result more here.  (IMHO if it's still "link", power10_ok is useful
to stop this being tested on an environment with an assembler not supporting
power10).

BR,
Kewen

> +/* { dg-require-effective-target int128 } */
> ...
> 
> Carl, can you try testing the above change on ltcd97-lp7 and run the test
> in both 32-bit and 64-bit modes?
> 
> Peter
> 

Reply via email to