Re: [PATCH] [tree-optimization/110279] fix testcase pr110279-1.c

2024-09-29 Thread Jeff Law




On 5/23/24 3:55 AM, Di Zhao OS wrote:

-Original Message-
From: Jeff Law 
Sent: Wednesday, May 22, 2024 11:14 PM
To: Di Zhao OS ; gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] [tree-optimization/110279] fix testcase pr110279-1.c



On 5/22/24 5:46 AM, Di Zhao OS wrote:

The test case is for targets that support FMA. Previously
the "target" selector is missed in dg-final command.

Tested on x86_64-pc-linux-gnu.

Thanks
Di Zhao

gcc/testsuite/ChangeLog:

  * gcc.dg/pr110279-1.c: add target selector.

Rather than list targets explicitly in the test, wouldn't it be better
to have a common routine that could be used in other cases where we have
a test that requires FMA?

So something similar to check_effective_target_scalar_all_fma?


Jeff


Here is an updated version of the patch. Sorry I'm not very familiar
with the testsuite commands.

gcc/testsuite/ChangeLog:

 * gcc.dg/pr110279-1.c: add target selector.
This is OK.   Thanks for your patience.  SOrry it's taken so long.  Just 
never seemed to get near the top of my todo list.


Ideally we'll see maintainers adjust the scalar_all_fma selector and if 
we see other targets that have some fma, but not the full set, then 
we'll see a new target selector for the subsets of fma.


jeff



RE: [PATCH] [tree-optimization/110279] fix testcase pr110279-1.c

2024-05-23 Thread Di Zhao OS
> -Original Message-
> From: Jeff Law 
> Sent: Wednesday, May 22, 2024 11:14 PM
> To: Di Zhao OS ; gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH] [tree-optimization/110279] fix testcase pr110279-1.c
> 
> 
> 
> On 5/22/24 5:46 AM, Di Zhao OS wrote:
> > The test case is for targets that support FMA. Previously
> > the "target" selector is missed in dg-final command.
> >
> > Tested on x86_64-pc-linux-gnu.
> >
> > Thanks
> > Di Zhao
> >
> > gcc/testsuite/ChangeLog:
> >
> >  * gcc.dg/pr110279-1.c: add target selector.
> Rather than list targets explicitly in the test, wouldn't it be better
> to have a common routine that could be used in other cases where we have
> a test that requires FMA?
> 
> So something similar to check_effective_target_scalar_all_fma?
> 
> 
> Jeff

Here is an updated version of the patch. Sorry I'm not very familiar
with the testsuite commands.

gcc/testsuite/ChangeLog:

* gcc.dg/pr110279-1.c: add target selector.

---
gcc/testsuite/gcc.dg/pr110279-1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/pr110279-1.c 
b/gcc/testsuite/gcc.dg/pr110279-1.c
index a8c7257b28d..c4f94ea5810 100644
--- a/gcc/testsuite/gcc.dg/pr110279-1.c
+++ b/gcc/testsuite/gcc.dg/pr110279-1.c
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { scalar_all_fma || { i?86-*-* x86_64-*-* } } } } 
*/
 /* { dg-options "-Ofast --param avoid-fma-max-bits=512 --param 
tree-reassoc-width=4 -fdump-tree-widening_mul-details" } */
 /* { dg-additional-options "-mcpu=generic" { target aarch64*-*-* } } */
 /* { dg-additional-options "-mfma" { target i?86-*-* x86_64-*-* } } */
@@ -64,4 +64,4 @@ foo3 (data_e a, data_e b, data_e c, data_e d)
   return result;
 }
 
-/* { dg-final { scan-tree-dump-times "Generated FMA" 3 "widening_mul"} } */
\ No newline at end of file
+/* { dg-final { scan-tree-dump-times "Generated FMA" 3 "widening_mul" } } */
-- 
2.25.1




Re: [PATCH] [tree-optimization/110279] fix testcase pr110279-1.c

2024-05-22 Thread Jeff Law




On 5/22/24 5:46 AM, Di Zhao OS wrote:

The test case is for targets that support FMA. Previously
the "target" selector is missed in dg-final command.

Tested on x86_64-pc-linux-gnu.

Thanks
Di Zhao

gcc/testsuite/ChangeLog:

 * gcc.dg/pr110279-1.c: add target selector.
Rather than list targets explicitly in the test, wouldn't it be better 
to have a common routine that could be used in other cases where we have 
a test that requires FMA?


So something similar to check_effective_target_scalar_all_fma?


JEff