diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2016-05-24 10:15:36 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2016-05-24 10:15:36 +0000 |
commit | d3465d72bacd65663da8f8b4977f2936a799c3cd (patch) | |
tree | 15d92b71f80740174fee4dd8fb61fd75530eaef4 /gcc/tree-loop-distribution.c | |
parent | 836dbb1a27f3e793ad32723aeb6630237887e6d5 (diff) | |
download | gcc-d3465d72bacd65663da8f8b4977f2936a799c3cd.zip gcc-d3465d72bacd65663da8f8b4977f2936a799c3cd.tar.gz gcc-d3465d72bacd65663da8f8b4977f2936a799c3cd.tar.bz2 |
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.
From-SVN: r236632
Diffstat (limited to 'gcc/tree-loop-distribution.c')
0 files changed, 0 insertions, 0 deletions