r277880 - in /trunk/gcc: ChangeLog tree-vect-lo...

rsandifo@gcc.gnu.org rsandifo@gcc.gnu.org
Wed Nov 6 12:29:00 GMT 2019


Author: rsandifo
Date: Wed Nov  6 12:29:47 2019
New Revision: 277880

URL: https://gcc.gnu.org/viewcvs?rev=277880&root=gcc&view=rev
Log:
Check the VF is small enough for an epilogue loop

The number of iterations of an epilogue loop is always smaller than the
VF of the main loop.  vect_analyze_loop_costing was taking this into
account when deciding whether the loop is cheap enough to vectorise,
but that has no effect with the unlimited cost model.  We need to use
a separate check for correctness as well.

This can happen if the sizes returned by autovectorize_vector_sizes
happen to be out of order, e.g. because the target prefers smaller
vectors.  It can also happen with later patches if two vectorisation
attempts happen to end up with the same VF.

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

gcc/
	* tree-vect-loop.c (vect_analyze_loop_2): When vectorizing an
	epilogue loop, make sure that the VF is small enough or that
	the epilogue loop can be fully-masked.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-vect-loop.c



More information about the Gcc-cvs mailing list