]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/testsuite/ChangeLog
Avoid unnecessary peeling for gaps with LD3
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 May 2016 10:15:36 +0000 (10:15 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 May 2016 10:15:36 +0000 (10:15 +0000)
commit856b494d84e363924349c207a9b2ad3449142d4e
tree15d92b71f80740174fee4dd8fb61fd75530eaef4
parentb38649bcfa90f11d1c75bce9e612eaa1381f04be
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236632 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-load-lanes-peeling-1.c [new file with mode: 0644]
gcc/tree-vect-stmts.c