* [PATCH] testsuite: vect: Don't xfail scan-tree-dump in gcc.dg/vect/bb-slp-32.c [PR96147]
@ 2024-03-21 9:33 Rainer Orth
2024-03-21 10:13 ` Richard Biener
0 siblings, 1 reply; 3+ messages in thread
From: Rainer Orth @ 2024-03-21 9:33 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Biener
[-- Attachment #1: Type: text/plain, Size: 764 bytes --]
gcc.dg/vect/bb-slp-32.c currently XPASSes on 32 and 64-bit Solaris/SPARC:
XPASS: gcc.dg/vect/bb-slp-32.c -flto -ffat-lto-objects scan-tree-dump slp2 "vectorization is not profitable"
XPASS: gcc.dg/vect/bb-slp-32.c scan-tree-dump slp2 "vectorization is not profitable"
At least on SPARC, the current xfail can simply go, but I'm highly
uncertain if this is right in general.
Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11.
Ok for trunk?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2024-03-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/testsuite:
PR tree-optimization/96147
* gcc.dg/vect/bb-slp-32.c (scan-tree-dump): Remove xfail.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: testsuite-vect-bb-slp-32-no-xfail.patch --]
[-- Type: text/x-patch, Size: 617 bytes --]
# HG changeset patch
# Parent b3b6fa4472bc1f2b170e2b736852ec93bae94480
testsuite: vect: Don't xfail scan-tree-dump in gcc.dg/vect/bb-slp-32.c [PR96147]
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-32.c b/gcc/testsuite/gcc.dg/vect/bb-slp-32.c
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-32.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-32.c
@@ -25,4 +25,4 @@ int foo (int *p, int a, int b)
return sum;
}
-/* { dg-final { scan-tree-dump "vectorization is not profitable" "slp2" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump "vectorization is not profitable" "slp2" } } */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] testsuite: vect: Don't xfail scan-tree-dump in gcc.dg/vect/bb-slp-32.c [PR96147]
2024-03-21 9:33 [PATCH] testsuite: vect: Don't xfail scan-tree-dump in gcc.dg/vect/bb-slp-32.c [PR96147] Rainer Orth
@ 2024-03-21 10:13 ` Richard Biener
2024-03-22 9:08 ` Rainer Orth
0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2024-03-21 10:13 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches
On Thu, 21 Mar 2024, Rainer Orth wrote:
> gcc.dg/vect/bb-slp-32.c currently XPASSes on 32 and 64-bit Solaris/SPARC:
>
> XPASS: gcc.dg/vect/bb-slp-32.c -flto -ffat-lto-objects scan-tree-dump slp2 "vectorization is not profitable"
> XPASS: gcc.dg/vect/bb-slp-32.c scan-tree-dump slp2 "vectorization is not profitable"
>
> At least on SPARC, the current xfail can simply go, but I'm highly
> uncertain if this is right in general.
>
> Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11.
>
> Ok for trunk?
The condition was made for the case where vectorization fails even when
not considering costing. But given we now do
p = __builtin_assume_aligned (p, __BIGGEST_ALIGNMENT__);
that condition doesn't make sense anymore (forgot to update it in my
r11-6715-gb36c9cd09472c8 change).
In principle the testcase should be profitable to vectorize with
the SLP reduction support now (and we'd vectorize it that way).
But we fail to apply SLP node CSE when merging the SLP instance
into a common subgraph, so we over-estimate cost (and perform
double code generation that's later CSEd).
That it's still not profitable on x86_64 for me is a quite narrow loss:
Vector cost: 144
Scalar cost: 140
So ideally we'd key the FAIL on .REDUC_PLUS not being available for
V4SImode but then we also try V2SImode where the reduction isn't
recognized. So the testcase wouldn't work well for targets comparing
cost.
I'd say we remove the dg-final completely for now. I filed PR114413
about the costing/CSE issue above.
Richard.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] testsuite: vect: Don't xfail scan-tree-dump in gcc.dg/vect/bb-slp-32.c [PR96147]
2024-03-21 10:13 ` Richard Biener
@ 2024-03-22 9:08 ` Rainer Orth
0 siblings, 0 replies; 3+ messages in thread
From: Rainer Orth @ 2024-03-22 9:08 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1955 bytes --]
Hi Richard,
> On Thu, 21 Mar 2024, Rainer Orth wrote:
>
>> gcc.dg/vect/bb-slp-32.c currently XPASSes on 32 and 64-bit Solaris/SPARC:
>>
>> XPASS: gcc.dg/vect/bb-slp-32.c -flto -ffat-lto-objects scan-tree-dump
>> slp2 "vectorization is not profitable"
>> XPASS: gcc.dg/vect/bb-slp-32.c scan-tree-dump slp2 "vectorization is not
>> profitable"
>>
>> At least on SPARC, the current xfail can simply go, but I'm highly
>> uncertain if this is right in general.
>>
>> Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11.
>>
>> Ok for trunk?
>
> The condition was made for the case where vectorization fails even when
> not considering costing. But given we now do
>
> p = __builtin_assume_aligned (p, __BIGGEST_ALIGNMENT__);
>
> that condition doesn't make sense anymore (forgot to update it in my
> r11-6715-gb36c9cd09472c8 change).
>
> In principle the testcase should be profitable to vectorize with
> the SLP reduction support now (and we'd vectorize it that way).
> But we fail to apply SLP node CSE when merging the SLP instance
> into a common subgraph, so we over-estimate cost (and perform
> double code generation that's later CSEd).
>
> That it's still not profitable on x86_64 for me is a quite narrow loss:
>
> Vector cost: 144
> Scalar cost: 140
>
> So ideally we'd key the FAIL on .REDUC_PLUS not being available for
> V4SImode but then we also try V2SImode where the reduction isn't
> recognized. So the testcase wouldn't work well for targets comparing
> cost.
>
> I'd say we remove the dg-final completely for now. I filed PR114413
> about the costing/CSE issue above.
Thanks. This is what I committed after re-testing.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2024-03-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/testsuite:
PR tree-optimization/96147
* gcc.dg/vect/bb-slp-32.c (dg-final): Remove.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: testsuite-vect-bb-slp-32-no-xfail.patch --]
[-- Type: text/x-patch, Size: 549 bytes --]
# HG changeset patch
# Parent b3b6fa4472bc1f2b170e2b736852ec93bae94480
testsuite: vect: Don't xfail scan-tree-dump in gcc.dg/vect/bb-slp-32.c [PR96147]
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-32.c b/gcc/testsuite/gcc.dg/vect/bb-slp-32.c
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-32.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-32.c
@@ -24,5 +24,3 @@ int foo (int *p, int a, int b)
bar (x);
return sum;
}
-
-/* { dg-final { scan-tree-dump "vectorization is not profitable" "slp2" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-22 9:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-21 9:33 [PATCH] testsuite: vect: Don't xfail scan-tree-dump in gcc.dg/vect/bb-slp-32.c [PR96147] Rainer Orth
2024-03-21 10:13 ` Richard Biener
2024-03-22 9:08 ` Rainer Orth
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).