Don't vectorise single-iteration epilogues

With a later patch I saw a case in which we peeled a single iteration
for gaps but didn't need to peel further iterations to make up a full
vector.  We then tried to vectorise the single-iteration epilogue.

2019-11-06  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-loop.c (vect_analyze_loop): Only try to vectorize
	the epilogue if there are peeled iterations for it to handle.

From-SVN: r277886
This commit is contained in:
Richard Sandiford 2019-11-06 14:03:08 +00:00 committed by Richard Sandiford
parent 4653da0b6e
commit 4b205bf82d
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2019-11-06 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (vect_analyze_loop): Only try to vectorize
the epilogue if there are peeled iterations for it to handle.
2019-11-06 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_split_ior): Add asserts.

View File

@ -2459,6 +2459,7 @@ vect_analyze_loop (class loop *loop, vec_info_shared *shared)
vect_epilogues = (!loop->simdlen
&& loop->inner == NULL
&& PARAM_VALUE (PARAM_VECT_EPILOGUES_NOMASK)
&& LOOP_VINFO_PEELING_FOR_NITER (first_loop_vinfo)
/* For now only allow one epilogue loop. */
&& first_loop_vinfo->epilogue_vinfos.is_empty ());