As the PR shows, commit r11-2453 exposed one issue that vectorizer
wants to vectorize the epilogue loop and leaves the if-cvt body there,
but later dbgcnt check disables it, the left scalar mask_store
statement causes ICE.
As Richard pointed out in that PR, the dbgcnt is to count original
scalar loops, so this fix is to make it skip the epilogue loops.
gcc/ChangeLog:
* tree-vectorizer.c (try_vectorize_loop_1): Skip the epilogue loops
for dbgcnt check.
return ret;
}
- if (!dbg_cnt (vect_loop))
+ /* Only count the original scalar loops. */
+ if (!LOOP_VINFO_EPILOGUE_P (loop_vinfo) && !dbg_cnt (vect_loop))
{
/* Free existing information if loop is analyzed with some
assumptions. */