public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/80928] SLP vectorization does not handle induction in outer loop vectorization
       [not found] <bug-80928-4@http.gcc.gnu.org/bugzilla/>
@ 2020-10-19 10:05 ` asolokha at gmx dot com
  2020-10-19 12:16 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: asolokha at gmx dot com @ 2020-10-19 10:05 UTC (permalink / raw)
  To: gcc-bugs

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

Arseny Solokha <asolokha at gmx dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |asolokha at gmx dot com

--- Comment #27 from Arseny Solokha <asolokha at gmx dot com> ---
Is it still an issue?

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

* [Bug tree-optimization/80928] SLP vectorization does not handle induction in outer loop vectorization
       [not found] <bug-80928-4@http.gcc.gnu.org/bugzilla/>
  2020-10-19 10:05 ` [Bug tree-optimization/80928] SLP vectorization does not handle induction in outer loop vectorization asolokha at gmx dot com
@ 2020-10-19 12:16 ` rguenth at gcc dot gnu.org
  2020-10-19 12:39 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-19 12:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #28 from Richard Biener <rguenth at gcc dot gnu.org> ---
Yes, the original issue is still present.

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

* [Bug tree-optimization/80928] SLP vectorization does not handle induction in outer loop vectorization
       [not found] <bug-80928-4@http.gcc.gnu.org/bugzilla/>
  2020-10-19 10:05 ` [Bug tree-optimization/80928] SLP vectorization does not handle induction in outer loop vectorization asolokha at gmx dot com
  2020-10-19 12:16 ` rguenth at gcc dot gnu.org
@ 2020-10-19 12:39 ` rguenth at gcc dot gnu.org
  2020-10-19 15:37 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-19 12:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #29 from Richard Biener <rguenth at gcc dot gnu.org> ---
So a testcase for missed outer loop induction SLP (and nested cycle SLP) is
for example

int a[1024];
void foo (unsigned n)
{
  for (int i = 0; i < 1020; i += 4)
    {
      int suma = a[i];
      int sumb = a[i+1];
      int sumc = a[i+2];
      int sumd = a[i+3];
      for (unsigned j = 0; j < 17; ++j)
        {
          suma = (suma ^ i) + 1;
          sumb = (sumb ^ i) + 2;
          sumc = (sumc ^ i) + 3;
          sumd = (sumd ^ i) + 4;
        }
      a[i] = suma;
      a[i+1] = sumb;
      a[i+2] = sumc;
      a[i+3] = sumd;
    }
}

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

* [Bug tree-optimization/80928] SLP vectorization does not handle induction in outer loop vectorization
       [not found] <bug-80928-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-10-19 12:39 ` rguenth at gcc dot gnu.org
@ 2020-10-19 15:37 ` rguenth at gcc dot gnu.org
  2020-10-27 11:52 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-19 15:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #30 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #29)
> So a testcase for missed outer loop induction SLP (and nested cycle SLP) is
> for example
> 
> int a[1024];
> void foo (unsigned n)
> {
>   for (int i = 0; i < 1020; i += 4)
>     {
>       int suma = a[i];
>       int sumb = a[i+1];
>       int sumc = a[i+2];
>       int sumd = a[i+3];
>       for (unsigned j = 0; j < 17; ++j)
>         {
>           suma = (suma ^ i) + 1;
>           sumb = (sumb ^ i) + 2;
>           sumc = (sumc ^ i) + 3;
>           sumd = (sumd ^ i) + 4;
>         }
>       a[i] = suma;
>       a[i+1] = sumb;
>       a[i+2] = sumc;
>       a[i+3] = sumd;
>     }
> }

Actually this is still not an inner loop induction in outer loop vectorization.
But missed nested cycle SLP handling.  I have a patch for this in testing.

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

* [Bug tree-optimization/80928] SLP vectorization does not handle induction in outer loop vectorization
       [not found] <bug-80928-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-10-19 15:37 ` rguenth at gcc dot gnu.org
@ 2020-10-27 11:52 ` rguenth at gcc dot gnu.org
  2020-11-03 12:33 ` cvs-commit at gcc dot gnu.org
  2020-11-03 12:41 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-27 11:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #31 from Richard Biener <rguenth at gcc dot gnu.org> ---
The following is a testcase triggering the

      /* FORNOW: outer loop induction with SLP not supported.  */
      if (STMT_SLP_TYPE (stmt_info))
        return false;

test:

double image[40];

void
foo (void)
{
  for (int i = 0; i < 20; i++)
    {
      double suma = 0;
      double sumb = 0;
      for (int j = 0; j < 40; j++)
        {
          suma += j+i;
          sumb += j+i;
        }
      image[2*i] = suma;
      image[2*i+1] = sumb;
    }
}

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

* [Bug tree-optimization/80928] SLP vectorization does not handle induction in outer loop vectorization
       [not found] <bug-80928-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-10-27 11:52 ` rguenth at gcc dot gnu.org
@ 2020-11-03 12:33 ` cvs-commit at gcc dot gnu.org
  2020-11-03 12:41 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-03 12:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #32 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:ac6affba97130bcbffb21bd9f8ca53c7aac89551

commit r11-4652-gac6affba97130bcbffb21bd9f8ca53c7aac89551
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Nov 3 11:52:47 2020 +0100

    tree-optimization/80928 - SLP vectorize nested loop induction

    This adds SLP vectorization of nested inductions.

    2020-11-03  Richard Biener <rguenther@suse.de>

            PR tree-optimization/80928
            * tree-vect-loop.c (vectorizable_induction): SLP vectorize
            nested inductions.

            * gcc.dg/vect/vect-outer-slp-2.c: New testcase.
            * gcc.dg/vect/vect-outer-slp-3.c: Likewise.

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

* [Bug tree-optimization/80928] SLP vectorization does not handle induction in outer loop vectorization
       [not found] <bug-80928-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2020-11-03 12:33 ` cvs-commit at gcc dot gnu.org
@ 2020-11-03 12:41 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-03 12:41 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #33 from Richard Biener <rguenth at gcc dot gnu.org> ---
Now fixed.

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

end of thread, other threads:[~2020-11-03 12:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-80928-4@http.gcc.gnu.org/bugzilla/>
2020-10-19 10:05 ` [Bug tree-optimization/80928] SLP vectorization does not handle induction in outer loop vectorization asolokha at gmx dot com
2020-10-19 12:16 ` rguenth at gcc dot gnu.org
2020-10-19 12:39 ` rguenth at gcc dot gnu.org
2020-10-19 15:37 ` rguenth at gcc dot gnu.org
2020-10-27 11:52 ` rguenth at gcc dot gnu.org
2020-11-03 12:33 ` cvs-commit at gcc dot gnu.org
2020-11-03 12:41 ` 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).