r236632 - in /trunk/gcc: ChangeLog testsuite/Ch...

rsandifo@gcc.gnu.org rsandifo@gcc.gnu.org
Tue May 24 10:15:00 GMT 2016


Author: rsandifo
Date: Tue May 24 10:15:36 2016
New Revision: 236632

URL: https://gcc.gnu.org/viewcvs?rev=236632&root=gcc&view=rev
Log:
Avoid unnecessary peeling for gaps with LD3

vectorizable_load forces peeling for gaps if the vectorisation factor
is not a multiple of the group size, since in that case we'd normally load
beyond the original scalar accesses but drop the excess elements as part
of a following permute:

          if (loop_vinfo
              && ! STMT_VINFO_STRIDED_P (stmt_info)
              && (GROUP_GAP (vinfo_for_stmt (first_stmt)) != 0
                  || (!slp && vf % GROUP_SIZE (vinfo_for_stmt (first_stmt)) != 0)))

This isn't necessary for LOAD_LANES though, since it loads only the
data needed and does the permute itself.

Tested on aarch64-linux-gnu and x86_64-linux-gnu.

gcc/
	* tree-vect-stmts.c (vectorizable_load): Reorder checks so that
	load_lanes/grouped_load classification comes first.  Don't check
	whether the vectorization factor is a multiple of the group size
	for load_lanes.

gcc/testsuite/
	* gcc.dg/vect/vect-load-lanes-peeling-1.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/vect/vect-load-lanes-peeling-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-stmts.c



More information about the Gcc-cvs mailing list