public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH ver2] rs6000, altivec-2-runnable.c update the require-effective-target
@ 2024-06-19 16:13 Carl Love
  2024-06-19 16:15 ` [PATCH ver3] " Carl Love
  2024-06-21 10:36 ` [PATCH ver2] " Kewen.Lin
  0 siblings, 2 replies; 4+ messages in thread
From: Carl Love @ 2024-06-19 16:13 UTC (permalink / raw)
  To: gcc-patches, Segher Boessenkool, bergner, Kewen.Lin, Carl Love

GCC maintainers:

version 2:  Updated per the feedback from Peter, Kewen and Segher.  Note, Peter suggested the -mdejagnu-cpu= value must be power7.  
The test fails if -mdejagnu-cpu= is set to power7, needs to be power8.  Patch has been retested on a Power 10 box, it succeeds
with 2 passes and no fails.

Per the additional feedback after patch: 

  commit c892525813c94b018464d5a4edc17f79186606b7
  Author: Carl Love <cel@linux.ibm.com>
  Date:   Tue Jun 11 14:01:16 2024 -0400

      rs6000, altivec-2-runnable.c should be a runnable test
    
      The test case has "dg-do compile" set not "dg-do run" for a runnable
      test.  This patch changes the dg-do command argument to run.
    
      gcc/testsuite/ChangeLog:gcc/testsuite/ChangeLog:
              * gcc.target/powerpc/altivec-2-runnable.c: Change dg-do
              argument to run.

was approved and committed, I have updated the dg-require-effective-target
and dg-options as requested so the test will compile with -O2 on a 
machine that has a minimum support of Power 8 vector hardware.

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 

----------------------------------------------------------------
rs6000, altivec-2-runnable.c update the require-effective-target

The test requires a minimum of Power8 vector HW and a compile level
of -O2.

gcc/testsuite/ChangeLog:gcc/testsuite/ChangeLog:
	* gcc.target/powerpc/altivec-2-runnable.c: Change the
	require-effective-target for the test.
---
 gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c b/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c
index 17b23eb9d50..9e7ef89327b 100644
--- a/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c
@@ -1,7 +1,7 @@
-/* { dg-do run } */
-/* { dg-options "-mvsx" } */
-/* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
-/* { dg-require-effective-target powerpc_vsx } */
+/* { dg-do run { target vsx_hw } } */
+/* { dg-do compile { target { ! vmx_hw } } } */
+/* { dg-options "-O2  -mdejagnu-cpu=power8" } */
+/* { dg-require-effective-target powerpc_altivec } */
 
 #include <altivec.h>
 
-- 
2.45.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH ver3] rs6000, altivec-2-runnable.c update the require-effective-target
  2024-06-19 16:13 [PATCH ver2] rs6000, altivec-2-runnable.c update the require-effective-target Carl Love
@ 2024-06-19 16:15 ` Carl Love
  2024-06-21 10:36 ` [PATCH ver2] " Kewen.Lin
  1 sibling, 0 replies; 4+ messages in thread
From: Carl Love @ 2024-06-19 16:15 UTC (permalink / raw)
  To: gcc-patches, Segher Boessenkool, bergner, Kewen.Lin

Everyone, Oops, this should be version 3 not 2.  Sorry.

                  Carl 

On 6/19/24 09:13, Carl Love wrote:
> GCC maintainers:
> 
> version 2:  Updated per the feedback from Peter, Kewen and Segher.  Note, Peter suggested the -mdejagnu-cpu= value must be power7.  
> The test fails if -mdejagnu-cpu= is set to power7, needs to be power8.  Patch has been retested on a Power 10 box, it succeeds
> with 2 passes and no fails.
> 
> Per the additional feedback after patch: 
> 
>   commit c892525813c94b018464d5a4edc17f79186606b7
>   Author: Carl Love <cel@linux.ibm.com>
>   Date:   Tue Jun 11 14:01:16 2024 -0400
> 
>       rs6000, altivec-2-runnable.c should be a runnable test
>     
>       The test case has "dg-do compile" set not "dg-do run" for a runnable
>       test.  This patch changes the dg-do command argument to run.
>     
>       gcc/testsuite/ChangeLog:gcc/testsuite/ChangeLog:
>               * gcc.target/powerpc/altivec-2-runnable.c: Change dg-do
>               argument to run.
> 
> was approved and committed, I have updated the dg-require-effective-target
> and dg-options as requested so the test will compile with -O2 on a 
> machine that has a minimum support of Power 8 vector hardware.
> 
> 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 
> 
> ----------------------------------------------------------------
> rs6000, altivec-2-runnable.c update the require-effective-target
> 
> The test requires a minimum of Power8 vector HW and a compile level
> of -O2.
> 
> gcc/testsuite/ChangeLog:gcc/testsuite/ChangeLog:
> 	* gcc.target/powerpc/altivec-2-runnable.c: Change the
> 	require-effective-target for the test.
> ---
>  gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c b/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c
> index 17b23eb9d50..9e7ef89327b 100644
> --- a/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c
> +++ b/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c
> @@ -1,7 +1,7 @@
> -/* { dg-do run } */
> -/* { dg-options "-mvsx" } */
> -/* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
> -/* { dg-require-effective-target powerpc_vsx } */
> +/* { dg-do run { target vsx_hw } } */
> +/* { dg-do compile { target { ! vmx_hw } } } */
> +/* { dg-options "-O2  -mdejagnu-cpu=power8" } */
> +/* { dg-require-effective-target powerpc_altivec } */
>  
>  #include <altivec.h>
>  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH ver2] rs6000, altivec-2-runnable.c update the require-effective-target
  2024-06-19 16:13 [PATCH ver2] rs6000, altivec-2-runnable.c update the require-effective-target Carl Love
  2024-06-19 16:15 ` [PATCH ver3] " Carl Love
@ 2024-06-21 10:36 ` Kewen.Lin
  2024-06-21 15:59   ` Carl Love
  1 sibling, 1 reply; 4+ messages in thread
From: Kewen.Lin @ 2024-06-21 10:36 UTC (permalink / raw)
  To: Carl Love; +Cc: gcc-patches, Segher Boessenkool, bergner

Hi Carl,

on 2024/6/20 00:13, Carl Love wrote:
> GCC maintainers:
> 
> version 2:  Updated per the feedback from Peter, Kewen and Segher.  Note, Peter suggested the -mdejagnu-cpu= value must be power7.  
> The test fails if -mdejagnu-cpu= is set to power7, needs to be power8.  Patch has been retested on a Power 10 box, it succeeds
> with 2 passes and no fails.

IMHO Peter's suggestion on power7 (-mdejagnu-cpu=power7) is mainly for
altivec-1-runnable.c.  Both your testing and the comments in the test
case show this altivec-2-runnable.c requires at least power8.

> 
> Per the additional feedback after patch: 
> 
>   commit c892525813c94b018464d5a4edc17f79186606b7
>   Author: Carl Love <cel@linux.ibm.com>
>   Date:   Tue Jun 11 14:01:16 2024 -0400
> 
>       rs6000, altivec-2-runnable.c should be a runnable test
>     
>       The test case has "dg-do compile" set not "dg-do run" for a runnable
>       test.  This patch changes the dg-do command argument to run.
>     
>       gcc/testsuite/ChangeLog:gcc/testsuite/ChangeLog:
>               * gcc.target/powerpc/altivec-2-runnable.c: Change dg-do
>               argument to run.
> 
> was approved and committed, I have updated the dg-require-effective-target
> and dg-options as requested so the test will compile with -O2 on a 
> machine that has a minimum support of Power 8 vector hardware.
> 
> 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 
> 
> ----------------------------------------------------------------
> rs6000, altivec-2-runnable.c update the require-effective-target
> 
> The test requires a minimum of Power8 vector HW and a compile level
> of -O2.
> 
> gcc/testsuite/ChangeLog:gcc/testsuite/ChangeLog:
> 	* gcc.target/powerpc/altivec-2-runnable.c: Change the
> 	require-effective-target for the test.
> ---
>  gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c b/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c
> index 17b23eb9d50..9e7ef89327b 100644
> --- a/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c
> +++ b/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c
> @@ -1,7 +1,7 @@
> -/* { dg-do run } */
> -/* { dg-options "-mvsx" } */
> -/* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
> -/* { dg-require-effective-target powerpc_vsx } */
> +/* { dg-do run { target vsx_hw } } */

As this test case requires power8 and up, and dg-options specifies
-mdejagnu-cpu=power8, we should use p8vector_hw instead of vsx_hw here,
otherwise it will fail on power7 env.

> +/* { dg-do compile { target { ! vmx_hw } } } */

This condition should be ! <the one used for dg-do run>, so ! p8vector_hw.

> +/* { dg-options "-O2  -mdejagnu-cpu=power8" } */> +/* { dg-require-effective-target powerpc_altivec } */

This should be powerpc_vsx instead, otherwise this case can still be
tested with -mno-vsx -maltivec, then this test case would fail.

Besides, as the discussion on the name of this test case, could you also
rename this to p8vector-builtin-9.c instead?

BR,
Kewen


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH ver2] rs6000, altivec-2-runnable.c update the require-effective-target
  2024-06-21 10:36 ` [PATCH ver2] " Kewen.Lin
@ 2024-06-21 15:59   ` Carl Love
  0 siblings, 0 replies; 4+ messages in thread
From: Carl Love @ 2024-06-21 15:59 UTC (permalink / raw)
  To: Kewen.Lin, Carl Love; +Cc: gcc-patches, Segher Boessenkool, bergner

Kewen:

On 6/21/24 03:36, Kewen.Lin wrote:
> Hi Carl,
> 
> on 2024/6/20 00:13, Carl Love wrote:
>> GCC maintainers:
>>
>> version 2:  Updated per the feedback from Peter, Kewen and Segher.  Note, Peter suggested the -mdejagnu-cpu= value must be power7.  
>> The test fails if -mdejagnu-cpu= is set to power7, needs to be power8.  Patch has been retested on a Power 10 box, it succeeds
>> with 2 passes and no fails.
> 
> IMHO Peter's suggestion on power7 (-mdejagnu-cpu=power7) is mainly for
> altivec-1-runnable.c.  Both your testing and the comments in the test
> case show this altivec-2-runnable.c requires at least power8.

OK.  Per other thread changed altivec-1-runnable to power7.

> 
>>
>> Per the additional feedback after patch: 
>>
>>   commit c892525813c94b018464d5a4edc17f79186606b7
>>   Author: Carl Love <cel@linux.ibm.com>
>>   Date:   Tue Jun 11 14:01:16 2024 -0400
>>
>>       rs6000, altivec-2-runnable.c should be a runnable test
>>     
>>       The test case has "dg-do compile" set not "dg-do run" for a runnable
>>       test.  This patch changes the dg-do command argument to run.
>>     
>>       gcc/testsuite/ChangeLog:gcc/testsuite/ChangeLog:
>>               * gcc.target/powerpc/altivec-2-runnable.c: Change dg-do
>>               argument to run.
>>
>> was approved and committed, I have updated the dg-require-effective-target
>> and dg-options as requested so the test will compile with -O2 on a 
>> machine that has a minimum support of Power 8 vector hardware.
>>
>> 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 
>>
>> ----------------------------------------------------------------
>> rs6000, altivec-2-runnable.c update the require-effective-target
>>
>> The test requires a minimum of Power8 vector HW and a compile level
>> of -O2.
>>
>> gcc/testsuite/ChangeLog:gcc/testsuite/ChangeLog:
>> 	* gcc.target/powerpc/altivec-2-runnable.c: Change the
>> 	require-effective-target for the test.
>> ---
>>  gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c b/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c
>> index 17b23eb9d50..9e7ef89327b 100644
>> --- a/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c
>> +++ b/gcc/testsuite/gcc.target/powerpc/altivec-2-runnable.c
>> @@ -1,7 +1,7 @@
>> -/* { dg-do run } */
>> -/* { dg-options "-mvsx" } */
>> -/* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
>> -/* { dg-require-effective-target powerpc_vsx } */
>> +/* { dg-do run { target vsx_hw } } */
> 
> As this test case requires power8 and up, and dg-options specifies
> -mdejagnu-cpu=power8, we should use p8vector_hw instead of vsx_hw here,
> otherwise it will fail on power7 env.

Changed to p8vector_hw

> 
>> +/* { dg-do compile { target { ! vmx_hw } } } */
> 
> This condition should be ! <the one used for dg-do run>, so ! p8vector_hw.

Changed. 

> 
>> +/* { dg-options "-O2  -mdejagnu-cpu=power8" } */> +/* { dg-require-effective-target powerpc_altivec } */
> 
> This should be powerpc_vsx instead, otherwise this case can still be
> tested with -mno-vsx -maltivec, then this test case would fail.

OK
> 
> Besides, as the discussion on the name of this test case, could you also
> rename this to p8vector-builtin-9.c instead?

Put the name change in a separate patch to change both test file names.
 
                  Carl 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-21 17:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-19 16:13 [PATCH ver2] rs6000, altivec-2-runnable.c update the require-effective-target Carl Love
2024-06-19 16:15 ` [PATCH ver3] " Carl Love
2024-06-21 10:36 ` [PATCH ver2] " Kewen.Lin
2024-06-21 15:59   ` Carl Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).