Add a vect_element_align_preferred target selector
authorRichard Sandiford <richard.sandiford@linaro.org>
Thu, 9 Nov 2017 15:16:55 +0000 (15:16 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 9 Nov 2017 15:16:55 +0000 (15:16 +0000)
commit4d83db5d73ce3e355f9ac166e04d72ce41decfb5
tree04800fbe66a0b37bd792a7cf6890779a1d5bfe6b
parent8b26c5492bf1d4c7acab18eff1e78a239af779a1
Add a vect_element_align_preferred target selector

This patch adds a target selector for targets whose
preferred_vector_alignment is the alignment of one element.  We'll never
peel in that case, and the step of a loop that operates on normal (as
opposed to packed) elements will always divide the preferred alignment.

2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* doc/sourcebuild.texi (vect_element_align_preferred): Document.

gcc/testsuite/
* lib/target-supports.exp
(check_effective_target_vect_element_align_preferred): New proc.
(check_effective_target_vect_peeling_profitable): Test it.
* gcc.dg/vect/no-section-anchors-vect-31.c: Don't expect peeling
if vect_element_align_preferred.
* gcc.dg/vect/no-section-anchors-vect-64.c: Likewise.
* gcc.dg/vect/pr65310.c: Likewise.
* gcc.dg/vect/vect-26.c: Likewise.
* gcc.dg/vect/vect-54.c: Likewise.
* gcc.dg/vect/vect-56.c: Likewise.
* gcc.dg/vect/vect-58.c: Likewise.
* gcc.dg/vect/vect-60.c: Likewise.
* gcc.dg/vect/vect-89-big-array.c: Likewise.
* gcc.dg/vect/vect-89.c: Likewise.
* gcc.dg/vect/vect-92.c: Likewise.
* gcc.dg/vect/vect-peel-1.c: Likewise.
* gcc.dg/vect/vect-outer-3a-big-array.c: Expect the step to
divide the alignment if vect_element_align_preferred.
* gcc.dg/vect/vect-outer-3a.c: Likewise.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r254593
18 files changed:
gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-31.c
gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-64.c
gcc/testsuite/gcc.dg/vect/pr65310.c
gcc/testsuite/gcc.dg/vect/vect-26.c
gcc/testsuite/gcc.dg/vect/vect-54.c
gcc/testsuite/gcc.dg/vect/vect-56.c
gcc/testsuite/gcc.dg/vect/vect-58.c
gcc/testsuite/gcc.dg/vect/vect-60.c
gcc/testsuite/gcc.dg/vect/vect-89-big-array.c
gcc/testsuite/gcc.dg/vect/vect-89.c
gcc/testsuite/gcc.dg/vect/vect-92.c
gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c
gcc/testsuite/gcc.dg/vect/vect-outer-3a.c
gcc/testsuite/gcc.dg/vect/vect-peel-1.c
gcc/testsuite/lib/target-supports.exp