public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/95960] New: GCC should re-vectorize vector code with larger VF
@ 2020-06-29 12:09 rguenth at gcc dot gnu.org
  2020-06-29 12:12 ` [Bug tree-optimization/95960] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-29 12:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95960
           Summary: GCC should re-vectorize vector code with larger VF
           Product: gcc
           Version: 11.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: ---

For the following simple case GCC should vectorize it using AVX:

typedef double __attribute__((vector_size(16))) v2df;
double a[4];
double b[4];
void f()
{
  *(v2df *)&b[0] += *(v2df *)&a[0];
  *(v2df *)&b[2] += *(v2df *)&a[2];
}

Similar opportunities may exist for loops where also Neon -> SVE transforms
may be profitable.  Starting with BB vectorization might be easier since
you only need to consider SLP.

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

* [Bug tree-optimization/95960] GCC should re-vectorize vector code with larger VF
  2020-06-29 12:09 [Bug tree-optimization/95960] New: GCC should re-vectorize vector code with larger VF rguenth at gcc dot gnu.org
@ 2020-06-29 12:12 ` rguenth at gcc dot gnu.org
  2021-08-16 21:36 ` pinskia at gcc dot gnu.org
  2024-01-26  5:55 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-29 12:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 48801
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48801&action=edit
start

So quick experiments show where we need to do adjustments.  We do have
an explicit SLP_TREE_LANES we could use for "true" scalar lanes as compared
to the number of "scalar" stmts but uses might have been transitioned not
exactly along this boundary.  Then there's of course 'group_size' which
can mean either depending on context.

The biggest churn is likely in dataref group analysis where we IMHO
also want a "lanes" representation.

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

* [Bug tree-optimization/95960] GCC should re-vectorize vector code with larger VF
  2020-06-29 12:09 [Bug tree-optimization/95960] New: GCC should re-vectorize vector code with larger VF rguenth at gcc dot gnu.org
  2020-06-29 12:12 ` [Bug tree-optimization/95960] " rguenth at gcc dot gnu.org
@ 2021-08-16 21:36 ` pinskia at gcc dot gnu.org
  2024-01-26  5:55 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-16 21:36 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
           Severity|normal                      |enhancement

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

* [Bug tree-optimization/95960] GCC should re-vectorize vector code with larger VF
  2020-06-29 12:09 [Bug tree-optimization/95960] New: GCC should re-vectorize vector code with larger VF rguenth at gcc dot gnu.org
  2020-06-29 12:12 ` [Bug tree-optimization/95960] " rguenth at gcc dot gnu.org
  2021-08-16 21:36 ` pinskia at gcc dot gnu.org
@ 2024-01-26  5:55 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-26  5:55 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-01-26
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

Even V2SF -> V4SF would be useful for aarch64:
```
typedef float __attribute__((vector_size(8))) v2sf;
float a[4];
float b[4];
void f()
{
  *(v2sf *)&b[0] += *(v2sf *)&a[0];
  *(v2sf *)&b[2] += *(v2sf *)&a[2];
}

```

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

end of thread, other threads:[~2024-01-26  5:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 12:09 [Bug tree-optimization/95960] New: GCC should re-vectorize vector code with larger VF rguenth at gcc dot gnu.org
2020-06-29 12:12 ` [Bug tree-optimization/95960] " rguenth at gcc dot gnu.org
2021-08-16 21:36 ` pinskia at gcc dot gnu.org
2024-01-26  5:55 ` 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).