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.

Reply via email to