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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> (In reply to Richard Biener from comment #1)
> > 
> > What taget were you testing?
> 
> Just aarch64 without SVE enabled. Your dump seems to be without the if part

I get

> /abuild/rguenther/obj/gcc/cc1 -quiet t.c -O3 -fopt-info-vec -I 
> /abuild/rguenther/obj/gcc/include -march=armv8.3-a+sve 
> -fdump-tree-vect-details -fopt-info
t.c:29:6: optimized: loop split
^^^
t.c:27:17: optimized: loop vectorized using variable length vectors

so that would explain this.

> > 
> > What do you mean by "manualy peeling"?
> 
> ```
>       rngx[0] = poly->v[0].x;
>       rngx[1] = poly->v[0].x;
>       rngy[0] = poly->v[0].y;
>       rngy[1] = poly->v[0].y;
> 
>       for (int i=1; i<len; ++i)
>       {
>               if (poly->v[i].x < rngx[0]) rngx[0] = poly->v[i].x;
>               if (poly->v[i].x > rngx[1]) rngx[1] = poly->v[i].x;
>               if (poly->v[i].y < rngy[0]) rngy[0] = poly->v[i].y;
>               if (poly->v[i].y > rngy[1]) rngy[1] = poly->v[i].y;
>       }
> ```

But not that...

In fact with the peeling SVE no longer vectorizes it either.

Reply via email to