OSDN Git Service

gcc/testsuite
authorkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Dec 2011 13:34:40 +0000 (13:34 +0000)
committerkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Dec 2011 13:34:40 +0000 (13:34 +0000)
        * gcc.dg/vect/no-section-anchors-vect-31.c: Adjust array size and test
        diag-scans to fix fail on AVX.
        * gcc.dg/vect/no-section-anchors-vect-36.c: Ditto.
        * gcc.dg/vect/no-section-anchors-vect-64.c: Ditto.
        * gcc.dg/vect/no-section-anchors-vect-66.c: Ditto.
        * gcc.dg/vect/no-section-anchors-vect-68.c: Ditto.
        * gcc.dg/vect/no-section-anchors-vect-69.c: Ditto.
        * gcc.dg/vect/no-vfa-vect-dv-2.c: Adjust dg-scans.
        * gcc.dg/vect/pr45752.c: Ditto.
        * gcc.dg/vect/slp-perm-4.c: Ditto.
        * gcc.dg/vect/slp-perm-9.c: Ditto.
        * gcc.dg/vect/vect-33.c: Ditto.
        * gcc.dg/vect/vect-35.c: Ditto.
        * gcc.dg/vect/vect-6-big-array.c: Ditto.
        * gcc.dg/vect/vect-6.c: Ditto.
        * gcc.dg/vect/vect-91.c: Ditto.
        * gcc.dg/vect/vect-all-big-array.c: Ditto.
        * gcc.dg/vect/vect-all.c: Ditto.
        * gcc.dg/vect/vect-multitypes-1.c: Ditto.
        * gcc.dg/vect/vect-outer-4c.c: Ditto.
        * gcc.dg/vect/vect-outer-5.c: Ditto.
        * gcc.dg/vect/vect-over-widen-1.c: Ditto.
        * gcc.dg/vect/vect-over-widen-3.c: Ditto.
        * gcc.dg/vect/vect-over-widen-4.c: Ditto.
        * gcc.dg/vect/vect-peel-1.c: Ditto.
        * gcc.dg/vect/vect-peel-2.c: Ditto.
        * gcc.dg/vect/vect-peel-3.c: Ditto.
        * gcc.dg/vect/vect-reduc-pattern-1b.c: Ditto.
        * gcc.dg/vect/vect-reduc-pattern-1c.c: Ditto.
        * gcc.dg/vect/vect-reduc-pattern-2b.c: Ditto.
        * gcc.dg/vect/wrapv-vect-reduc-pattern-2c.c: Ditto.
        * lib/target-supports.exp (check_avx_available): New function.
        (check_effective_target_vect_sizes_32B_16B): Ditto.
        (check_prefer_avx128): Ditto.
        (check_effective_target_vect_aligned_arrays): Add handling of AVX.
        (check_effective_target_vect_multiple_sizes): Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182583 138bc75d-0d04-0410-961f-82ee72b054a4

32 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-31.c
gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-36.c
gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-64.c
gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-66.c
gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c
gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
gcc/testsuite/gcc.dg/vect/no-vfa-vect-dv-2.c
gcc/testsuite/gcc.dg/vect/pr45752.c
gcc/testsuite/gcc.dg/vect/slp-perm-4.c
gcc/testsuite/gcc.dg/vect/slp-perm-9.c
gcc/testsuite/gcc.dg/vect/vect-33.c
gcc/testsuite/gcc.dg/vect/vect-35.c
gcc/testsuite/gcc.dg/vect/vect-6-big-array.c
gcc/testsuite/gcc.dg/vect/vect-6.c
gcc/testsuite/gcc.dg/vect/vect-91.c
gcc/testsuite/gcc.dg/vect/vect-all-big-array.c
gcc/testsuite/gcc.dg/vect/vect-all.c
gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c
gcc/testsuite/gcc.dg/vect/vect-outer-4c.c
gcc/testsuite/gcc.dg/vect/vect-outer-5.c
gcc/testsuite/gcc.dg/vect/vect-over-widen-1.c
gcc/testsuite/gcc.dg/vect/vect-over-widen-3.c
gcc/testsuite/gcc.dg/vect/vect-over-widen-4.c
gcc/testsuite/gcc.dg/vect/vect-peel-1.c
gcc/testsuite/gcc.dg/vect/vect-peel-2.c
gcc/testsuite/gcc.dg/vect/vect-peel-3.c
gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b.c
gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c.c
gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b.c
gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-pattern-2c.c
gcc/testsuite/lib/target-supports.exp

index 713b560..9228371 100644 (file)
@@ -1,3 +1,42 @@
+2011-12-21  Michael Zolotukhin  <michael.v.zolotukhin@intel.com>
+
+       * gcc.dg/vect/no-section-anchors-vect-31.c: Adjust array size and test
+       diag-scans to fix fail on AVX.
+       * gcc.dg/vect/no-section-anchors-vect-36.c: Ditto.
+       * gcc.dg/vect/no-section-anchors-vect-64.c: Ditto.
+       * gcc.dg/vect/no-section-anchors-vect-66.c: Ditto.
+       * gcc.dg/vect/no-section-anchors-vect-68.c: Ditto.
+       * gcc.dg/vect/no-section-anchors-vect-69.c: Ditto.
+       * gcc.dg/vect/no-vfa-vect-dv-2.c: Adjust dg-scans.
+       * gcc.dg/vect/pr45752.c: Ditto.
+       * gcc.dg/vect/slp-perm-4.c: Ditto.
+       * gcc.dg/vect/slp-perm-9.c: Ditto.
+       * gcc.dg/vect/vect-33.c: Ditto.
+       * gcc.dg/vect/vect-35.c: Ditto.
+       * gcc.dg/vect/vect-6-big-array.c: Ditto.
+       * gcc.dg/vect/vect-6.c: Ditto.
+       * gcc.dg/vect/vect-91.c: Ditto.
+       * gcc.dg/vect/vect-all-big-array.c: Ditto.
+       * gcc.dg/vect/vect-all.c: Ditto.
+       * gcc.dg/vect/vect-multitypes-1.c: Ditto.
+       * gcc.dg/vect/vect-outer-4c.c: Ditto.
+       * gcc.dg/vect/vect-outer-5.c: Ditto.
+       * gcc.dg/vect/vect-over-widen-1.c: Ditto.
+       * gcc.dg/vect/vect-over-widen-3.c: Ditto.
+       * gcc.dg/vect/vect-over-widen-4.c: Ditto.
+       * gcc.dg/vect/vect-peel-1.c: Ditto.
+       * gcc.dg/vect/vect-peel-2.c: Ditto.
+       * gcc.dg/vect/vect-peel-3.c: Ditto.
+       * gcc.dg/vect/vect-reduc-pattern-1b.c: Ditto.
+       * gcc.dg/vect/vect-reduc-pattern-1c.c: Ditto.
+       * gcc.dg/vect/vect-reduc-pattern-2b.c: Ditto.
+       * gcc.dg/vect/wrapv-vect-reduc-pattern-2c.c: Ditto.
+       * lib/target-supports.exp (check_avx_available): New function.
+       (check_effective_target_vect_sizes_32B_16B): Ditto.
+       (check_prefer_avx128): Ditto.
+       (check_effective_target_vect_aligned_arrays): Add handling of AVX.
+       (check_effective_target_vect_multiple_sizes): Ditto.
+
 2011-12-21  Enkovich Ilya  <ilya.enkovich@intel.com>
 
        PR target/50038
index 21b87a3..350c3f4 100644 (file)
@@ -3,7 +3,7 @@
 #include <stdarg.h>
 #include "tree-vect.h"
 
-#define N 32
+#define N 64
 
 struct t{
   int k[N];
index 9476773..1384e8b 100644 (file)
@@ -3,7 +3,7 @@
 #include <stdarg.h>
 #include "tree-vect.h"
 
-#define N 16
+#define N 32
  
 struct {
   char ca[N];
index 2281104..ab2f576 100644 (file)
@@ -7,7 +7,7 @@
 
 int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
 int ia[N][4][N+1];
-int ic[N][N][3][N+1];
+int ic[N][N][3][2*N+2];
 int id[N][N][N+4];
 
 __attribute__ ((noinline))
index 49a9098..ffb455c 100644 (file)
@@ -3,7 +3,7 @@
 #include <stdarg.h>
 #include "tree-vect.h"
 
-#define N 16
+#define N 32
 
 int ia[8][5][N+2];
 int ic[16][16][5][N+2];
@@ -79,5 +79,6 @@ int main (void)
 
 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { {! vect_aligned_arrays} && {vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {vect_aligned_arrays} && {! vect_sizes_32B_16B} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index de036e8..4b61305 100644 (file)
@@ -3,7 +3,7 @@
 #include <stdarg.h>
 #include "tree-vect.h"
 
-#define N 32
+#define N 64
 
 struct s{
   int m;
@@ -88,5 +88,6 @@ int main (void)
 
 /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { target { {! vect_aligned_arrays} && {vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { {vect_aligned_arrays} && {! vect_sizes_32B_16B} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index cc4f26f..a18d7d6 100644 (file)
@@ -3,7 +3,7 @@
 #include <stdarg.h>
 #include "tree-vect.h"
 
-#define N 12
+#define N 24
 
 struct s{
   int m;
@@ -114,7 +114,7 @@ int main (void)
 
 /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {! vector_alignment_reachable} } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { {! vector_alignment_reachable} || { ! vect_aligned_arrays} } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 1a49ef2..2b4482a 100644 (file)
@@ -74,5 +74,6 @@ int main ()
 
 /* The initialization induction loop (with aligned access) is also vectorized.  */
 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 2 "vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 1 "vect" { target { {! vect_aligned_arrays } && {vect_sizes_32B_16B} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 18047d5..b4b3c1b 100644 (file)
@@ -102,7 +102,7 @@ int main (int argc, const char* argv[])
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect"  } } */
-/* { dg-final { scan-tree-dump-times "permutation requires at least three vectors" 2 "vect" { target vect_perm } } } */
+/* { dg-final { scan-tree-dump "permutation requires at least three vectors" "vect" { target vect_perm } } } */
 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect"  } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
 
index 239461a..d0a0695 100644 (file)
@@ -81,7 +81,7 @@ int main (int argc, const char* argv[])
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect"  } } */
-/* { dg-final { scan-tree-dump-times "permutation requires at least three vectors" 1 "vect" { target vect_perm } } } */
+/* { dg-final { scan-tree-dump "permutation requires at least three vectors" "vect" { target vect_perm} } } */
 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect"  } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
 
index d1653ba..2f1cb35 100644 (file)
@@ -52,8 +52,10 @@ int main (int argc, const char* argv[])
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  { target { {! vect_perm } || {! vect_sizes_32B_16B } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect"  { target { { vect_perm } && { vect_sizes_32B_16B } } } } } */
 /* { dg-final { scan-tree-dump-times "permutation requires at least three vectors" 1 "vect" { target vect_perm_short } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect"  } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target { {! vect_perm } || {! vect_sizes_32B_16B } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { { vect_perm } && { vect_sizes_32B_16B } } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
 
index d35bce4..43daaa8 100644 (file)
@@ -39,6 +39,6 @@ int main (void)
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target vector_alignment_reachable } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */ 
+/* { dg-final { scan-tree-dump "Alignment of access forced using peeling" "vect" { target vector_alignment_reachable } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 0f4284a..63fc8c8 100644 (file)
@@ -46,5 +46,5 @@ int main (void)
 
 
 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect"  { xfail { ia64-*-* sparc*-*-* } } } } */
-/* { dg-final { scan-tree-dump-times "can't determine dependence between" 1 "vect" } } */
+/* { dg-final { scan-tree-dump "can't determine dependence between" "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 14d3faa..11b7fe2 100644 (file)
@@ -75,5 +75,6 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_aligned_arrays } && {vect_sizes_32B_16B} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 5f2e0ea..7611714 100644 (file)
@@ -54,5 +54,6 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_aligned_arrays } && {vect_sizes_32B_16B} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 619c8ed..019cf35 100644 (file)
@@ -58,7 +58,8 @@ main3 ()
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" { xfail vect_no_int_add } } } */
-/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 3 "vect" } } */
+/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 3 "vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 2 "vect" { target { {! vect_aligned_arrays } && {vect_sizes_32B_16B} } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" {target { vector_alignment_reachable } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" {target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index ef5213a..16da076 100644 (file)
@@ -249,6 +249,7 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 10 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_aligned_arrays } && {vect_sizes_32B_16B} } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 6adb7bf..6756283 100644 (file)
@@ -215,6 +215,7 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 10 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_aligned_arrays } && {vect_sizes_32B_16B} } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 7981c4a..782f7b0 100644 (file)
@@ -81,7 +81,7 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {{ vect_no_align } || {! vect_aligned_arrays }}} } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail {{ vect_no_align } || {! vect_aligned_arrays }}} } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
 
index 3342b79..6053b19 100644 (file)
@@ -23,5 +23,5 @@ foo (){
 }
 
 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { target { vect_short_mult && { ! vect_no_align } } } } } */
-/* { dg-final { scan-tree-dump-times "zero step in outer loop." 1 "vect" } } */
+/* { dg-final { scan-tree-dump "zero step in outer loop." "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index e319d77..2d37d6d 100644 (file)
@@ -78,5 +78,5 @@ int main ()
    is known.  */
 /* { dg-final { scan-tree-dump-times "not vectorized: possible dependence between data-refs" 1 "vect" { xfail *-*-* } } } */
 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "zero step in outer loop." 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump "zero step in outer loop." "vect" { xfail vect_no_align } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 36f4684..47db4a1 100644 (file)
@@ -58,7 +58,8 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" { target {! vect_sizes_32B_16B} } } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 8 "vect" { target vect_sizes_32B_16B } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
 
index ed36688..c694658 100644 (file)
@@ -58,7 +58,7 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump "vect_recog_over_widening_pattern: detected" "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
 
index c1291e3..d3d4443 100644 (file)
@@ -62,7 +62,8 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" { target {! vect_sizes_32B_16B } } } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 8 "vect" { target vect_sizes_32B_16B } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
 
index 342da18..b593411 100644 (file)
@@ -48,6 +48,6 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_element_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 6a764c1..ea27043 100644 (file)
@@ -49,6 +49,6 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_element_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target vect_element_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 8f4d357..caf0a4d 100644 (file)
@@ -48,6 +48,6 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect"  { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect"  { xfail { { vect_no_align } || {! vect_aligned_arrays } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || {! vect_aligned_arrays } } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 6effa87..553ab6f 100644 (file)
@@ -34,7 +34,7 @@ main (void)
   return foo ();
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump "vect_recog_widen_sum_pattern: detected" "vect"} } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_widen_sum_qi_to_si || vect_unpack } } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { { ! vect_widen_sum_qi_to_si } && { ! vect_unpack } } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 872e6e8..2fc7f9a 100644 (file)
@@ -34,7 +34,7 @@ main (void)
   return foo ();
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump "vect_recog_widen_sum_pattern: detected" "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_sum_qi_to_hi } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_widen_sum_qi_to_hi } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 53d5f0d..6106ed8 100644 (file)
@@ -34,7 +34,7 @@ main (void)
   return foo ();
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump "vect_recog_widen_sum_pattern: detected" "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_widen_sum_qi_to_si && vect_unpack } } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { { ! vect_widen_sum_qi_to_si } && { ! vect_unpack } } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 12f3650..7611c35 100644 (file)
@@ -35,7 +35,7 @@ main (void)
   return foo ();
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump "vect_recog_widen_sum_pattern: detected" "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_sum_qi_to_hi } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_widen_sum_qi_to_hi } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 78223af..1a54043 100644 (file)
@@ -3207,9 +3207,14 @@ proc check_effective_target_vect_aligned_arrays { } {
        verbose "check_effective_target_vect_aligned_arrays: using cached result" 2
     } else {
        set et_vect_aligned_arrays_saved 0
-        if { (([istarget x86_64-*-*]
-              || [istarget i?86-*-*]) && [is-effective-target lp64])
-              || [istarget spu-*-*] } {
+        if { ([istarget x86_64-*-*] || [istarget i?86-*-*]) } {
+           if { ([is-effective-target lp64]
+                 && ( ![check_avx_available]
+                    || [check_prefer_avx128])) } {
+                set et_vect_aligned_arrays_saved 1
+           }
+       }
+        if [istarget spu-*-*] {
            set et_vect_aligned_arrays_saved 1
        }
     }
@@ -3507,13 +3512,14 @@ foreach N {2 3 4 8} {
 proc check_effective_target_vect_multiple_sizes { } {
     global et_vect_multiple_sizes_saved
 
-    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
-        }
+    set et_vect_multiple_sizes_saved 0
+    if { ([istarget arm*-*-*] && [check_effective_target_arm_neon]) } {
+       set et_vect_multiple_sizes_saved 1
+    }
+    if { ([istarget x86_64-*-*] || [istarget i?86-*-*]) } {
+      if { ([check_avx_available] && ![check_prefer_avx128]) } {
+       set et_vect_multiple_sizes_saved 1
+      }
     }
 
     verbose "check_effective_target_vect_multiple_sizes: returning $et_vect_multiple_sizes_saved" 2
@@ -4125,6 +4131,39 @@ proc check_effective_target_automatic_stack_alignment  { } {
     return 0;
 }
 
+# Return true if we are compiling for AVX target.
+
+proc check_avx_available { } {
+  if { [check_no_compiler_messages avx_available assembly {
+    #ifndef __AVX__
+    #error unsupported
+    #endif
+  } ""] } {
+    return 1;
+  }
+  return 0;
+}
+
+# Return true if 32- and 16-bytes vectors are available.
+
+proc check_effective_target_vect_sizes_32B_16B { } {
+  return [check_avx_available];
+}
+
+# Return true if 128-bits vectors are preferred even if 256-bits vectors
+# are available.
+
+proc check_prefer_avx128 { } {
+    if ![check_avx_available] {
+      return 0;
+    }
+    return [check_no_messages_and_pattern avx_explicit "xmm" assembly {
+      float a[1024],b[1024],c[1024];
+      void foo (void) { int i; for (i = 0; i < 1024; i++) a[i]=b[i]+c[i];}
+    } "-O2 -ftree-vectorize"]
+}
+
+
 # Return 1 if avx instructions can be compiled.
 
 proc check_effective_target_avx { } {