* [PATCH] [tree-optimization/110279] fix testcase pr110279-1.c
@ 2024-05-22 11:46 Di Zhao OS
2024-05-22 15:13 ` Jeff Law
0 siblings, 1 reply; 4+ messages in thread
From: Di Zhao OS @ 2024-05-22 11:46 UTC (permalink / raw)
To: gcc-patches
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.
---
gcc/testsuite/gcc.dg/pr110279-1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.dg/pr110279-1.c b/gcc/testsuite/gcc.dg/pr110279-1.c
index a8c7257b28d..5436163bc78 100644
--- a/gcc/testsuite/gcc.dg/pr110279-1.c
+++ b/gcc/testsuite/gcc.dg/pr110279-1.c
@@ -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" { target { { i?86-*-* x86_64-*-* } || { aarch64*-*-* } } } } } */
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [tree-optimization/110279] fix testcase pr110279-1.c
2024-05-22 11:46 [PATCH] [tree-optimization/110279] fix testcase pr110279-1.c Di Zhao OS
@ 2024-05-22 15:13 ` Jeff Law
2024-05-23 9:55 ` Di Zhao OS
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Law @ 2024-05-22 15:13 UTC (permalink / raw)
To: Di Zhao OS, gcc-patches
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] [tree-optimization/110279] fix testcase pr110279-1.c
2024-05-22 15:13 ` Jeff Law
@ 2024-05-23 9:55 ` Di Zhao OS
2024-06-18 1:51 ` [PING][PATCH] " Di Zhao OS
0 siblings, 1 reply; 4+ messages in thread
From: Di Zhao OS @ 2024-05-23 9:55 UTC (permalink / raw)
To: Jeff Law; +Cc: gcc-patches
> -----Original Message-----
> From: Jeff Law <jeffreyalaw@gmail.com>
> Sent: Wednesday, May 22, 2024 11:14 PM
> To: Di Zhao OS <dizhao@os.amperecomputing.com>; 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PING][PATCH] [tree-optimization/110279] fix testcase pr110279-1.c
2024-05-23 9:55 ` Di Zhao OS
@ 2024-06-18 1:51 ` Di Zhao OS
0 siblings, 0 replies; 4+ messages in thread
From: Di Zhao OS @ 2024-06-18 1:51 UTC (permalink / raw)
To: Jeff Law; +Cc: gcc-patches
This is OK for trunk?
Thanks,
Di Zhao
> -----Original Message-----
> From: Di Zhao OS <dizhao@os.amperecomputing.com>
> Sent: Thursday, May 23, 2024 5:55 PM
> To: Jeff Law <jeffreyalaw@gmail.com>
> Cc: gcc-patches@gcc.gnu.org
> Subject: RE: [PATCH] [tree-optimization/110279] fix testcase pr110279-1.c
>
> > -----Original Message-----
> > From: Jeff Law <jeffreyalaw@gmail.com>
> > Sent: Wednesday, May 22, 2024 11:14 PM
> > To: Di Zhao OS <dizhao@os.amperecomputing.com>; 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-18 1:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-22 11:46 [PATCH] [tree-optimization/110279] fix testcase pr110279-1.c Di Zhao OS
2024-05-22 15:13 ` Jeff Law
2024-05-23 9:55 ` Di Zhao OS
2024-06-18 1:51 ` [PING][PATCH] " Di Zhao OS
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).