public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111133] New: SLP of scatters not implemented
@ 2023-08-24 13:10 rguenth at gcc dot gnu.org
2023-11-08 12:17 ` [Bug tree-optimization/111133] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-24 13:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111133
Bug ID: 111133
Summary: SLP of scatters not implemented
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: ---
There is no scatter support for (single-lane) SLP. For example
#define N 16
void __attribute__((noipa))
f (float *restrict y, float *restrict x, int *restrict indices)
{
for (int i = 0; i < N; ++i)
{
x[indices[i * 2]] = y[i * 2] + 1;
x[indices[i * 2 + 1]] = y[i * 2 + 1] + 2;
}
}
doesn't vectorize. Note this is also due to
t.c:6:21: note: === vect_analyze_data_ref_dependences ===
t.c:8:25: missed: possible alias involving gather/scatter between *_10 and
*_20
t.c:6:21: missed: bad data dependence.
but with SLP scatters guarantee left-to-right commit so that shouldn't
be an issue there and also shows why SLP is even required for this
to vectorize.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/111133] SLP of scatters not implemented
2023-08-24 13:10 [Bug tree-optimization/111133] New: SLP of scatters not implemented rguenth at gcc dot gnu.org
@ 2023-11-08 12:17 ` rguenth at gcc dot gnu.org
2023-11-09 12:59 ` cvs-commit at gcc dot gnu.org
2023-11-09 13:00 ` [Bug tree-optimization/111133] multi-lane " rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-08 12:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111133
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2023-11-08
Status|UNCONFIRMED |NEW
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
With
#pragma GCC ivdep
the dependence issue is gone but we are not grouping gathers/scatters in
vect_analyze_data_ref_accesses. Technically those are not "groups",
we wouldn't know how to set gap/size.
So to SLP scatters we'd need to optimistically perform SLP discovery on
"all" of them (or likely more successful, start greedy discovery from
the offset or the stored data side, aka from loads). Eventually handled
when SLP discovery is rewritten.
For now priority #1 is to get single-lane discovery work for scatters.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/111133] SLP of scatters not implemented
2023-08-24 13:10 [Bug tree-optimization/111133] New: SLP of scatters not implemented rguenth at gcc dot gnu.org
2023-11-08 12:17 ` [Bug tree-optimization/111133] " rguenth at gcc dot gnu.org
@ 2023-11-09 12:59 ` cvs-commit at gcc dot gnu.org
2023-11-09 13:00 ` [Bug tree-optimization/111133] multi-lane " rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-09 12:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111133
--- Comment #2 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:fd8e5f3c430f37c99ddcc00fcafc1a12b3475a3a
commit r14-5280-gfd8e5f3c430f37c99ddcc00fcafc1a12b3475a3a
Author: Richard Biener <rguenther@suse.de>
Date: Wed Nov 8 13:14:59 2023 +0100
Refactor x86 decl based scatter vectorization, prepare SLP
The following refactors the x86 decl based scatter vectorization
similar to what I did to the gather path. This prepares scatters
for SLP as well, mainly single-lane since there are multiple
missing bits to support multi-lane scatters.
Tested extensively on the SLP-only branch which has the ability
to force SLP even for single lanes.
PR tree-optimization/111133
* tree-vect-stmts.cc (vect_build_scatter_store_calls):
Remove and refactor to ...
(vect_build_one_scatter_store_call): ... this new function.
(vectorizable_store): Use vect_check_scalar_mask to record
the SLP node for the mask operand. Code generate scatters
with builtin decls from the main scatter vectorization
path and prepare that for SLP.
* tree-vect-slp.cc (vect_get_operand_map): Do not look
at the VDEF to decide between scatter or gather since that
doesn't work for patterns. Use the LHS being an SSA_NAME
or not instead.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/111133] multi-lane SLP of scatters not implemented
2023-08-24 13:10 [Bug tree-optimization/111133] New: SLP of scatters not implemented rguenth at gcc dot gnu.org
2023-11-08 12:17 ` [Bug tree-optimization/111133] " rguenth at gcc dot gnu.org
2023-11-09 12:59 ` cvs-commit at gcc dot gnu.org
@ 2023-11-09 13:00 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-09 13:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111133
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|SLP of scatters not |multi-lane SLP of scatters
|implemented |not implemented
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Single-lane SLP scatters now work (well, verified on x86 sofar).
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-09 13:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-24 13:10 [Bug tree-optimization/111133] New: SLP of scatters not implemented rguenth at gcc dot gnu.org
2023-11-08 12:17 ` [Bug tree-optimization/111133] " rguenth at gcc dot gnu.org
2023-11-09 12:59 ` cvs-commit at gcc dot gnu.org
2023-11-09 13:00 ` [Bug tree-optimization/111133] multi-lane " rguenth at gcc dot gnu.org
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).