Add a vect_align_stack_vars target selector

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

This patch adds a target selector to say whether it's possible to align a local variable to the target's preferred vector alignment. This can be false for large vectors if the alignment is only a preference and not a hard requirement (and thus if there is no need to support a stack realignment mechanism).

2017-11-09 Richard Sandiford Alan Hayward David Sherwood

gcc/
- doc/sourcebuild.texi (vect_align_stack_vars): Document.

gcc/testsuite/
- lib/target-supports.exp (check_effective_target_vect_align_stack_vars): New proc.
- gcc.dg/vect/vect-23.c: Only expect the array to be aligned if
vect_align_stack_vars.
- gcc.dg/vect/vect-24.c: Likewise.
- gcc.dg/vect/vect-25.c: Likewise.
- gcc.dg/vect/vect-26.c: Likewise.
- gcc.dg/vect/vect-32-big-array.c: Likewise.
- gcc.dg/vect/vect-32.c: Likewise.
- gcc.dg/vect/vect-40.c: Likewise.
- gcc.dg/vect/vect-42.c: Likewise.
- gcc.dg/vect/vect-46.c: Likewise.
- gcc.dg/vect/vect-48.c: Likewise.
- gcc.dg/vect/vect-52.c: Likewise.
- gcc.dg/vect/vect-54.c: Likewise.
- gcc.dg/vect/vect-62.c: Likewise.
- gcc.dg/vect/vect-67.c: Likewise.
- gcc.dg/vect/vect-75-big-array.c: Likewise.
- gcc.dg/vect/vect-75.c: Likewise.
- gcc.dg/vect/vect-77-alignchecks.c: Likewise.
- gcc.dg/vect/vect-78-alignchecks.c: Likewise.
- gcc.dg/vect/vect-89-big-array.c: Likewise.
- gcc.dg/vect/vect-89.c: Likewise.
- gcc.dg/vect/vect-96.c: Likewise.
- gcc.dg/vect/vect-multitypes-3.c: Likewise.
- gcc.dg/vect/vect-multitypes-6.c: Likewise.

dc1a4942e17 Add a vect_align_stack_vars target selector
gcc/ChangeLog | 6 +++++
gcc/doc/sourcebuild.texi | 4 ++++
gcc/testsuite/ChangeLog | 31 +++++++++++++++++++++++++
gcc/testsuite/gcc.dg/vect/vect-23.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-24.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-25.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-26.c | 4 ++--
gcc/testsuite/gcc.dg/vect/vect-32-big-array.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-32.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-40.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-42.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-46.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-48.c | 3 ++-
gcc/testsuite/gcc.dg/vect/vect-52.c | 3 ++-
gcc/testsuite/gcc.dg/vect/vect-54.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-62.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-67.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-75-big-array.c | 3 ++-
gcc/testsuite/gcc.dg/vect/vect-75.c | 3 ++-
gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c | 3 ++-
gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c | 3 ++-
gcc/testsuite/gcc.dg/vect/vect-89-big-array.c | 4 ++--
gcc/testsuite/gcc.dg/vect/vect-89.c | 4 ++--
gcc/testsuite/gcc.dg/vect/vect-96.c | 3 ++-
gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c | 2 +-
gcc/testsuite/lib/target-supports.exp | 6 +++++
27 files changed, 80 insertions(+), 26 deletions(-)

Upstream: gcc.gnu.org


  • Share