* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
@ 2020-10-19 15:21 ` rguenth at gcc dot gnu.org
2020-10-21 9:18 ` clyon at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-19 15:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Target Milestone|--- |11.0
Last reconfirmed| |2020-10-19
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, I'll have a look how/if to adjust testcases. Help appreciated.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
2020-10-19 15:21 ` [Bug tree-optimization/97494] " rguenth at gcc dot gnu.org
@ 2020-10-21 9:18 ` clyon at gcc dot gnu.org
2020-12-11 12:15 ` ro at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: clyon at gcc dot gnu.org @ 2020-10-21 9:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
Christophe Lyon <clyon at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clyon at gcc dot gnu.org
--- Comment #2 from Christophe Lyon <clyon at gcc dot gnu.org> ---
Similar problems seen on arm too.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
2020-10-19 15:21 ` [Bug tree-optimization/97494] " rguenth at gcc dot gnu.org
2020-10-21 9:18 ` clyon at gcc dot gnu.org
@ 2020-12-11 12:15 ` ro at gcc dot gnu.org
2021-01-14 9:27 ` rguenth at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ro at gcc dot gnu.org @ 2020-12-11 12:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Build|powerpc64*-linux-gnu |
Target|powerpc64*-linux-gnu |powerpc64*-linux-gnu,
| |sparc-sun-solaris2.11
CC| |ro at gcc dot gnu.org
Host|powerpc64*-linux-gnu |
--- Comment #3 from Rainer Orth <ro at gcc dot gnu.org> ---
Also seen on 32 and 64-bit sparc.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
` (2 preceding siblings ...)
2020-12-11 12:15 ` ro at gcc dot gnu.org
@ 2021-01-14 9:27 ` rguenth at gcc dot gnu.org
2021-01-18 14:00 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-14 9:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
` (3 preceding siblings ...)
2021-01-14 9:27 ` rguenth at gcc dot gnu.org
@ 2021-01-18 14:00 ` rguenth at gcc dot gnu.org
2021-01-18 14:19 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-18 14:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, so for gcc.dg/vect/slp-11b.c we're now doing hybrid vectorization if a { 0
2 1 } load permute is supported. The reason this is needed is that
out[i*4] = (in[i*4] + 2) * 3;
out[i*4 + 1] = (in[i*4 + 2] + 2) * 7;
out[i*4 + 2] = (in[i*4 + 1] + 7) * 3;
out[i*4 + 3] = (in[i*4 + 3] + 3) * 4;
is "inconsistently" folded like
out[i*4] = (in[i*4] * 3 + 6);
out[i*4 + 1] = (in[i*4 + 2] * 7 + 14);
out[i*4 + 2] = (in[i*4 + 1] * 3 + 21);
out[i*4 + 3] = (in[i*4 + 3] + 3) * 4;
so for (x + 3) * 4 we're _not_ associating. That breaks SLP discovery
but with splitting we're now using SLP for the first three lane and
interleaving for the last.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
` (4 preceding siblings ...)
2021-01-18 14:00 ` rguenth at gcc dot gnu.org
@ 2021-01-18 14:19 ` rguenth at gcc dot gnu.org
2021-01-18 14:20 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-18 14:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
I guess this folding detail wasn't what the original testcase was supposed to
test. Doing
out[i*4] = (in[i*4] + 2) * 3;
out[i*4 + 1] = (in[i*4 + 2] + 2) * 7;
out[i*4 + 2] = (in[i*4 + 1] + 7) * 3;
out[i*4 + 3] = (in[i*4 + 3] + 3) * 7;
will fix that but then we still need some good target selector given likely
not all targets can do this permute but we do not have "good" target-supports
for specific permutes. Maybe
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { {
vect_strided4 || vect_perm} && vect_int_mult } } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" {
target { vect_perm && vect_int_mult } } } } */
will do though. I will try that.
[it would be nice to have separate PRs for different test fails]
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
` (5 preceding siblings ...)
2021-01-18 14:19 ` rguenth at gcc dot gnu.org
@ 2021-01-18 14:20 ` cvs-commit at gcc dot gnu.org
2021-03-11 12:32 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-18 14:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:e393f03b1a73d75901d1bc49c99123bdf534e120
commit r11-6770-ge393f03b1a73d75901d1bc49c99123bdf534e120
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jan 18 15:18:15 2021 +0100
testsuite/97494 - adjust gcc.dg/vect/slp-11b.c
Support for loop SLP splitting exposed that slp-11b.c has
folding that breaks SLP discovery which isn't what was intended
when the testcase was written. The following makes it SLP-able
and "only" run into the issue that a load permutation is required.
And tries to adjust the target selectors accordingly.
2021-01-18 Richard Biener <rguenther@suse.de>
PR testsuite/97494
* gcc.dg/vect/slp-11b.c: Adjust.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
` (6 preceding siblings ...)
2021-01-18 14:20 ` cvs-commit at gcc dot gnu.org
@ 2021-03-11 12:32 ` cvs-commit at gcc dot gnu.org
2021-03-11 13:03 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-11 12:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:9d4ad8570c3bab2e145aa7b39ce8c66bafbf1945
commit r11-7620-g9d4ad8570c3bab2e145aa7b39ce8c66bafbf1945
Author: Richard Biener <rguenther@suse.de>
Date: Thu Mar 11 13:30:56 2021 +0100
testsuite/97494 - amend gcc.dg/vect/slp-21.c
As reported in the PR all powerpc64 targets fail
FAIL: gcc.dg/vect/slp-21.c scan-tree-dump-times vect "vectorizing stmts
using SLP" 2
because like on arm we now vectorize 4 opportunities. This adjusts
the testcase to follow the arm example.
2021-03-11 Richard Biener <rguenther@suse.de>
PR testsuite/97494
* gcc.dg/vect/slp-21.c: Adjust for powerpc64*-*-*.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
` (7 preceding siblings ...)
2021-03-11 12:32 ` cvs-commit at gcc dot gnu.org
@ 2021-03-11 13:03 ` rguenth at gcc dot gnu.org
2021-03-11 13:05 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-11 13:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rsandifo at gcc dot gnu.org
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
The power7 failure with
FAIL: gcc.dg/vect/vect-complex-5.c scan-tree-dump-times vect "vectorizing stmts
using SLP" 2
Shows that alignment checking as done in get_group_load_store_type does not
match what we later code-generate. The first group, storing into
c[i].f1 = a1[i] + b1[i];
is said to be aligned while the second
c[i].f2 = a2[i] + b2[i];
is said to be unaligned and thus unsupported. In reality both are
VMAT_STRIDED_SLP which can end up with a variety of alignment requirements.
In this case we emit a series of SImode stores to SImode aligned memory
in both cases.
Thus,
static bool
get_group_load_store_type (vec_info *vinfo, stmt_vec_info stmt_info,
...
if (*memory_access_type == VMAT_GATHER_SCATTER
|| *memory_access_type == VMAT_ELEMENTWISE)
*alignment_support_scheme = dr_unaligned_supported;
else
*alignment_support_scheme
= vect_supportable_dr_alignment (vinfo, first_dr_info, false);
is incomplete and misses special-casing of VMAT_STRIDED_SLP. For
VMAT_ELEMENTWISE we seem to simply assume that element (scalar)
misaligned accesses are OK (ISTR we reject non-element aligned vectorization),
but with VMAT_STRIDED_SLP we eventually use SImode to access two HImode
components which are not necessarily aligned according to SImode.
There's the related bug where the alignment we compute for a vector DR
is biased when the stride is negative and which also results in bogus
alignment to be used for checks.
ISTR I wrote somewhere that vectorizable_load/store analysis & costing
should possibly simply run through a common code path for analysis
and code generation (fending off actual stmt generation for analysis)
to avoid this kind of disconnect between code gen assumptions and
analysis parts. Thus the classical if (!vec_stmt) return early; approach
isn't good for maintainance.
That said, gcc.dg/vect/vect-complex-5.c is a missed optimization on
!hw-misaligned targets, thus I'm going to XFAIL it for ! vect_hw_misalign.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
` (8 preceding siblings ...)
2021-03-11 13:03 ` rguenth at gcc dot gnu.org
@ 2021-03-11 13:05 ` cvs-commit at gcc dot gnu.org
2021-03-11 13:13 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-11 13:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:f6c1d026c3a9109de58d1148e3f54b5273ebb86a
commit r11-7621-gf6c1d026c3a9109de58d1148e3f54b5273ebb86a
Author: Richard Biener <rguenther@suse.de>
Date: Thu Mar 11 14:03:55 2021 +0100
testsuite/97494 - XFAIL gcc.dg/vect/vect-complex-5.c on !vect_hw_misalign
This is a missed optimization due to bogus alignment analysis.
2021-03-11 Richard Biener <rguenther@suse.de>
PR testsuite/97494
* gcc.dg/vect/vect-complex-5.c: XFAIL on !vect_hw_misalign.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
` (9 preceding siblings ...)
2021-03-11 13:05 ` cvs-commit at gcc dot gnu.org
@ 2021-03-11 13:13 ` cvs-commit at gcc dot gnu.org
2021-03-11 13:16 ` rguenth at gcc dot gnu.org
2021-03-11 18:48 ` seurer at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-11 13:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:aa0d8a3e28cd3365a2910884ce3e7cb67b07f866
commit r11-7622-gaa0d8a3e28cd3365a2910884ce3e7cb67b07f866
Author: Richard Biener <rguenther@suse.de>
Date: Thu Mar 11 14:11:08 2021 +0100
testsuite/97494 - XFAIL gcc.dg/vect/pr97428.c on !vect_hw_misalign
While we could at least vectorize it on targets which support
re-alignment tokens we fail to do this because of imperfections in
alignment analysis. XFAIL when the HW cannot deal with misaligned
vector accesses for now.
2021-03-11 Richard Biener <rguenther@suse.de>
PR testsuite/97494
* gcc.dg/vect/pr97428.c: XFAIL on !vect_hw_misalign.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
` (10 preceding siblings ...)
2021-03-11 13:13 ` cvs-commit at gcc dot gnu.org
@ 2021-03-11 13:16 ` rguenth at gcc dot gnu.org
2021-03-11 18:48 ` seurer at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-11 13:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
All cases in the original report have been addressed. If other cases
persist/pop up, please open a new PR. If the originally reported FAILs persist
fell free to re-open (I only have limited ppc testing capabilities).
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/97494] [11 regression] several vector test case failures starting with r11-3966
2020-10-19 15:07 [Bug tree-optimization/97494] New: [11 regression] several vector test case failures starting with r11-3966 seurer at gcc dot gnu.org
` (11 preceding siblings ...)
2021-03-11 13:16 ` rguenth at gcc dot gnu.org
@ 2021-03-11 18:48 ` seurer at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: seurer at gcc dot gnu.org @ 2021-03-11 18:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97494
--- Comment #12 from seurer at gcc dot gnu.org ---
I looked through the test results on all our testers and it looks like
everything is cleaned up now. Thanks!
^ permalink raw reply [flat|nested] 14+ messages in thread