public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/108752] New: word_mode vectorization is pessimized by hard limit on nunits
@ 2023-02-10 11:24 rguenth at gcc dot gnu.org
2023-02-10 11:24 ` [Bug tree-optimization/108752] " 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-02-10 11:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108752
Bug ID: 108752
Summary: word_mode vectorization is pessimized by hard limit on
nunits
Product: gcc
Version: 13.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: ---
r13-5771-gdc87e1391c55c6 re-introduced a hard nunits limit to the vectorizer
when using emulated vectors (aka word_mode vectorization). That's because
this feature relies on vector lowering to implement plus, minus and negate
with bit operations and that has such limit in place for when dealing with
user written code that didn't have any cost modeling applied.
The fix is to emit supported operations from the vectorizer.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/108752] word_mode vectorization is pessimized by hard limit on nunits
2023-02-10 11:24 [Bug tree-optimization/108752] New: word_mode vectorization is pessimized by hard limit on nunits rguenth at gcc dot gnu.org
@ 2023-02-10 11:24 ` rguenth at gcc dot gnu.org
2023-02-10 12:12 ` 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-02-10 11:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108752
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
Keywords| |missed-optimization
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2023-02-10
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine, hopefully for GCC 14.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/108752] word_mode vectorization is pessimized by hard limit on nunits
2023-02-10 11:24 [Bug tree-optimization/108752] New: word_mode vectorization is pessimized by hard limit on nunits rguenth at gcc dot gnu.org
2023-02-10 11:24 ` [Bug tree-optimization/108752] " rguenth at gcc dot gnu.org
@ 2023-02-10 12:12 ` rguenth at gcc dot gnu.org
2023-02-12 23:49 ` hp at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-10 12:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108752
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 54447
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54447&action=edit
prototype
Prototype patch. Would benefit from a vect_finish_stmt_generation with
a gimple_seq overload and using gimple_build and some interleaved comments.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/108752] word_mode vectorization is pessimized by hard limit on nunits
2023-02-10 11:24 [Bug tree-optimization/108752] New: word_mode vectorization is pessimized by hard limit on nunits rguenth at gcc dot gnu.org
2023-02-10 11:24 ` [Bug tree-optimization/108752] " rguenth at gcc dot gnu.org
2023-02-10 12:12 ` rguenth at gcc dot gnu.org
@ 2023-02-12 23:49 ` hp at gcc dot gnu.org
2023-04-28 9:07 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hp at gcc dot gnu.org @ 2023-02-12 23:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108752
Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hp at gcc dot gnu.org
--- Comment #3 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #0)
> emulated vectors (aka word_mode vectorization).
Ackchyually, more commonly known as SWAR: https://en.wikipedia.org/wiki/SWAR.
(IWBN if options and identifiers were keyed off that acronym.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/108752] word_mode vectorization is pessimized by hard limit on nunits
2023-02-10 11:24 [Bug tree-optimization/108752] New: word_mode vectorization is pessimized by hard limit on nunits rguenth at gcc dot gnu.org
` (2 preceding siblings ...)
2023-02-12 23:49 ` hp at gcc dot gnu.org
@ 2023-04-28 9:07 ` cvs-commit at gcc dot gnu.org
2023-04-28 9:08 ` rguenth at gcc dot gnu.org
2023-05-23 16:10 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-28 9:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108752
--- Comment #4 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:821ef93976e750c118d42a2ad33b96dbd1b9f3a5
commit r14-322-g821ef93976e750c118d42a2ad33b96dbd1b9f3a5
Author: Richard Biener <rguenther@suse.de>
Date: Fri Feb 10 13:09:10 2023 +0100
tree-optimization/108752 - vectorize emulated vectors in lowered form
The following makes sure to emit operations lowered to bit operations
when vectorizing using emulated vectors. This avoids relying on
the vector lowering pass adhering to the exact same cost considerations
as the vectorizer.
PR tree-optimization/108752
* tree-vect-generic.cc (build_replicated_const): Rename
to build_replicated_int_cst and move to tree.{h,cc}.
(do_plus_minus): Adjust.
(do_negate): Likewise.
* tree-vect-stmts.cc (vectorizable_operation): Emit emulated
arithmetic vector operations in lowered form.
* tree.h (build_replicated_int_cst): Declare.
* tree.cc (build_replicated_int_cst): Moved from
tree-vect-generic.cc build_replicated_const.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/108752] word_mode vectorization is pessimized by hard limit on nunits
2023-02-10 11:24 [Bug tree-optimization/108752] New: word_mode vectorization is pessimized by hard limit on nunits rguenth at gcc dot gnu.org
` (3 preceding siblings ...)
2023-04-28 9:07 ` cvs-commit at gcc dot gnu.org
@ 2023-04-28 9:08 ` rguenth at gcc dot gnu.org
2023-05-23 16:10 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-28 9:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108752
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |14.0
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for GCC 14.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/108752] word_mode vectorization is pessimized by hard limit on nunits
2023-02-10 11:24 [Bug tree-optimization/108752] New: word_mode vectorization is pessimized by hard limit on nunits rguenth at gcc dot gnu.org
` (4 preceding siblings ...)
2023-04-28 9:08 ` rguenth at gcc dot gnu.org
@ 2023-05-23 16:10 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-23 16:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108752
--- 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:9d5034aad9868bed45472ef5bfac22dd9ac0e0cb
commit r14-1136-g9d5034aad9868bed45472ef5bfac22dd9ac0e0cb
Author: Richard Biener <rguenther@suse.de>
Date: Tue May 23 15:58:52 2023 +0200
Generic vector op costing adjustment
This is a small adjustment to the work done for PR108752 and
better reflects the cost of the generated sequence.
PR tree-optimization/108752
* tree-vect-stmts.cc (vectorizable_operation): For bit
operations with generic word_mode vectors do not cost
an extra stmt. For plus, minus and negate also cost the
constant materialization.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-05-23 16:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-10 11:24 [Bug tree-optimization/108752] New: word_mode vectorization is pessimized by hard limit on nunits rguenth at gcc dot gnu.org
2023-02-10 11:24 ` [Bug tree-optimization/108752] " rguenth at gcc dot gnu.org
2023-02-10 12:12 ` rguenth at gcc dot gnu.org
2023-02-12 23:49 ` hp at gcc dot gnu.org
2023-04-28 9:07 ` cvs-commit at gcc dot gnu.org
2023-04-28 9:08 ` rguenth at gcc dot gnu.org
2023-05-23 16:10 ` cvs-commit 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).