public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100171] New: autovectorizer
@ 2021-04-21  3:36 g.peterhoff@t-online.de
  2021-04-21  5:09 ` [Bug tree-optimization/100171] autovectorizer pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: g.peterhoff@t-online.de @ 2021-04-21  3:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100171

            Bug ID: 100171
           Summary: autovectorizer
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: g.peterhoff@t-online.de
  Target Milestone: ---

Hello gcc team,
I once wrote a small test case to show the problems with the autovectorizer
https://godbolt.org/z/xs35P45MM . In particular, the += operator is not
vectorized. The + operator works in the same context. I do not understand that.
If you decrement the arraysize in foo from 2 to 1 it doesn't work at all
anymore - scalar operations are always generated for ARR_2x.
In general, I made the experience that the autovectorizer starts much too late.
It should always do this from 2 values, even if these are much smaller than a
simd register. This also saves a lot of memory accesses - especially when the
data is linear in the memory (as in the example). Usually, however,
vectorization is only carried out when the data is at least as large as a simd
register, but often only when it is twice or even four times as large.
I think you should urgently update/optimize the autovectorizer.

thx & regards
Gero

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-17  5:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21  3:36 [Bug c++/100171] New: autovectorizer g.peterhoff@t-online.de
2021-04-21  5:09 ` [Bug tree-optimization/100171] autovectorizer pinskia at gcc dot gnu.org
2021-04-21  6:58 ` rguenth at gcc dot gnu.org
2021-04-21  8:25 ` rguenth at gcc dot gnu.org
2021-08-17  5:40 ` pinskia 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).