Add a vect_element_align_preferred target selector

Programming / Compilers / GCC - rsandifo [138bc75d-0d04-0410-961f-82ee72b054a4] - 9 November 2017 15:16 EST

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 Alan Hayward David Sherwood

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.

dc32d9e8c02 Add a vect_element_align_preferred target selector
gcc/ChangeLog | 6 ++++++
gcc/doc/sourcebuild.texi | 4 ++++
gcc/testsuite/ChangeLog | 24 ++++++++++++++++++++++
.../gcc.dg/vect/no-section-anchors-vect-31.c | 2 +-
.../gcc.dg/vect/no-section-anchors-vect-64.c | 2 +-
gcc/testsuite/gcc.dg/vect/pr65310.c | 4 ++--
gcc/testsuite/gcc.dg/vect/vect-26.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-54.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-56.c | 4 ++--
gcc/testsuite/gcc.dg/vect/vect-58.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-60.c | 4 ++--
gcc/testsuite/gcc.dg/vect/vect-89-big-array.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-89.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-92.c | 2 +-
.../gcc.dg/vect/vect-outer-3a-big-array.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-outer-3a.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-peel-1.c | 2 +-
gcc/testsuite/lib/target-supports.exp | 10 ++++++++-
18 files changed, 60 insertions(+), 18 deletions(-)

Upstream: gcc.gnu.org


  • Share