diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-11-09 15:18:32 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-11-09 15:18:32 +0000 |
commit | 32c7bafd50e6553f2f79858cf365907979d5eb2a (patch) | |
tree | 0d3d1842c080a9bdb1106625b1d8df762c606ccf /gcc | |
parent | b8353767564e8042ce75d6879e813ce313a0a050 (diff) | |
download | gcc-32c7bafd50e6553f2f79858cf365907979d5eb2a.zip gcc-32c7bafd50e6553f2f79858cf365907979d5eb2a.tar.gz gcc-32c7bafd50e6553f2f79858cf365907979d5eb2a.tar.bz2 |
Add a vect_variable_length target selector
This patch adds a target selector for variable-length vectors.
Initially it's always false, but the SVE patch provides a case
in which it's true.
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_variable_length): Document.
gcc/testsuite/
* lib/target-supports.exp
(check_effective_target_vect_variable_length): New proc.
* gcc.dg/vect/pr60482.c: XFAIL test for no epilog loop if
vect_variable_length.
* gcc.dg/vect/slp-reduc-6.c: XFAIL two-operation SLP if
vect_variable_length.
* gcc.dg/vect/vect-alias-check-5.c: XFAIL alias optimization if
vect_variable_length.
* gfortran.dg/vect/fast-math-mgrid-resid.f: XFAIL predictive
commoning optimization if vect_variable_length.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r254595
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/doc/sourcebuild.texi | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 15 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/pr60482.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/slp-reduc-6.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f | 4 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 6 |
8 files changed, 37 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 01743bd..0c56090 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,6 +2,12 @@ Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> + * doc/sourcebuild.texi (vect_variable_length): Document. + +2017-11-09 Richard Sandiford <richard.sandiford@linaro.org> + Alan Hayward <alan.hayward@arm.com> + David Sherwood <david.sherwood@arm.com> + * doc/sourcebuild.texi (vect_unaligned_possible): Document. 2017-11-09 Richard Sandiford <richard.sandiford@linaro.org> diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index cdee050..25e1103 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1486,6 +1486,9 @@ Target prefers vectors to have an alignment greater than element alignment, but also allows unaligned vector accesses in some circumstances. +@item vect_variable_length +Target has variable-length vectors. + @item vect_widen_sum_hi_to_si Target supports a vector widening summation of @code{short} operands into @code{int} results, or can promote (unpack) from @code{short} diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 76d9f3c..0a17dfa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -3,6 +3,21 @@ David Sherwood <david.sherwood@arm.com> * lib/target-supports.exp + (check_effective_target_vect_variable_length): New proc. + * gcc.dg/vect/pr60482.c: XFAIL test for no epilog loop if + vect_variable_length. + * gcc.dg/vect/slp-reduc-6.c: XFAIL two-operation SLP if + vect_variable_length. + * gcc.dg/vect/vect-alias-check-5.c: XFAIL alias optimization if + vect_variable_length. + * gfortran.dg/vect/fast-math-mgrid-resid.f: XFAIL predictive + commoning optimization if vect_variable_length. + +2017-11-09 Richard Sandiford <richard.sandiford@linaro.org> + Alan Hayward <alan.hayward@arm.com> + David Sherwood <david.sherwood@arm.com> + + * 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. diff --git a/gcc/testsuite/gcc.dg/vect/pr60482.c b/gcc/testsuite/gcc.dg/vect/pr60482.c index 4c5c20c..b07fe1e 100644 --- a/gcc/testsuite/gcc.dg/vect/pr60482.c +++ b/gcc/testsuite/gcc.dg/vect/pr60482.c @@ -16,4 +16,6 @@ foo (double *x, int n) return p; } -/* { dg-final { scan-tree-dump-not "epilog loop required" "vect" } } */ +/* Until fully-masked loops are supported, we always need an epilog + loop for variable-length vectors. */ +/* { dg-final { scan-tree-dump-not "epilog loop required" "vect" { xfail vect_variable_length } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-6.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-6.c index 88591c5..49a0ffc 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-reduc-6.c +++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-6.c @@ -44,5 +44,5 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_int_add || { ! { vect_unpack || vect_strided2 } } } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */ -/* { dg-final { scan-tree-dump-times "different interleaving chains in one node" 1 "vect" { target { ! vect_no_int_add } } } } */ +/* { dg-final { scan-tree-dump-times "different interleaving chains in one node" 1 "vect" { target { ! vect_no_int_add } xfail vect_variable_length } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c index bfa946b..e17c715 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c +++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c @@ -15,5 +15,5 @@ f1 (struct s *a, struct s *b) } /* { dg-final { scan-tree-dump-times "consider run-time aliasing" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "improved number of alias checks from 1 to 0" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "improved number of alias checks from 1 to 0" 1 "vect" { xfail vect_variable_length } } } */ /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 1 "vect" } } */ diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f index 7e2816b..2e0840d 100644 --- a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f +++ b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f @@ -42,5 +42,5 @@ C ! vectorized loop. If vector factor is 2, the vectorized loop can ! be predictive commoned, we check if predictive commoning PHI node ! is created with vector(2) type. -! { dg-final { scan-tree-dump "Executing predictive commoning without unrolling" "pcom" } } -! { dg-final { scan-tree-dump "vectp_u.*__lsm.* = PHI <.*vectp_u.*__lsm" "pcom" } } +! { dg-final { scan-tree-dump "Executing predictive commoning without unrolling" "pcom" { xfail vect_variable_length } } } +! { dg-final { scan-tree-dump "vectp_u.*__lsm.* = PHI <.*vectp_u.*__lsm" "pcom" { xfail vect_variable_length } } } diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 353887d..8d49ed2 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -6714,6 +6714,12 @@ proc check_effective_target_vect_multiple_sizes { } { return [expr { [llength [available_vector_sizes]] > 1 }] } +# Return true if variable-length vectors are supported. + +proc check_effective_target_vect_variable_length { } { + return [expr { [lindex [available_vector_sizes] 0] == 0 }] +} + # Return 1 if the target supports vectors of 64 bits. proc check_effective_target_vect64 { } { |