https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90913
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- Aww. OK, so this is when we vectorize the inner loop of an if-converted outer-loop, then the outer loop LOOP_VECTORIZED condition replaced with the versioning condition dispatches to the variant supposed to be _scalar_ and the fallback is the if-converted nested copy designed for vectorization. So re-using the if-conversion copy is only possible when loop_to_version is the inner loop or we are vectorizing the outer loop (I think we never do versioning on outer loops currently though). Testing patch.