https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105643
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
It seems there are a lot of loops like the following in FrameImage
for (x=0; x < (ssize_t) width; x++)
{
SetPixelPacket(frame_image,&matte,q,frame_indexes);
q++;
frame_indexes++;
}
and they are now vectorized with an alias runtime check and a vectorized
epilogue. I'd say that's good. The "bad" is that we are unswitching
all those loops twice:
magick/decorate.c:605:25: optimized: Unswitching loop on condition: _1874 <=
0.0
magick/decorate.c:605:25: optimized: Unswitching loop on condition: _1874 >=
6.5535e+4
which means we have three copies to vectorize at least. Doesn't really
explain your opt-info reports reporting :605 16 times.
In fact, I don't see any vectorization with -march=skylake-avx512 here
(but I didn't use -funroll-loops which will only make a difference on RTL
so generally I'd avoid that). Maybe I need to check with a compiler
that doesn't have some unswitching improvements queued (but the old should get
those opportunities as well I think).