summaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.c
diff options
context:
space:
mode:
authorKewen Lin <linkw@linux.ibm.com>2020-08-05 02:50:49 -0500
committerKewen Lin <linkw@linux.ibm.com>2020-08-06 00:56:51 -0500
commitea858d09571f3f6dcce92d8bfaf077f9d44c6ad6 (patch)
treefd0a7d9e00e0220097912024950673ae2b8960a7 /gcc/tree-vectorizer.c
parentaa5ea20c2bf5f730acb3d161978d70559705400c (diff)
vect: Skip epilogue loops for dbgcnt check [PR96451]
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.
Diffstat (limited to 'gcc/tree-vectorizer.c')
-rw-r--r--gcc/tree-vectorizer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 2a60d37bb87..3c60f30ed8f 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -1066,7 +1066,8 @@ try_vectorize_loop_1 (hash_table<simduid_to_vf> *&simduid_to_vf_htab,
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. */