From: irar Date: Tue, 6 Sep 2011 11:29:53 +0000 (+0000) Subject: * config/arm/arm.c (arm_preferred_simd_mode): Check X-Git-Tag: upstream/4.9.2~17886 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=859baaaf41afb8c41be1996b718701106603f2af;p=platform%2Fupstream%2Flinaro-gcc.git * config/arm/arm.c (arm_preferred_simd_mode): Check TARGET_NEON_VECTORIZE_DOUBLE instead of TARGET_NEON_VECTORIZE_QUAD. (arm_autovectorize_vector_sizes): Likewise. * config/arm/arm.opt (mvectorize-with-neon-quad): Make inverse mask of mvectorize-with-neon-double. Add RejectNegative. (mvectorize-with-neon-double): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178588 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d1c5cee..bb1fbec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2011-09-06 Ira Rosen + + * config/arm/arm.c (arm_preferred_simd_mode): Check + TARGET_NEON_VECTORIZE_DOUBLE instead of + TARGET_NEON_VECTORIZE_QUAD. + (arm_autovectorize_vector_sizes): Likewise. + * config/arm/arm.opt (mvectorize-with-neon-quad): Make inverse + mask of mvectorize-with-neon-double. Add RejectNegative. + (mvectorize-with-neon-double): New. + 2011-09-06 Richard Guenther * tree-ssa-sccvn.c (visit_use): CSE stmt pieces and simplify diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 0047969..0a1a651 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -23026,7 +23026,7 @@ arm_array_mode_supported_p (enum machine_mode mode, return false; } -/* Use the option -mvectorize-with-neon-quad to override the use of doubleword +/* Use the option -mvectorize-with-neon-double to override the use of quardword registers when autovectorizing for Neon, at least until multiple vector widths are supported properly by the middle-end. */ @@ -23037,15 +23037,15 @@ arm_preferred_simd_mode (enum machine_mode mode) switch (mode) { case SFmode: - return TARGET_NEON_VECTORIZE_QUAD ? V4SFmode : V2SFmode; + return TARGET_NEON_VECTORIZE_DOUBLE ? V2SFmode : V4SFmode; case SImode: - return TARGET_NEON_VECTORIZE_QUAD ? V4SImode : V2SImode; + return TARGET_NEON_VECTORIZE_DOUBLE ? V2SImode : V4SImode; case HImode: - return TARGET_NEON_VECTORIZE_QUAD ? V8HImode : V4HImode; + return TARGET_NEON_VECTORIZE_DOUBLE ? V4HImode : V8HImode; case QImode: - return TARGET_NEON_VECTORIZE_QUAD ? V16QImode : V8QImode; + return TARGET_NEON_VECTORIZE_DOUBLE ? V8QImode : V16QImode; case DImode: - if (TARGET_NEON_VECTORIZE_QUAD) + if (!TARGET_NEON_VECTORIZE_DOUBLE) return V2DImode; break; @@ -24268,7 +24268,7 @@ arm_expand_sync (enum machine_mode mode, static unsigned int arm_autovectorize_vector_sizes (void) { - return TARGET_NEON_VECTORIZE_QUAD ? 16 | 8 : 0; + return TARGET_NEON_VECTORIZE_DOUBLE ? 0 : (16 | 8); } static bool diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt index be5fd3c..4d29e2f 100644 --- a/gcc/config/arm/arm.opt +++ b/gcc/config/arm/arm.opt @@ -238,9 +238,13 @@ Target Report RejectNegative Mask(LITTLE_WORDS) Assume big endian bytes, little endian words. This option is deprecated. mvectorize-with-neon-quad -Target Report Mask(NEON_VECTORIZE_QUAD) +Target Report RejectNegative InverseMask(NEON_VECTORIZE_DOUBLE) Use Neon quad-word (rather than double-word) registers for vectorization +mvectorize-with-neon-double +Target Report RejectNegative Mask(NEON_VECTORIZE_DOUBLE) +Use Neon double-word (rather than quad-word) registers for vectorization + mword-relocations Target Report Var(target_word_relocations) Init(TARGET_DEFAULT_WORD_RELOCATIONS) Only generate absolute relocations on word sized values. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0f24c9d..7974966 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,33 @@ +2011-09-06 Ira Rosen + + * lib/target-supports.exp (check_effective_target_vect_multiple_sizes): + New procedure. + (add_options_for_quad_vectors): Replace with ... + (add_options_for_double_vectors): ... this. + * gfortran.dg/vect/pr19049.f90: Expect more printings on targets that + support multiple vector sizes since the vectorizer attempts to + vectorize with both vector sizes. + * gcc.dg/vect/no-vfa-vect-79.c, + gcc.dg/vect/no-vfa-vect-102a.c, gcc.dg/vect/vect-outer-1a.c, + gcc.dg/vect/vect-outer-1b.c, gcc.dg/vect/vect-outer-2b.c, + gcc.dg/vect/vect-outer-3a.c, gcc.dg/vect/no-vfa-vect-37.c, + gcc.dg/vect/vect-outer-3b.c, gcc.dg/vect/no-vfa-vect-101.c, + gcc.dg/vect/no-vfa-vect-102.c, gcc.dg/vect/vect-reduc-dot-s8b.c, + gcc.dg/vect/vect-outer-1.c, gcc.dg/vect/vect-104.c: Likewise. + * gcc.dg/vect/vect-42.c: Run with 64 bit vectors if applicable. + * gcc.dg/vect/vect-multitypes-6.c, gcc.dg/vect/vect-52.c, + gcc.dg/vect/vect-54.c, gcc.dg/vect/vect-46.c, gcc.dg/vect/vect-48.c, + gcc.dg/vect/vect-96.c, gcc.dg/vect/vect-multitypes-3.c, + gcc.dg/vect/vect-40.c: Likewise. + * gcc.dg/vect/vect-outer-5.c: Remove quad-vectors option as + redundant. + * gcc.dg/vect/vect-109.c, gcc.dg/vect/vect-peel-1.c, + gcc.dg/vect/vect-peel-2.c, gcc.dg/vect/slp-25.c, + gcc.dg/vect/vect-multitypes-1.c, gcc.dg/vect/slp-3.c, + gcc.dg/vect/no-vfa-pr29145.c, gcc.dg/vect/vect-multitypes-4.c: + Likewise. + * gcc.dg/vect/vect-peel-4.c: Make ia global. + 2011-09-05 Richard Sandiford PR target/49606 diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c b/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c index 0bbb8e9..e475fff 100644 --- a/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c +++ b/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c @@ -1,5 +1,4 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-add-options quad_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-101.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-101.c index 1830eb8..3a54a75 100644 --- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-101.c +++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-101.c @@ -45,6 +45,7 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */ -/* { dg-final { scan-tree-dump-times "can't determine dependence" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "can't determine dependence" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "can't determine dependence" 2 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-102.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-102.c index e49633e..a8d3b04 100644 --- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-102.c +++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-102.c @@ -53,6 +53,7 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */ -/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 2 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-102a.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-102a.c index da8afaa..41bbbc1 100644 --- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-102a.c +++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-102a.c @@ -53,6 +53,7 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */ -/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 2 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-37.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-37.c index dc17239a..c8cf2ca 100644 --- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-37.c +++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-37.c @@ -58,5 +58,6 @@ int main (void) If/when the aliasing problems are resolved, unalignment may prevent vectorization on some targets. */ /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "can't determine dependence between" 2 "vect" } } */ +/* { dg-final { scan-tree-dump-times "can't determine dependence" 2 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "can't determine dependence" 4 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-79.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-79.c index 1a694b3..3c5ce4b 100644 --- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-79.c +++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-79.c @@ -46,5 +46,6 @@ int main (void) If/when the aliasing problems are resolved, unalignment may prevent vectorization on some targets. */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "can't determine dependence between" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "can't determine dependence" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "can't determine dependence" 2 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-25.c b/gcc/testsuite/gcc.dg/vect/slp-25.c index 4517639..0dec2f1 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-25.c +++ b/gcc/testsuite/gcc.dg/vect/slp-25.c @@ -1,5 +1,4 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-add-options quad_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/slp-3.c b/gcc/testsuite/gcc.dg/vect/slp-3.c index 9a504d9..7d9bd56 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-3.c +++ b/gcc/testsuite/gcc.dg/vect/slp-3.c @@ -1,5 +1,4 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-add-options quad_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-104.c b/gcc/testsuite/gcc.dg/vect/vect-104.c index 5ea2f80..2b56ddf 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-104.c +++ b/gcc/testsuite/gcc.dg/vect/vect-104.c @@ -64,6 +64,7 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */ -/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 2 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-109.c b/gcc/testsuite/gcc.dg/vect/vect-109.c index 1f2f53e..854c970 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-109.c +++ b/gcc/testsuite/gcc.dg/vect/vect-109.c @@ -1,5 +1,4 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-add-options quad_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-40.c b/gcc/testsuite/gcc.dg/vect/vect-40.c index d2c17d1..269b089 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-40.c +++ b/gcc/testsuite/gcc.dg/vect/vect-40.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target vect_float } */ +/* { dg-add-options double_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-42.c b/gcc/testsuite/gcc.dg/vect/vect-42.c index b9faea4..3181081 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-42.c +++ b/gcc/testsuite/gcc.dg/vect/vect-42.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target vect_float } */ +/* { dg-add-options double_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-46.c b/gcc/testsuite/gcc.dg/vect/vect-46.c index d506d43..26e0e52 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-46.c +++ b/gcc/testsuite/gcc.dg/vect/vect-46.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target vect_float } */ +/* { dg-add-options double_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-48.c b/gcc/testsuite/gcc.dg/vect/vect-48.c index e47ee00..d2eed3a 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-48.c +++ b/gcc/testsuite/gcc.dg/vect/vect-48.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target vect_float } */ +/* { dg-add-options double_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-52.c b/gcc/testsuite/gcc.dg/vect/vect-52.c index af485ab..69c0979 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-52.c +++ b/gcc/testsuite/gcc.dg/vect/vect-52.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target vect_float } */ +/* { dg-add-options double_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-54.c b/gcc/testsuite/gcc.dg/vect/vect-54.c index 629e82d..d563cc34 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-54.c +++ b/gcc/testsuite/gcc.dg/vect/vect-54.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target vect_float } */ +/* { dg-add-options double_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-96.c b/gcc/testsuite/gcc.dg/vect/vect-96.c index 049ac24..0060d4e 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-96.c +++ b/gcc/testsuite/gcc.dg/vect/vect-96.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target vect_int } */ +/* { dg-add-options double_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c index 5e2b41a..7981c4a 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c @@ -1,5 +1,4 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-add-options quad_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c index 3346e71..93796d0 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c +++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target vect_int } */ +/* { dg-add-options double_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c index 9cb6817..ed6ac6e 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c +++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c @@ -1,5 +1,4 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-add-options quad_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c index 5bb4be8..7f72785 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c +++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target vect_int } */ +/* { dg-add-options double_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1.c index f0df5d4..2ce8f8e 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1.c @@ -22,5 +22,6 @@ foo (){ } /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1a.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1a.c index f88dd21..a9b786e 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-1a.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1a.c @@ -20,5 +20,6 @@ foo (){ } /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1b.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1b.c index e093d0e..815758c 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-1b.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1b.c @@ -22,5 +22,6 @@ foo (){ } /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-2b.c b/gcc/testsuite/gcc.dg/vect/vect-outer-2b.c index df2e6a7..cb62881 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-2b.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-2b.c @@ -37,5 +37,6 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "strided access in outer loop." 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c index 4b5107d..1759ee3 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c @@ -49,5 +49,6 @@ int main (void) } /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */ -/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 2 "vect" } } */ +/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 2 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 3 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3b.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3b.c index f11cb75..fda8727 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-3b.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3b.c @@ -49,5 +49,6 @@ int main (void) } /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 4 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-5.c b/gcc/testsuite/gcc.dg/vect/vect-outer-5.c index 05ed39a..e319d77 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-5.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-5.c @@ -1,5 +1,4 @@ /* { dg-require-effective-target vect_float } */ -/* { dg-add-options quad_vectors } */ #include #include diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-1.c b/gcc/testsuite/gcc.dg/vect/vect-peel-1.c index 2a150e9..342da18 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-peel-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-peel-1.c @@ -1,5 +1,4 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-add-options quad_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-2.c b/gcc/testsuite/gcc.dg/vect/vect-peel-2.c index 126c2cf..6a764c1 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-peel-2.c +++ b/gcc/testsuite/gcc.dg/vect/vect-peel-2.c @@ -1,5 +1,4 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-add-options quad_vectors } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-4.c b/gcc/testsuite/gcc.dg/vect/vect-peel-4.c index 1b47f268..dffb858 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-peel-4.c +++ b/gcc/testsuite/gcc.dg/vect/vect-peel-4.c @@ -6,12 +6,12 @@ #define N 128 int ib[N+7]; +int ia[N+1]; __attribute__ ((noinline)) int main1 () { int i; - int ia[N+1]; /* Don't peel keeping one load and the store aligned. */ for (i = 0; i <= N; i++) diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8b.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8b.c index 53a2401..dc9eb61 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8b.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8b.c @@ -58,7 +58,8 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 1 "vect" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" { target vect_multiple_sizes } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */ diff --git a/gcc/testsuite/gfortran.dg/vect/pr19049.f90 b/gcc/testsuite/gfortran.dg/vect/pr19049.f90 index 6c8030c..5552af6 100644 --- a/gcc/testsuite/gfortran.dg/vect/pr19049.f90 +++ b/gcc/testsuite/gfortran.dg/vect/pr19049.f90 @@ -19,6 +19,7 @@ subroutine s111 (ntimes,ld,n,ctime,dtime,a,b,c,d,e,aa,bb,cc) end ! { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } -! { dg-final { scan-tree-dump-times "complicated access pattern" 1 "vect" } } +! { dg-final { scan-tree-dump-times "complicated access pattern" 1 "vect" { xfail vect_multiple_sizes } } } +! { dg-final { scan-tree-dump-times "complicated access pattern" 2 "vect" { target vect_multiple_sizes } } } ! { dg-final { cleanup-tree-dump "vect" } } diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 54dc6b6..5470daf 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3375,6 +3375,24 @@ foreach N {2 3 4 8} { }] } +# Return 1 if the target supports multiple vector sizes + +proc check_effective_target_vect_multiple_sizes { } { + global et_vect_multiple_sizes + + if [info exists et_vect_multiple_sizes_saved] { + verbose "check_effective_target_vect_multiple_sizes: using cached result" 2 + } else { + set et_vect_multiple_sizes_saved 0 + if { ([istarget arm*-*-*] && [check_effective_target_arm_neon]) } { + set et_vect_multiple_sizes_saved 1 + } + } + + verbose "check_effective_target_vect_multiple_sizes: returning $et_vect_multiple_sizes_saved" 2 + return $et_vect_multiple_sizes_saved +} + # Return 1 if the target supports section-anchors proc check_effective_target_section_anchors { } { @@ -3758,11 +3776,11 @@ proc add_options_for_bind_pic_locally { flags } { return $flags } -# Add to FLAGS the flags needed to enable 128-bit vectors. +# Add to FLAGS the flags needed to enable 64-bit vectors. -proc add_options_for_quad_vectors { flags } { +proc add_options_for_double_vectors { flags } { if [is-effective-target arm_neon_ok] { - return "$flags -mvectorize-with-neon-quad" + return "$flags -mvectorize-with-neon-double" } return $flags