Add a vect_unaligned_possible target selector

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

This patch adds a target selector that says whether we can ever generate an "unaligned" accesses, where "unaligned" is relative to the target's preferred vector alignment. This is already true if:

vect_no_align && { ! vect_hw_misalign }

i.e. if the target doesn't have any alignment mechanism and also doesn't allow unaligned accesses. It is also true (for the things tested by gcc.dg/vect) if the target only wants things to be aligned to an element; in that case every normal scalar access is "vector aligned".

2017-11-09 Richard Sandiford Alan Hayward David Sherwood

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

gcc/testsuite/
- lib/target-supports.exp (check_effective_target_vect_unaligned_possible): New proc.
- gcc.dg/vect/slp-25.c: Extend XFAIL of peeling for alignment from
vect_no_align && { ! vect_hw_misalign } to ! vect_unaligned_possible.
- gcc.dg/vect/vect-multitypes-1.c: Likewise.
- gcc.dg/vect/vect-109.c: XFAIL vectorisation of an unaligned access to ! vect_unaligned_possible.
- gcc.dg/vect/vect-33.c: Likewise.
- gcc.dg/vect/vect-42.c: Likewise.
- gcc.dg/vect/vect-56.c: Likewise.
- gcc.dg/vect/vect-60.c: Likewise.
- gcc.dg/vect/vect-96.c: Likewise.
- gcc.dg/vect/vect-peel-1.c: Likewise.
- gcc.dg/vect/vect-27.c: Extend XFAIL of unaligned vectorization from
vect_no_align && { ! vect_hw_misalign } to ! vect_unaligned_possible.
- gcc.dg/vect/vect-29.c: Likewise.
- gcc.dg/vect/vect-44.c: Likewise.
- gcc.dg/vect/vect-48.c: Likewise.
- gcc.dg/vect/vect-50.c: Likewise.
- gcc.dg/vect/vect-52.c: Likewise.
- gcc.dg/vect/vect-72.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-77-global.c: Likewise.
- gcc.dg/vect/vect-78-alignchecks.c: Likewise.
- gcc.dg/vect/vect-78-global.c: Likewise.
- gcc.dg/vect/vect-multitypes-3.c: Likewise.
- gcc.dg/vect/vect-multitypes-4.c: Likewise.
- gcc.dg/vect/vect-multitypes-6.c: Likewise.
- gcc.dg/vect/vect-peel-4.c: Likewise.
- gcc.dg/vect/vect-peel-3.c: Likewise, and also for peeling for alignment.

6f72aad88b0 Add a vect_unaligned_possible target selector
gcc/ChangeLog | 6 ++++
gcc/doc/sourcebuild.texi | 5 ++++
gcc/testsuite/ChangeLog | 38 +++++++++++++++++++++++++
gcc/testsuite/gcc.dg/vect/slp-25.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-109.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-27.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-29.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-33.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-42.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-44.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-48.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-50.c | 3 +-
gcc/testsuite/gcc.dg/vect/vect-52.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-56.c | 4 +--
gcc/testsuite/gcc.dg/vect/vect-60.c | 4 +--
gcc/testsuite/gcc.dg/vect/vect-72.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-75-big-array.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-75.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-77-global.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-78-global.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-96.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c | 4 +--
gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-peel-1.c | 2 +-
gcc/testsuite/gcc.dg/vect/vect-peel-3.c | 4 +--
gcc/testsuite/gcc.dg/vect/vect-peel-4.c | 2 +-
gcc/testsuite/lib/target-supports.exp | 9 ++++++
31 files changed, 89 insertions(+), 32 deletions(-)

Upstream: gcc.gnu.org


  • Share