* [PATCH] testsuite/vect: Make check more accurate.
@ 2023-11-07 8:22 Robin Dapp
2023-11-07 8:28 ` Richard Biener
2023-11-09 20:00 ` Thomas Schwinge
0 siblings, 2 replies; 5+ messages in thread
From: Robin Dapp @ 2023-11-07 8:22 UTC (permalink / raw)
To: gcc-patches; +Cc: rdapp.gcc
Hi,
similar to before this modifies a check so we do only match a
vectorization attempt if it succeeded. On riscv we potentially try
several modes of which some may fail.
I tested on riscv, aarch64 and x86 but on the cfarm machines
there is no vect_fold_extract_last. Maybe gcn would work?
Regards
Robin
gcc/testsuite/ChangeLog:
* gcc.dg/vect/vect-cond-reduc-4.c: Make check more accurate.
---
gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c b/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c
index 8ea8c538713..c5aa989ec29 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c
@@ -42,7 +42,7 @@ main (void)
}
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
-/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 2 "vect" { target { vect_fold_extract_last && vect_pack_trunc } } } } */
+/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST(?:(?!failed)(?!Re-trying).)*succeeded" 2 "vect" { target { vect_fold_extract_last && vect_pack_trunc } } } } */
/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target { { vect_fold_extract_last } && { ! vect_pack_trunc } } } } } */
/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 2 "vect" { target { ! vect_fold_extract_last } } } } */
--
2.41.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] testsuite/vect: Make check more accurate.
2023-11-07 8:22 [PATCH] testsuite/vect: Make check more accurate Robin Dapp
@ 2023-11-07 8:28 ` Richard Biener
2023-11-09 20:00 ` Thomas Schwinge
1 sibling, 0 replies; 5+ messages in thread
From: Richard Biener @ 2023-11-07 8:28 UTC (permalink / raw)
To: Robin Dapp; +Cc: gcc-patches
On Tue, Nov 7, 2023 at 9:22 AM Robin Dapp <rdapp.gcc@gmail.com> wrote:
>
> Hi,
>
> similar to before this modifies a check so we do only match a
> vectorization attempt if it succeeded. On riscv we potentially try
> several modes of which some may fail.
OK.
> I tested on riscv, aarch64 and x86 but on the cfarm machines
> there is no vect_fold_extract_last. Maybe gcn would work?
>
> Regards
> Robin
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/vect/vect-cond-reduc-4.c: Make check more accurate.
> ---
> gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c b/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c
> index 8ea8c538713..c5aa989ec29 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c
> @@ -42,7 +42,7 @@ main (void)
> }
>
> /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
> -/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 2 "vect" { target { vect_fold_extract_last && vect_pack_trunc } } } } */
> +/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST(?:(?!failed)(?!Re-trying).)*succeeded" 2 "vect" { target { vect_fold_extract_last && vect_pack_trunc } } } } */
> /* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target { { vect_fold_extract_last } && { ! vect_pack_trunc } } } } } */
> /* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 2 "vect" { target { ! vect_fold_extract_last } } } } */
>
> --
> 2.41.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] testsuite/vect: Make check more accurate.
2023-11-07 8:22 [PATCH] testsuite/vect: Make check more accurate Robin Dapp
2023-11-07 8:28 ` Richard Biener
@ 2023-11-09 20:00 ` Thomas Schwinge
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Schwinge @ 2023-11-09 20:00 UTC (permalink / raw)
To: Robin Dapp; +Cc: gcc-patches, Richard Biener, Andrew Stubbs, Julian Brown
Hi!
On 2023-11-07T09:22:16+0100, Robin Dapp <rdapp.gcc@gmail.com> wrote:
> similar to before this modifies a check so we do only match a
> vectorization attempt if it succeeded. On riscv we potentially try
> several modes of which some may fail.
>
> I tested on riscv, aarch64 and x86 but on the cfarm machines
> there is no vect_fold_extract_last. Maybe gcn would work?
With GCN (tested '-march=gfx906'), I actually see a "regression":
PASS: gcc.dg/vect/vect-cond-reduc-4.c (test for excess errors)
PASS: gcc.dg/vect/vect-cond-reduc-4.c execution test
PASS: gcc.dg/vect/vect-cond-reduc-4.c scan-tree-dump-times vect "LOOP VECTORIZED" 2
[-PASS:-]{+FAIL:+} gcc.dg/vect/vect-cond-reduc-4.c scan-tree-dump-times vect "optimizing condition reduction with [-FOLD_EXTRACT_LAST"-]{+FOLD_EXTRACT_LAST(?:(?!failed)(?!Re-trying).)*succeeded"+} 2
That's "regression" in quotes as indeed there is no "succeeded":
$ grep -C1 'optimizing condition reduction with FOLD_EXTRACT_LAST' -- vect-cond-reduc-4.c.176t.vect
[...]/source-gcc/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c:19:21: note: vect_is_simple_use: vectype vector(64) int
[...]/source-gcc/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c:19:21: missed: optimizing condition reduction with FOLD_EXTRACT_LAST.
vect_model_reduction_cost: inside_cost = 0, prologue_cost = 0, epilogue_cost = 0 .
--
[...]/source-gcc/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c:19:21: note: vect_is_simple_use: vectype vector(64) int
[...]/source-gcc/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c:19:21: missed: optimizing condition reduction with FOLD_EXTRACT_LAST.
vect_model_reduction_cost: inside_cost = 0, prologue_cost = 0, epilogue_cost = 0 .
Grüße
Thomas
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/vect/vect-cond-reduc-4.c: Make check more accurate.
> ---
> gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c b/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c
> index 8ea8c538713..c5aa989ec29 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c
> @@ -42,7 +42,7 @@ main (void)
> }
>
> /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
> -/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 2 "vect" { target { vect_fold_extract_last && vect_pack_trunc } } } } */
> +/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST(?:(?!failed)(?!Re-trying).)*succeeded" 2 "vect" { target { vect_fold_extract_last && vect_pack_trunc } } } } */
> /* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target { { vect_fold_extract_last } && { ! vect_pack_trunc } } } } } */
> /* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 2 "vect" { target { ! vect_fold_extract_last } } } } */
>
> --
> 2.41.0
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] testsuite/vect: Make check more accurate.
2023-11-07 8:31 juzhe.zhong
@ 2023-11-07 8:34 ` Robin Dapp
0 siblings, 0 replies; 5+ messages in thread
From: Robin Dapp @ 2023-11-07 8:34 UTC (permalink / raw)
To: juzhe.zhong, gcc-patches; +Cc: rdapp.gcc, jeffreyalaw, rguenther
Sorry, didn't reply-all:
> /* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target { { vect_fold_extract_last } && { ! vect_pack_trunc } } } } } */
>
> This check should be removed. Previously, I added it since we didn't enable vect_pack_trunc test.
> But I think we don't need it any more. Your fix looks more reasonable.
Ah, good, will remove it before committing.
Regards
Robin
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] testsuite/vect: Make check more accurate.
@ 2023-11-07 8:31 juzhe.zhong
2023-11-07 8:34 ` Robin Dapp
0 siblings, 1 reply; 5+ messages in thread
From: juzhe.zhong @ 2023-11-07 8:31 UTC (permalink / raw)
To: gcc-patches; +Cc: Robin Dapp, jeffreyalaw, rguenther
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
Hi, Robin.
/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target { { vect_fold_extract_last } && { ! vect_pack_trunc } } } } } */
This check should be removed. Previously, I added it since we didn't enable vect_pack_trunc test.
But I think we don't need it any more. Your fix looks more reasonable.
juzhe.zhong@rivai.ai
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-09 20:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-07 8:22 [PATCH] testsuite/vect: Make check more accurate Robin Dapp
2023-11-07 8:28 ` Richard Biener
2023-11-09 20:00 ` Thomas Schwinge
2023-11-07 8:31 juzhe.zhong
2023-11-07 8:34 ` Robin Dapp
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).