public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111131] New: SLP of gathers incomplete
@ 2023-08-24 12:32 rguenth at gcc dot gnu.org
2023-09-29 12:35 ` [Bug tree-optimization/111131] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-24 12:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111131
Bug ID: 111131
Summary: SLP of gathers incomplete
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
SLP of gathers relies on vect_recog_gather_scatter_pattern but for example
x86 still uses the decl based target hook. There's also open-coded
gather/scatter support which isn't handled by SLP either.
The "correct" way is probably to use vect_check_gather_scatter at SLP
build time.
This can for example be seen when trying to vectorize
gcc.dg/vect/tsvc/vect-tsvc-vag.c with single-lane SLP, but
gcc.dg/vect/vect-gather-*.c also FAIL without vect_gather_load_ifn.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/111131] SLP of gathers incomplete
2023-08-24 12:32 [Bug tree-optimization/111131] New: SLP of gathers incomplete rguenth at gcc dot gnu.org
@ 2023-09-29 12:35 ` rguenth at gcc dot gnu.org
2023-10-19 7:54 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-09-29 12:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111131
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
There's also
if (memory_access_type == VMAT_GATHER_SCATTER && gs_info.decl)
{
vect_build_gather_load_calls (vinfo, stmt_info, gsi, vec_stmt, &gs_info,
mask, cost_vec);
return true;
which doesn't support SLP either (but ICEs).
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/111131] SLP of gathers incomplete
2023-08-24 12:32 [Bug tree-optimization/111131] New: SLP of gathers incomplete rguenth at gcc dot gnu.org
2023-09-29 12:35 ` [Bug tree-optimization/111131] " rguenth at gcc dot gnu.org
@ 2023-10-19 7:54 ` rguenth at gcc dot gnu.org
2023-10-19 12:28 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-19 7:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111131
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
Ever confirmed|0 |1
Last reconfirmed| |2023-10-19
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Have a nearly finished patch.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/111131] SLP of gathers incomplete
2023-08-24 12:32 [Bug tree-optimization/111131] New: SLP of gathers incomplete rguenth at gcc dot gnu.org
2023-09-29 12:35 ` [Bug tree-optimization/111131] " rguenth at gcc dot gnu.org
2023-10-19 7:54 ` rguenth at gcc dot gnu.org
@ 2023-10-19 12:28 ` cvs-commit at gcc dot gnu.org
2023-10-19 12:29 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-19 12:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111131
--- Comment #3 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:beab5b95c581452adeb26efd59ae84a61fb3b429
commit r14-4745-gbeab5b95c581452adeb26efd59ae84a61fb3b429
Author: Richard Biener <rguenther@suse.de>
Date: Thu Oct 19 10:33:01 2023 +0200
tree-optimization/111131 - SLP for non-IFN gathers
The following implements SLP vectorization support for gathers
without relying on IFNs being pattern detected (and supported by
the target). That includes support for emulated gathers but also
the legacy x86 builtin path.
PR tree-optimization/111131
* tree-vect-loop.cc (update_epilogue_loop_vinfo): Make
sure to update all gather/scatter stmt DRs, not only those
that eventually got VMAT_GATHER_SCATTER set.
* tree-vect-slp.cc (_slp_oprnd_info::first_gs_info): Add.
(vect_get_and_check_slp_defs): Handle gathers/scatters,
adding the offset as SLP operand and comparing base and scale.
(vect_build_slp_tree_1): Handle gathers.
(vect_build_slp_tree_2): Likewise.
* gcc.dg/vect/vect-gather-1.c: Now expected to vectorize
everywhere.
* gcc.dg/vect/vect-gather-2.c: Expected to not SLP anywhere.
Massage the scale case to more reliably produce a different
one. Scan for the specific messages.
* gcc.dg/vect/vect-gather-3.c: Masked gather is also supported
for AVX2, but not emulated.
* gcc.dg/vect/vect-gather-4.c: Expected to not SLP anywhere.
Massage to more properly ensure this.
* gcc.dg/vect/tsvc/vect-tsvc-s353.c: Expect to vectorize
everywhere.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/111131] SLP of gathers incomplete
2023-08-24 12:32 [Bug tree-optimization/111131] New: SLP of gathers incomplete rguenth at gcc dot gnu.org
` (2 preceding siblings ...)
2023-10-19 12:28 ` cvs-commit at gcc dot gnu.org
@ 2023-10-19 12:29 ` rguenth at gcc dot gnu.org
2023-10-20 13:27 ` carlos.seo at linaro dot org
2023-10-20 13:34 ` rguenther at suse dot de
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-19 12:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111131
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Target Milestone|--- |14.0
Resolution|--- |FIXED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/111131] SLP of gathers incomplete
2023-08-24 12:32 [Bug tree-optimization/111131] New: SLP of gathers incomplete rguenth at gcc dot gnu.org
` (3 preceding siblings ...)
2023-10-19 12:29 ` rguenth at gcc dot gnu.org
@ 2023-10-20 13:27 ` carlos.seo at linaro dot org
2023-10-20 13:34 ` rguenther at suse dot de
5 siblings, 0 replies; 7+ messages in thread
From: carlos.seo at linaro dot org @ 2023-10-20 13:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111131
Carlos Eduardo Seo <carlos.seo at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos.seo at linaro dot org
--- Comment #5 from Carlos Eduardo Seo <carlos.seo at linaro dot org> ---
This patch caused a few extra failures:
=== gcc tests ===
Running gcc:gcc.target/aarch64/sve/aarch64-sve.exp ...
FAIL: gcc.target/aarch64/sve/mask_gather_load_8.c (internal compiler error: in
vect_get_and_check_slp_defs, at tree-vect-slp.cc:667)
FAIL: gcc.target/aarch64/sve/mask_gather_load_8.c (test for excess errors)
UNRESOLVED: gcc.target/aarch64/sve/mask_gather_load_8.c scan-assembler-times
\\tld1d\\tz[0-9]+\\.d, p[0-7]/z, \\[x[0-9]+, z[0-9]+\\.d, lsl #?3\\] 1
UNRESOLVED: gcc.target/aarch64/sve/mask_gather_load_8.c scan-assembler-times
\\tld1w\\tz[0-9]+\\.d, p[0-7]/z, \\[x[0-9]+, z[0-9]+\\.d, lsl #?2\\] 1
UNRESOLVED: gcc.target/aarch64/sve/mask_gather_load_8.c scan-assembler-times
\\tld1w\\tz[0-9]+\\.s, p[0-7]/z, \\[x[0-9]+, z[0-9]+\\.s, sxtw #?2\\] 1
UNRESOLVED: gcc.target/aarch64/sve/mask_gather_load_8.c scan-assembler-times
\\tld1w\\tz[0-9]+\\.s, p[0-7]/z, \\[x[0-9]+, z[0-9]+\\.s, uxtw #?2\\] 1
Could you please check?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/111131] SLP of gathers incomplete
2023-08-24 12:32 [Bug tree-optimization/111131] New: SLP of gathers incomplete rguenth at gcc dot gnu.org
` (4 preceding siblings ...)
2023-10-20 13:27 ` carlos.seo at linaro dot org
@ 2023-10-20 13:34 ` rguenther at suse dot de
5 siblings, 0 replies; 7+ messages in thread
From: rguenther at suse dot de @ 2023-10-20 13:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111131
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 20 Oct 2023, carlos.seo at linaro dot org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111131
>
> Carlos Eduardo Seo <carlos.seo at linaro dot org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |carlos.seo at linaro dot org
>
> --- Comment #5 from Carlos Eduardo Seo <carlos.seo at linaro dot org> ---
> This patch caused a few extra failures:
>
> === gcc tests ===
>
> Running gcc:gcc.target/aarch64/sve/aarch64-sve.exp ...
> FAIL: gcc.target/aarch64/sve/mask_gather_load_8.c (internal compiler error: in
> vect_get_and_check_slp_defs, at tree-vect-slp.cc:667)
> FAIL: gcc.target/aarch64/sve/mask_gather_load_8.c (test for excess errors)
> UNRESOLVED: gcc.target/aarch64/sve/mask_gather_load_8.c scan-assembler-times
> \\tld1d\\tz[0-9]+\\.d, p[0-7]/z, \\[x[0-9]+, z[0-9]+\\.d, lsl #?3\\] 1
> UNRESOLVED: gcc.target/aarch64/sve/mask_gather_load_8.c scan-assembler-times
> \\tld1w\\tz[0-9]+\\.d, p[0-7]/z, \\[x[0-9]+, z[0-9]+\\.d, lsl #?2\\] 1
> UNRESOLVED: gcc.target/aarch64/sve/mask_gather_load_8.c scan-assembler-times
> \\tld1w\\tz[0-9]+\\.s, p[0-7]/z, \\[x[0-9]+, z[0-9]+\\.s, sxtw #?2\\] 1
> UNRESOLVED: gcc.target/aarch64/sve/mask_gather_load_8.c scan-assembler-times
> \\tld1w\\tz[0-9]+\\.s, p[0-7]/z, \\[x[0-9]+, z[0-9]+\\.s, uxtw #?2\\] 1
>
> Could you please check?
That was reported already and fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-10-20 13:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-24 12:32 [Bug tree-optimization/111131] New: SLP of gathers incomplete rguenth at gcc dot gnu.org
2023-09-29 12:35 ` [Bug tree-optimization/111131] " rguenth at gcc dot gnu.org
2023-10-19 7:54 ` rguenth at gcc dot gnu.org
2023-10-19 12:28 ` cvs-commit at gcc dot gnu.org
2023-10-19 12:29 ` rguenth at gcc dot gnu.org
2023-10-20 13:27 ` carlos.seo at linaro dot org
2023-10-20 13:34 ` rguenther at suse dot de
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).