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

--- Comment #3 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Just got back to looking at this.  I've implemented this suggestion and it
seems to work well for the most part; it solves the poor code generation we
were seeing on this test case, and most of the test suite passes.  I am seeing
a couple of failures, though.

The one I'm investigating now is gcc.dg/vect/bb-slp-cond-1.c.  When not
versioning the loop, SLP vectorization succeeds.  When versioning the loop, an
identical loop under the vectorization check is not vectorized for SLP.

Looking at the vectorization detail dump, it appears that the blocks in the
if-converted loop are not visited when the loop is versioned.  Only the blocks
in the original fallback loop are visited, which of course cannot be vectorized
since only if-conversion allows vectorization to take place.

I'll dig into it further, but I'm wondering if anyone has seen this sort of
behavior before, and can give me an idea what to look for.  I wonder if
versioning can leave the loop with a stale DFS numbering or something similar.

Any help appreciated!

Bill

Reply via email to