Add a vect_align_stack_vars target selector
authorRichard Sandiford <richard.sandiford@linaro.org>
Thu, 9 Nov 2017 15:18:59 +0000 (15:18 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 9 Nov 2017 15:18:59 +0000 (15:18 +0000)
commit331e1a56adf1a81c3544a8034d9e0a413ea35435
treea6aa3cbb8debe625481c050ffec0fb5d85ef23f1
parent32c7bafd50e6553f2f79858cf365907979d5eb2a
Add a vect_align_stack_vars target selector

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  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

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.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r254596
27 files changed:
gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-23.c
gcc/testsuite/gcc.dg/vect/vect-24.c
gcc/testsuite/gcc.dg/vect/vect-25.c
gcc/testsuite/gcc.dg/vect/vect-26.c
gcc/testsuite/gcc.dg/vect/vect-32-big-array.c
gcc/testsuite/gcc.dg/vect/vect-32.c
gcc/testsuite/gcc.dg/vect/vect-40.c
gcc/testsuite/gcc.dg/vect/vect-42.c
gcc/testsuite/gcc.dg/vect/vect-46.c
gcc/testsuite/gcc.dg/vect/vect-48.c
gcc/testsuite/gcc.dg/vect/vect-52.c
gcc/testsuite/gcc.dg/vect/vect-54.c
gcc/testsuite/gcc.dg/vect/vect-62.c
gcc/testsuite/gcc.dg/vect/vect-67.c
gcc/testsuite/gcc.dg/vect/vect-75-big-array.c
gcc/testsuite/gcc.dg/vect/vect-75.c
gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c
gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.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-96.c
gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c
gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c
gcc/testsuite/lib/target-supports.exp