Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line diff
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c Fri Oct 27 22:46:09 2017 +0900 +++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c Thu Oct 25 07:37:49 2018 +0900 @@ -5,7 +5,13 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 24 +#if VECTOR_BITS > 128 +#define NINTS (VECTOR_BITS / 32) +#else +#define NINTS 4 +#endif + +#define N (NINTS * 6) struct s{ int m; @@ -19,8 +25,7 @@ struct test1{ struct s a; /* array a.n is unaligned */ - int b; - int c; + int pad[NINTS - 2]; struct s e; /* array e.n is aligned */ }; @@ -54,13 +59,13 @@ } /* 2. aligned */ - for (i = 3; i < N-1; i++) + for (i = NINTS - 1; i < N - 1; i++) { tmp1[2].a.n[1][2][i] = 6; } /* check results: */ - for (i = 3; i < N-1; i++) + for (i = NINTS; i < N - 1; i++) { if (tmp1[2].a.n[1][2][i] != 6) abort (); @@ -86,18 +91,18 @@ } /* 4. unaligned (unknown misalignment) */ - for (i = 0; i < N-4; i++) + for (i = 0; i < N - NINTS; i++) { - for (j = 0; j < N-4; j++) + for (j = 0; j < N - NINTS; j++) { tmp2[2].e.n[1][i][j] = 8; } } /* check results: */ - for (i = 0; i < N-4; i++) + for (i = 0; i < N - NINTS; i++) { - for (j = 0; j < N-4; j++) + for (j = 0; j < N - NINTS; j++) { if (tmp2[2].e.n[1][i][j] != 8) abort (); @@ -114,5 +119,6 @@ return main1 (); } -/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */ -/* { 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 "vectorized 4 loops" 1 "vect" { target vect_hw_misalign } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target { ! vect_hw_misalign } } } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { { ! vector_alignment_reachable } && { ! vect_hw_misalign } } } } } */