Hi Carl,

on 2024/6/20 00:18, Carl Love wrote:
> GCC maintainers:
> 
> The dg options for this test should be the same as for altivec-2-runnable.c.  
> This patch updates the dg options to match 
> the settings in altivec-2-runnable.c.
> 
> The patch has been tested on Power 10 with no regression failures.
> 
> Please let me know if this patch is acceptable for mainline.  Thanks.
> 
>                         Carl 
> 
> ----------------------------------------------------------------------------------From
>  289e15d215161ad45ae1aae7a5dedd2374737ec4 rs6000, altivec-1-runnable.c update 
> the require-effective-target
> 
> The test requires a minimum of Power8 vector HW and a compile level
> of -O2.

This is not true, vec_unpackh and vec_unpackl doesn't require power8,
vupk[hl]s[hb]/vupk[hl]px are all ISA 2.03.

> 
> gcc/testsuite/ChangeLog:gcc/testsuite/ChangeLog:
>       * gcc.target/powerpc/altivec-1-runnable.c: Change the
>       require-effective-target for the test.
> ---
>  gcc/testsuite/gcc.target/powerpc/altivec-1-runnable.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-1-runnable.c 
> b/gcc/testsuite/gcc.target/powerpc/altivec-1-runnable.c
> index da8ebbc30ba..c113089c13a 100644
> --- a/gcc/testsuite/gcc.target/powerpc/altivec-1-runnable.c
> +++ b/gcc/testsuite/gcc.target/powerpc/altivec-1-runnable.c
> @@ -1,6 +1,7 @@
> -/* { dg-do compile { target powerpc*-*-* } } */
> -/* { dg-require-effective-target powerpc_altivec_ok } */
> -/* { dg-options "-maltivec" } */
> +/* { dg-do run { target vsx_hw } } */

So this line should check for vmx_hw.

> +/* { dg-do compile { target { ! vmx_hw } } } */
> +/* { dg-options "-O2 -mdejagnu-cpu=power8" } */

With more thinking, I think it's better to use
"-O2 -maltivec" to be consistent with the others.

As mentioned in the other thread, powerpc_altivec
effective target check should guarantee the altivec
feature support, if any default cpu type or user
specified option disable altivec, this test case
will not be tested.  If we specify one cpu type
specially here, it may cause confusion why it's
different from the other existing ones.  So let's
go without no specified cpu type.

Besides, similar to the request for altivec-1-runnable.c,
could you also rename this to altivec-38.c?

BR,
Kewen

> +/* { dg-require-effective-target powerpc_altivec } */
>  
>  #include <altivec.h>
>  

Reply via email to