summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-20 08:12:46 +0000
committerdorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-20 08:12:46 +0000
commit016ca71ea94259f1e069bbb78c0906f73635a250 (patch)
treed84f37260e995c1366ac605833bbb0de0a2794e5
parent7fce04b04726bc59436a23b7318e9dcc84d18bcc (diff)
downloadgcc-016ca71ea94259f1e069bbb78c0906f73635a250.tar.gz
* gcc.dg/vect/vect-40.c: Remove pointers to "aligned types".
Use pointers to local alignable arrays instead. Added comments. * gcc.dg/vect/vect-46.c: Likewise. * gcc.dg/vect/vect-48.c: Likewise. * gcc.dg/vect/vect-49.c: Likewise. * gcc.dg/vect/vect-52.c: Likewise. * gcc.dg/vect/vect-53.c: Likewise. * gcc.dg/vect/vect-54.c: Likewise. * gcc.dg/vect/vect-56.c: Likewise. * gcc.dg/vect/vect-57.c: Likewise. * gcc.dg/vect/vect-58.c: Likewise. * gcc.dg/vect/vect-60.c: Likewise. * gcc.dg/vect/vect-61.c: Likewise. * gcc.dg/vect/vect-42.c: Remove pointers to "aligned types". The test is no longer vectorizable on vect_no_align targets. * gcc.dg/vect/vect-43.c: Likewsie. * gcc.dg/vect/vect-44.c: Added comments. * gcc.dg/vect/vect-45.c: Added comments. * gcc.dg/vect/vect-50.c: Added comments. * gcc.dg/vect/vect-51.c: Added comments. * gcc.dg/vect/vect-95.c: Use aligned arrays instead of arrays to aligned type. * gcc.dg/vect/Os-vect-95.c: Likewise. * gcc.dg/vect/vect-41.c: Test removed. * gcc.dg/vect/vect-47.c: Test removed. * gcc.dg/vect/vect-55.c: Test removed. * gcc.dg/vect/vect-59.c: Test removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104448 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog34
-rw-r--r--gcc/testsuite/gcc.dg/vect/Os-vect-95.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-40.c28
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-41.c55
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-42.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-43.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-44.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-45.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-46.c25
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-47.c56
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-48.c38
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-49.c23
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-50.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-51.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-52.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-53.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-54.c24
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-55.c54
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-56.c35
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-57.c26
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-58.c22
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-59.c55
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-60.c33
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-61.c22
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-95.c14
25 files changed, 292 insertions, 383 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6b46fe2dc00..64f08bd5928 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4 +1,38 @@
2005-09-20 Dorit Nuzman <dorit@il.ibm.com>
+
+ * gcc.dg/vect/vect-40.c: Remove pointers to "aligned types".
+ Use pointers to local alignable arrays instead. Added comments.
+ * gcc.dg/vect/vect-46.c: Likewise.
+ * gcc.dg/vect/vect-48.c: Likewise.
+ * gcc.dg/vect/vect-49.c: Likewise.
+ * gcc.dg/vect/vect-52.c: Likewise.
+ * gcc.dg/vect/vect-53.c: Likewise.
+ * gcc.dg/vect/vect-54.c: Likewise.
+ * gcc.dg/vect/vect-56.c: Likewise.
+ * gcc.dg/vect/vect-57.c: Likewise.
+ * gcc.dg/vect/vect-58.c: Likewise.
+ * gcc.dg/vect/vect-60.c: Likewise.
+ * gcc.dg/vect/vect-61.c: Likewise.
+
+ * gcc.dg/vect/vect-42.c: Remove pointers to "aligned types".
+ The test is no longer vectorizable on vect_no_align targets.
+ * gcc.dg/vect/vect-43.c: Likewsie.
+
+ * gcc.dg/vect/vect-44.c: Added comments.
+ * gcc.dg/vect/vect-45.c: Added comments.
+ * gcc.dg/vect/vect-50.c: Added comments.
+ * gcc.dg/vect/vect-51.c: Added comments.
+
+ * gcc.dg/vect/vect-95.c: Use aligned arrays instead of arrays to
+ aligned type.
+ * gcc.dg/vect/Os-vect-95.c: Likewise.
+
+ * gcc.dg/vect/vect-41.c: Test removed.
+ * gcc.dg/vect/vect-47.c: Test removed.
+ * gcc.dg/vect/vect-55.c: Test removed.
+ * gcc.dg/vect/vect-59.c: Test removed.
+
+2005-09-20 Dorit Nuzman <dorit@il.ibm.com>
* gcc.dg/vect/pr16105.c: Replace "aligned types" with regular types.
No longer vectorizable on vect_no_align targets.
diff --git a/gcc/testsuite/gcc.dg/vect/Os-vect-95.c b/gcc/testsuite/gcc.dg/vect/Os-vect-95.c
index 7b57d0d9153..be7168b30ff 100644
--- a/gcc/testsuite/gcc.dg/vect/Os-vect-95.c
+++ b/gcc/testsuite/gcc.dg/vect/Os-vect-95.c
@@ -5,8 +5,6 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
void bar (float *pd, float *pa, float *pb, float *pc)
{
int i;
@@ -43,8 +41,8 @@ main1 (int n, float * __restrict__ pd, float * __restrict__ pa, float * __restri
int main (void)
{
int i;
- afloat a[N];
- afloat d[N+1];
+ float a[N] __attribute__ ((__aligned__(16)));
+ float d[N+1] __attribute__ ((__aligned__(16)));
float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
diff --git a/gcc/testsuite/gcc.dg/vect/vect-40.c b/gcc/testsuite/gcc.dg/vect/vect-40.c
index 7abacd65903..43db7bff8f2 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-40.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-40.c
@@ -5,9 +5,7 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
+void bar (float *pa, float *pb, float *pc)
{
int i;
@@ -21,31 +19,37 @@ void bar (afloat *pa, afloat *pb, afloat *pc)
return;
}
+/* Aligned pointer accesses.
+ The loop bound is known and divisible by the vectorization factor.
+ No aliasing problems.
+ vect-46.c is similar to this one with one difference:
+ the loop bound is unknown. */
int
-main1 (afloat * __restrict__ pa, afloat * __restrict__ pb, afloat * __restrict__ pc)
+main1 ()
{
int i;
+ float a[N] __attribute__ ((__aligned__(16)));
+ float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
+ float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+ float *pa = a;
+ float *pb = b;
+ float *pc = c;
for (i = 0; i < N; i++)
{
pa[i] = pb[i] * pc[i];
}
+ bar (pa,pb,pc);
+
return 0;
}
int main (void)
{
- int i;
- float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
-
check_vect ();
-
- main1 (a,b,c);
- bar (a,b,c);
+ main1 ();
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-41.c b/gcc/testsuite/gcc.dg/vect/vect-41.c
deleted file mode 100644
index ee2ccdf4b87..00000000000
--- a/gcc/testsuite/gcc.dg/vect/vect-41.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* { dg-require-effective-target vect_float } */
-
-#include <stdarg.h>
-#include "tree-vect.h"
-
-#define N 256
-
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
-{
- int i;
-
- /* check results: */
- for (i = 0; i < N; i++)
- {
- if (pa[i] != (pb[i] * pc[i]))
- abort ();
- }
-
- return;
-}
-
-
-int
-main1 (afloat * pa, afloat * pb, afloat * pc)
-{
- int i;
-
- for (i = 0; i < N; i++)
- {
- pa[i] = pb[i] * pc[i];
- }
-
- bar (pa,pb,pc);
-
- return 0;
-}
-
-int main (void)
-{
- int i;
- float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
-
- check_vect ();
-
- main1 (a,b,c);
- return 0;
-}
-
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-42.c b/gcc/testsuite/gcc.dg/vect/vect-42.c
index 714596891d3..ea50fc41405 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-42.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-42.c
@@ -5,9 +5,7 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
+void bar (float *pa, float *pb, float *pc)
{
int i;
@@ -21,15 +19,19 @@ void bar (afloat *pa, afloat *pb, afloat *pc)
return;
}
+/* Unaligned write access, aligned read accesses.
+ Since we are handling an unaligned store by peeling the loop,
+ the loads will become unaligned.
+ The loop bound is known and divisible by the vectorization factor.
+ No aliasing problems. */
int
-main1 (afloat * __restrict__ pa)
+main1 (float * __restrict__ pa)
{
int i;
float pb[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
float pc[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
-
for (i = 0; i < N; i++)
{
pa[i] = pb[i] * pc[i];
@@ -52,6 +54,7 @@ int main (void)
return 0;
}
-/* { 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 "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "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 { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-43.c b/gcc/testsuite/gcc.dg/vect/vect-43.c
index e47bdaaeb81..8594a3320d6 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-43.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-43.c
@@ -5,9 +5,7 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
+void bar (float *pa, float *pb, float *pc)
{
int i;
@@ -23,7 +21,7 @@ void bar (afloat *pa, afloat *pb, afloat *pc)
int
-main1 (afloat * pa)
+main1 (float *pa)
{
int i;
float pb[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
@@ -41,11 +39,11 @@ main1 (afloat * pa)
}
int
-main2 (afloat * pa)
+main2 (float * pa)
{
int i;
- afloat pb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- afloat pc[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+ float pb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
+ float pc[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
/* Vectorizable: pb and pc addresses do not escape. */
for (i = 0; i < N; i++)
@@ -67,8 +65,6 @@ int main (void)
{
int i;
float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
check_vect ();
@@ -77,6 +73,5 @@ int main (void)
return 0;
}
-/* { 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 "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-44.c b/gcc/testsuite/gcc.dg/vect/vect-44.c
index e0e76324586..78c7abd4875 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-44.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-44.c
@@ -19,6 +19,14 @@ void bar (float *pa, float *pb, float *pc)
return;
}
+/* Unaligned pointer accesses, with unknown alignment.
+ The loop bound is known and divisible by the vectorization factor.
+ No aliasing problems.
+ vect-50.c is similar to this one with one difference:
+ the loop bound is unknown.
+ vect-45.c is similar to this one with one difference:
+ can't prove that pointers don't alias. */
+
int
main1 (float * __restrict__ pa, float * __restrict__ pb, float * __restrict__ pc)
{
diff --git a/gcc/testsuite/gcc.dg/vect/vect-45.c b/gcc/testsuite/gcc.dg/vect/vect-45.c
index 05925090cee..8a998564319 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-45.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-45.c
@@ -5,7 +5,6 @@
#define N 256
-
void bar (const float *pa, const float *pb, const float *pc)
{
int i;
@@ -20,6 +19,13 @@ void bar (const float *pa, const float *pb, const float *pc)
return;
}
+/* Unaligned pointer accesses, with unknown alignment.
+ The loop bound is known and divisible by the vectorization factor.
+ Can't prove that the pointers don't alias.
+ vect-51.c is similar to this one with one difference:
+ the loop bound is unknown.
+ vect-44.c is similar to this one with one difference:
+ Aliasing is not a problem. */
int
main1 (float *pa, float *pb, float *pc)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-46.c b/gcc/testsuite/gcc.dg/vect/vect-46.c
index 687393400a9..08db542b403 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-46.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-46.c
@@ -5,9 +5,7 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
+void bar (float *pa, float *pb, float *pc)
{
int i;
@@ -21,17 +19,28 @@ void bar (afloat *pa, afloat *pb, afloat *pc)
return;
}
+/* Aligned pointer accesses.
+ The loop bound is unknown.
+ No aliasing problems.
+ vect-40.c is similar to this one with one difference:
+ the loop bound is known. */
int
-main1 (int n , afloat * __restrict__ pa, afloat * __restrict__ pb, afloat * __restrict__ pc)
+main1 (int n)
{
int i;
+ float a[N] __attribute__ ((__aligned__(16))); float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57}; float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+ float *pa = a;
+ float *pb = b;
+ float *pc = c;
for (i = 0; i < n; i++)
{
pa[i] = pb[i] * pc[i];
}
+ bar (pa,pb,pc);
+
return 0;
}
@@ -39,14 +48,8 @@ int main (void)
{
int i;
int n=N;
- float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
-
check_vect ();
-
- main1 (n,a,b,c);
- bar (a,b,c);
+ main1 (n);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-47.c b/gcc/testsuite/gcc.dg/vect/vect-47.c
deleted file mode 100644
index 4f21ffc88c8..00000000000
--- a/gcc/testsuite/gcc.dg/vect/vect-47.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* { dg-require-effective-target vect_float } */
-
-#include <stdarg.h>
-#include "tree-vect.h"
-
-#define N 256
-
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
-{
- int i;
-
- /* check results: */
- for (i = 0; i < N; i++)
- {
- if (pa[i] != (pb[i] * pc[i]))
- abort ();
- }
-
- return;
-}
-
-
-int
-main1 (int n , afloat * pa, afloat * pb, afloat * pc)
-{
- int i;
-
- for (i = 0; i < n; i++)
- {
- pa[i] = pb[i] * pc[i];
- }
-
- bar (pa,pb,pc);
-
- return 0;
-}
-
-int main (void)
-{
- int i;
- int n=N;
- float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
-
- check_vect ();
-
- main1 (n,a,b,c);
- return 0;
-}
-
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-48.c b/gcc/testsuite/gcc.dg/vect/vect-48.c
index e2199d028a6..38135d952fd 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-48.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-48.c
@@ -5,49 +5,47 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
+/* Unaligned pointer read accesses, aligned write access.
+ The loop bound is known and divisible by the vectorization factor.
+ No aliasing problems.
+ vect-56.c is similar to this one with one difference:
+ the alignment of the read accesses is known.
+ vect-52.c is similar to this one with one difference:
+ the loop bound is unknown.
+ vect-49.c is similar to this one with one difference:
+ aliasing is a problem. */
-void bar (float *pa, float *pb, float *pc)
+int
+main1 (float *pb, float *pc)
{
+ float pa[N] __attribute__ ((__aligned__(16)));
int i;
- /* check results: */
for (i = 0; i < N; i++)
{
- if (pa[i] != (pb[i] * pc[i]))
- abort ();
+ pa[i] = pb[i] * pc[i];
}
- return;
-}
-
-
-int
-main1 (afloat * __restrict__ pa, float * __restrict__ pb, float * __restrict__ pc)
-{
- int i;
-
+ /* check results: */
for (i = 0; i < N; i++)
{
- pa[i] = pb[i] * pc[i];
+ if (pa[i] != (pb[i] * pc[i]))
+ abort ();
}
- bar (pa,pb,pc);
-
return 0;
}
int main (void)
{
int i;
- float a[N] __attribute__ ((__aligned__(16)));
float b[N+1] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60};
float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
check_vect ();
- main1 (a,b,c);
- main1 (a,&b[1],c);
+ main1 (b,c);
+ main1 (&b[1],c);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-49.c b/gcc/testsuite/gcc.dg/vect/vect-49.c
index fda45952a72..8dfd0e749b5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-49.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-49.c
@@ -5,9 +5,7 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (const float *pa, const float *pb, const float *pc)
+void bar (float *pa, float *pb, float *pc)
{
int i;
@@ -21,10 +19,18 @@ void bar (const float *pa, const float *pb, const float *pc)
return;
}
+/* Unaligned pointer read accesses, aligned pointer write access.
+ The loop bound is known and divisible by the vectorization factor.
+ Can't prove that the pointers don't alias.
+ vect-53.c is similar to this one with one difference:
+ the loop bound is unknown.
+ vect-48.c is similar to this one with one difference:
+ aliasing is not a problem. */
int
-main1 (afloat *pa, float *pb, float *pc)
+main1 (float *pb, float *pc)
{
+ float pa[N] __attribute__ ((__aligned__(16)));
int i;
for (i = 0; i < N; i++)
@@ -40,13 +46,14 @@ main1 (afloat *pa, float *pb, float *pc)
int main (void)
{
int i;
- float a[N];
- float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+ float b[N+1] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60};
+ float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
check_vect ();
- main1 (a,b,c);
+ main1 (b,c);
+ main1 (&b[1],c);
+
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-50.c b/gcc/testsuite/gcc.dg/vect/vect-50.c
index 6f065e8d663..aed2399046b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-50.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-50.c
@@ -5,7 +5,6 @@
#define N 256
-
void bar (float *pa, float *pb, float *pc)
{
int i;
@@ -20,7 +19,6 @@ void bar (float *pa, float *pb, float *pc)
return;
}
-
int
main1 (int n, float * __restrict__ pa, float * __restrict__ pb, float * __restrict__ pc)
{
@@ -36,6 +34,14 @@ main1 (int n, float * __restrict__ pa, float * __restrict__ pb, float * __restri
return 0;
}
+/* Unaligned pointer accesses, with unknown alignment.
+ The loop bound is unknown.
+ No aliasing problems.
+ vect-44.c is similar to this one with one difference:
+ the loop bound is known.
+ vect-51.c is similar to this one with one difference:
+ can't prove that pointers don't alias. */
+
int main (void)
{
int i;
diff --git a/gcc/testsuite/gcc.dg/vect/vect-51.c b/gcc/testsuite/gcc.dg/vect/vect-51.c
index f29af132a1f..541a5ffef3b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-51.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-51.c
@@ -5,7 +5,6 @@
#define N 256
-
void bar (const float *pa, const float *pb, const float *pc)
{
int i;
@@ -20,6 +19,13 @@ void bar (const float *pa, const float *pb, const float *pc)
return;
}
+/* Unaligned pointer accesses, with unknown alignment.
+ The loop bound is unknown.
+ Can't prove that the pointers don't alias.
+ vect-45.c is similar to this one with one difference:
+ the loop bound is known.
+ vect-50.c is similar to this one with one difference:
+ Aliasing is not a problem. */
int
main1 (int n, float *pa, float *pb, float *pc)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-52.c b/gcc/testsuite/gcc.dg/vect/vect-52.c
index 6b9b1844ee7..bddbc837965 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-52.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-52.c
@@ -5,26 +5,20 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (float *pa, float *pb, float *pc)
-{
- int i;
-
- /* check results: */
- for (i = 0; i < N; i++)
- {
- if (pa[i] != (pb[i] * pc[i]))
- abort ();
- }
-
- return;
-}
-
+/* Unaligned pointer read accesses, aligned write access.
+ The loop bound is unknown.
+ No aliasing problems.
+ vect-60.c is similar to this one with one difference:
+ the alignment of the read accesses is known.
+ vect-48.c is similar to this one with one difference:
+ the loop bound is known.
+ vect-53.c is similar to this one with one difference:
+ aliasing is a problem. */
int
-main1 (int n, afloat * __restrict__ pa, float * __restrict__ pb, float * __restrict__ pc)
+main1 (int n, float *pb, float *pc)
{
+ float pa[N] __attribute__ ((__aligned__(16)));
int i;
for (i = 0; i < n; i++)
@@ -32,7 +26,12 @@ main1 (int n, afloat * __restrict__ pa, float * __restrict__ pb, float * __restr
pa[i] = pb[i] * pc[i];
}
- bar (pa,pb,pc);
+ /* check results: */
+ for (i = 0; i < N; i++)
+ {
+ if (pa[i] != (pb[i] * pc[i]))
+ abort ();
+ }
return 0;
}
@@ -46,8 +45,9 @@ int main (void)
check_vect ();
- main1 (N,a,&b[1],c);
- main1 (N,a,&b[1],&c[1]);
+ main1 (N,&b[1],c);
+ main1 (N,&b[1],&c[1]);
+
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-53.c b/gcc/testsuite/gcc.dg/vect/vect-53.c
index 1fd7c9305e3..91eaabeb93b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-53.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-53.c
@@ -5,8 +5,6 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
void bar (const float *pa, const float *pb, const float *pc)
{
int i;
@@ -21,10 +19,18 @@ void bar (const float *pa, const float *pb, const float *pc)
return;
}
+/* Unaligned pointer read accesses, aligned pointer write access.
+ The loop bound is unknown.
+ Can't prove that the pointers don't alias.
+ vect-49.c is similar to this one with one difference:
+ the loop bound is known.
+ vect-52.c is similar to this one with one difference:
+ aliasing is not a problem. */
int
-main1 (int n, afloat *pa, float *pb, float *pc)
+main1 (int n, float *pb, float *pc)
{
+ float pa[N] __attribute__ ((__aligned__(16)));
int i;
for (i = 0; i < n; i++)
@@ -46,8 +52,9 @@ int main (void)
check_vect ();
- main1 (N,a,&b[1],c);
- main1 (N,a,&b[1],&c[1]);
+ main1 (N,&b[1],c);
+ main1 (N,&b[1],&c[1]);
+
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-54.c b/gcc/testsuite/gcc.dg/vect/vect-54.c
index 197e6d12680..05962dfd35f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-54.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-54.c
@@ -5,9 +5,7 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
+void bar (float *pa, float *pb, float *pc)
{
int i;
@@ -21,18 +19,29 @@ void bar (afloat *pa, afloat *pb, afloat *pc)
return;
}
+/* Unaligned pointer accesses, with a known alignment.
+ The loop bound is known and divisible by the vectorization factor.
+ No aliasing problems.
+ vect-58.c is similar to this one with one difference:
+ the loop bound is unknown. */
int
-main1 (afloat * __restrict__ pa, afloat * __restrict__ pb, afloat * __restrict__ pc)
+main1 ()
{
int i;
+ float a[N] __attribute__ ((__aligned__(16)));
+ float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
+ float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+ float *pa = a;
+ float *pb = b;
+ float *pc = c;
for (i = 0; i < N/2; i++)
{
pa[i+1] = pb[i+1] * pc[i+1];
}
- bar (pa,pb,pc);
+ bar (a,b,c);
return 0;
}
@@ -40,13 +49,10 @@ main1 (afloat * __restrict__ pa, afloat * __restrict__ pb, afloat * __restrict__
int main (void)
{
int i;
- float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
check_vect ();
+ main1 ();
- main1 (a,b,c);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-55.c b/gcc/testsuite/gcc.dg/vect/vect-55.c
deleted file mode 100644
index 6601b2fc7f1..00000000000
--- a/gcc/testsuite/gcc.dg/vect/vect-55.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* { dg-require-effective-target vect_float } */
-
-#include <stdarg.h>
-#include "tree-vect.h"
-
-#define N 256
-
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
-{
- int i;
-
- /* check results: */
- for (i = 0; i < N/2; i++)
- {
- if (pa[i+1] != (pb[i+1] * pc[i+1]))
- abort ();
- }
-
- return;
-}
-
-
-int
-main1 (afloat * pa, afloat * pb, afloat * pc)
-{
- int i;
-
- for (i = 0; i < N/2; i++)
- {
- pa[i+1] = pb[i+1] * pc[i+1];
- }
-
- bar (pa,pb,pc);
-
- return 0;
-}
-
-int main (void)
-{
- int i;
- float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
-
- check_vect ();
-
- main1 (a,b,c);
- return 0;
-}
-
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-56.c b/gcc/testsuite/gcc.dg/vect/vect-56.c
index fe4c7b6482e..d74afab374b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-56.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-56.c
@@ -5,9 +5,7 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
+void bar (float *pa, float *pb, float *pc)
{
int i;
@@ -15,24 +13,44 @@ void bar (afloat *pa, afloat *pb, afloat *pc)
for (i = 0; i < N/2; i++)
{
if (pa[i] != (pb[i+1] * pc[i+1]))
- abort ();
+ abort ();
}
return;
}
+/* Unaligned pointer read accesses, aligned write access.
+ The loop bound is known and divisible by the vectorization factor.
+ No aliasing problems.
+ vect-48.c is similar to this one with one difference:
+ the alignment of the read accesses is unknown.
+ vect-60.c is similar to this one with one difference:
+ the loop bound is unknown.
+ vect-57.c is similar to this one with two differences:
+ aliasing is a problem, and the write access has unknown alignment. */
int
-main1 (afloat * __restrict__ pa, afloat * __restrict__ pb, afloat * __restrict__ pc)
+main1 ()
{
int i;
+ float a[N] __attribute__ ((__aligned__(16)));
+ float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
+ float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+ float *pa = a;
+ float *pb = b;
+ float *pc = c;
for (i = 0; i < N/2; i++)
{
pa[i] = pb[i+1] * pc[i+1];
}
- bar (pa,pb,pc);
+ /* check results: */
+ for (i = 0; i < N/2; i++)
+ {
+ if (pa[i] != (pb[i+1] * pc[i+1]))
+ abort ();
+ }
return 0;
}
@@ -40,13 +58,10 @@ main1 (afloat * __restrict__ pa, afloat * __restrict__ pb, afloat * __restrict__
int main (void)
{
int i;
- float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
check_vect ();
+ main1 ();
- main1 (a,b,c);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-57.c b/gcc/testsuite/gcc.dg/vect/vect-57.c
index f197eb4b69d..bcac95a0393 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-57.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-57.c
@@ -5,9 +5,7 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
+void bar (float *pa, float *pb, float *pc)
{
int i;
@@ -15,24 +13,36 @@ void bar (afloat *pa, afloat *pb, afloat *pc)
for (i = 0; i < N/2; i++)
{
if (pa[i] != (pb[i+1] * pc[i+1]))
- abort ();
+ abort ();
}
return;
}
+/* Unaligned pointer read accesses with known alignment,
+ and an unaligned write access with unknown alignment.
+ The loop bound is known and divisible by the vectorization factor.
+ Can't prove that the pointers don't alias.
+ vect-61.c is similar to this one with one difference:
+ the loop bound is unknown.
+ vect-56.c is similar to this one with two differences:
+ aliasing is a problem, and the write access is aligned. */
int
-main1 (afloat * pa, afloat * pb, afloat * pc)
+main1 (float *pa)
{
int i;
+ float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
+ float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+ float *pb = b;
+ float *pc = c;
for (i = 0; i < N/2; i++)
{
pa[i] = pb[i+1] * pc[i+1];
}
- bar (pa,pb,pc);
+ bar (pa, pb, pc);
return 0;
}
@@ -41,12 +51,10 @@ int main (void)
{
int i;
float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
check_vect ();
+ main1 (a);
- main1 (a,b,c);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-58.c b/gcc/testsuite/gcc.dg/vect/vect-58.c
index 67bce93cc90..89f6de63924 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-58.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-58.c
@@ -5,9 +5,7 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
+void bar (float *pa, float *pb, float *pc)
{
int i;
@@ -21,18 +19,27 @@ void bar (afloat *pa, afloat *pb, afloat *pc)
return;
}
+/* Unaligned pointer accesses, with a known alignment.
+ The loop bound is unknown.
+ No aliasing problems.
+ vect-54.c is similar to this one with one difference:
+ the loop bound is known. */
int
-main1 (int n , afloat * __restrict__ pa, afloat * __restrict__ pb, afloat * __restrict__ pc)
+main1 (int n)
{
int i;
+ float a[N] __attribute__ ((__aligned__(16))); float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57}; float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+ float *pa = a;
+ float *pb = b;
+ float *pc = c;
for (i = 0; i < n/2; i++)
{
pa[i+1] = pb[i+1] * pc[i+1];
}
- bar (pa,pb,pc);
+ bar (a,b,c);
return 0;
}
@@ -41,13 +48,10 @@ int main (void)
{
int i;
int n=N;
- float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
check_vect ();
+ main1 (n);
- main1 (n,a,b,c);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-59.c b/gcc/testsuite/gcc.dg/vect/vect-59.c
deleted file mode 100644
index c061a3a28e5..00000000000
--- a/gcc/testsuite/gcc.dg/vect/vect-59.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* { dg-require-effective-target vect_float } */
-
-#include <stdarg.h>
-#include "tree-vect.h"
-
-#define N 256
-
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
-{
- int i;
-
- /* check results: */
- for (i = 0; i < N/2; i++)
- {
- if (pa[i+1] != (pb[i+1] * pc[i+1]))
- abort ();
- }
-
- return;
-}
-
-
-int
-main1 (int n , afloat * pa, afloat * pb, afloat * pc)
-{
- int i;
-
- for (i = 0; i < n/2; i++)
- {
- pa[i+1] = pb[i+1] * pc[i+1];
- }
-
- bar (pa,pb,pc);
-
- return 0;
-}
-
-int main (void)
-{
- int i;
- int n=N;
- float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
-
- check_vect ();
-
- main1 (n,a,b,c);
- return 0;
-}
-
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-60.c b/gcc/testsuite/gcc.dg/vect/vect-60.c
index 3021ee4436c..6fbcb941437 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-60.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-60.c
@@ -5,9 +5,7 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
+void bar (float *pa, float *pb, float *pc)
{
int i;
@@ -21,18 +19,38 @@ void bar (afloat *pa, afloat *pb, afloat *pc)
return;
}
+/* Unaligned pointer read accesses, aligned write access.
+ The loop bound is unknown
+ No aliasing problems.
+ vect-52.c is similar to this one with one difference:
+ the alignment of the read accesses is unknown.
+ vect-56.c is similar to this one with one difference:
+ the loop bound is known.
+ vect-61.c is similar to this one with two differences:
+ aliasing is not a problem, and the write access has unknown alignment. */
int
-main1 (int n , afloat * __restrict__ pa, afloat * __restrict__ pb, afloat * __restrict__ pc)
+main1 (int n)
{
int i;
+ float a[N] __attribute__ ((__aligned__(16)));
+ float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
+ float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+ float *pa = a;
+ float *pb = b;
+ float *pc = c;
for (i = 0; i < n/2; i++)
{
pa[i] = pb[i+1] * pc[i+1];
}
- bar (pa,pb,pc);
+ /* check results: */
+ for (i = 0; i < N/2; i++)
+ {
+ if (pa[i] != (pb[i+1] * pc[i+1]))
+ abort ();
+ }
return 0;
}
@@ -41,13 +59,10 @@ int main (void)
{
int i;
int n=N;
- float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
check_vect ();
+ main1 (n);
- main1 (n,a,b,c);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-61.c b/gcc/testsuite/gcc.dg/vect/vect-61.c
index 5b0f5d95432..9f4e8e9882b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-61.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-61.c
@@ -6,9 +6,7 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
-void bar (afloat *pa, afloat *pb, afloat *pc)
+void bar (float *pa, float *pb, float *pc)
{
int i;
@@ -22,11 +20,23 @@ void bar (afloat *pa, afloat *pb, afloat *pc)
return;
}
+/* Unaligned pointer read accesses with known alignment,
+ and an unaligned write access with unknown alignment.
+ The loop bound is iunknown.
+ Can't prove that the pointers don't alias.
+ vect-57.c is similar to this one with one difference:
+ the loop bound is known.
+ vect-60.c is similar to this one with two differences:
+ aliasing is not a problem, and the write access is unaligned. */
int
-main1 (int n , afloat * pa, afloat * pb, afloat * pc)
+main1 (int n , float *pa)
{
int i;
+ float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
+ float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+ float *pb = b;
+ float *pc = c;
for (i = 0; i < n/2; i++)
{
@@ -43,12 +53,10 @@ int main (void)
int i;
int n=N;
float a[N] __attribute__ ((__aligned__(16)));
- float b[N] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
- float c[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
check_vect ();
+ main1 (n,a);
- main1 (n,a,b,c);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-95.c b/gcc/testsuite/gcc.dg/vect/vect-95.c
index 149a3505076..935f608e71e 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-95.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-95.c
@@ -5,8 +5,6 @@
#define N 256
-typedef float afloat __attribute__ ((__aligned__(16)));
-
void bar (float *pd, float *pa, float *pb, float *pc)
{
int i;
@@ -43,8 +41,8 @@ main1 (int n, float * __restrict__ pd, float * __restrict__ pa, float * __restri
int main (void)
{
int i;
- afloat a[N];
- afloat d[N+1];
+ float a[N] __attribute__ ((__aligned__(16)));
+ float d[N+1] __attribute__ ((__aligned__(16)));
float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
@@ -59,12 +57,12 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* For targets that support unaligned loads we version for the two unaligned stores and
- generate misaligned accesses for the loads. For targets that don't support unaligned
- loads we version for all four accesses. */
+/* For targets that support unaligned loads we version for the two unaligned
+ stores and generate misaligned accesses for the loads. For targets that
+ don't support unaligned loads we version for all four accesses. */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target vect_no_align } } }
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target vect_no_align } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 4 "vect" { target vect_no_align } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */