]> git.ipfire.org Git - thirdparty/gcc.git/commit
[1/7] Remove unnecessary peeling for gaps check
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 6 Jul 2016 08:10:29 +0000 (08:10 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 6 Jul 2016 08:10:29 +0000 (08:10 +0000)
commitc01e092fb3a8fb91602b54d8b5f10cc23c27089c
tree0daff3f21291e1046e74e89d511da9120198237f
parenta07189f4555b29f44945e548461ef26246a917f2
[1/7] Remove unnecessary peeling for gaps check

I recently relaxed the peeling-for-gaps conditions for LD3 but
kept them as-is for load-and-permute.  I don't think the conditions
are needed for load-and-permute either though.  No current load-and-
permute should load outside the group, so if there is no gap at the end,
the final vector element loaded will correspond to an element loaded
by the original scalar loop.

The patch for PR68559 (a missed optimisation PR) increased the peeled
cases from "exact_log2 (groupsize) == -1" to "vf % group_size == 0", so
before that fix, we didn't peel for gaps if there was no gap at the end
of the group and if the group size was a power of 2.

The only current non-power-of-2 load-and-permute size is 3, which
doesn't require loading more than 3 vectors.

The testcase is based on gcc.dg/vect/pr49038.c.

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

gcc/
* tree-vect-stmts.c (vectorizable_load): Remove unnecessary
peeling-for-gaps condition.

gcc/testsuite/
* gcc.dg/vect/group-no-gaps-1.c: New test.

From-SVN: r238033
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/group-no-gaps-1.c [new file with mode: 0644]
gcc/tree-vect-stmts.c