From: Richard Biener Date: Thu, 20 Jul 2017 10:03:34 +0000 (+0000) Subject: slp-43.c: Increase loop count to enable vectorization with V64QImode. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f971b2813d7ddbdba210a63290b790a175777679;p=gcc.git slp-43.c: Increase loop count to enable vectorization with V64QImode. 2017-07-20 Richard Biener * gcc.dg/vect/slp-43.c: Increase loop count to enable vectorization with V64QImode. * gcc.dg/vect/slp-45.c: Likewise. From-SVN: r250380 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0a677739c18..d222849a98f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-07-20 Richard Biener + + * gcc.dg/vect/slp-43.c: Increase loop count to enable vectorization + with V64QImode. + * gcc.dg/vect/slp-45.c: Likewise. + 2017-07-20 Naveen H.S * gcc.dg/tree-ssa/vrp116.c: New Test. diff --git a/gcc/testsuite/gcc.dg/vect/slp-43.c b/gcc/testsuite/gcc.dg/vect/slp-43.c index fea3aadb341..880a2961ae1 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-43.c +++ b/gcc/testsuite/gcc.dg/vect/slp-43.c @@ -4,13 +4,16 @@ #include #include "tree-vect.h" +/* AVX512BW has V64QImode, make char_1 vectorizable with that. */ +#define MAX_VEC_ELEMENTS 64 + #define FOO(T,N) \ void __attribute__((noinline,noclone)) \ foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \ { \ T *in = __builtin_assume_aligned (in_, __BIGGEST_ALIGNMENT__); \ T *out = __builtin_assume_aligned (out_, __BIGGEST_ALIGNMENT__); \ - for (int i = 0; i < 16; i++) \ + for (int i = 0; i < MAX_VEC_ELEMENTS; i++) \ { \ for (int j = 0; j < N; ++j) \ out[j] = in[j]; \ @@ -23,9 +26,9 @@ foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \ do { \ memset (out, 0, 4096); \ foo_ ## T ## _ ## N ((T *)in, (T *)out, 1); \ - if (memcmp (in, out, sizeof (T) * 16 * N) != 0) \ + if (memcmp (in, out, sizeof (T) * MAX_VEC_ELEMENTS * N) != 0) \ __builtin_abort (); \ - for (int i = sizeof (T) * 16 * N; i < 4096; ++i) \ + for (int i = sizeof (T) * MAX_VEC_ELEMENTS * N; i < 4096; ++i) \ if (out[i] != 0) \ __builtin_abort (); \ } while (0) diff --git a/gcc/testsuite/gcc.dg/vect/slp-45.c b/gcc/testsuite/gcc.dg/vect/slp-45.c index a8300a44670..20a9f815292 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-45.c +++ b/gcc/testsuite/gcc.dg/vect/slp-45.c @@ -4,13 +4,16 @@ #include #include "tree-vect.h" +/* AVX512BW has V64QImode, make char_1 vectorizable with that. */ +#define MAX_VEC_ELEMENTS 64 + #define FOO(T,N) \ void __attribute__((noinline,noclone)) \ foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \ { \ T *in = __builtin_assume_aligned (in_, __BIGGEST_ALIGNMENT__); \ T *out = __builtin_assume_aligned (out_, __BIGGEST_ALIGNMENT__); \ - for (int i = 0; i < 16; i++) \ + for (int i = 0; i < MAX_VEC_ELEMENTS; i++) \ { \ for (int j = 0; j < N; ++j) \ out[j] = in[j]; \ @@ -23,9 +26,9 @@ foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \ do { \ memset (out, 0, 4096); \ foo_ ## T ## _ ## N ((T *)in, (T *)out, 1); \ - if (memcmp (in, out, sizeof (T) * 16 * N) != 0) \ + if (memcmp (in, out, sizeof (T) * MAX_VEC_ELEMENTS * N) != 0) \ __builtin_abort (); \ - for (int i = sizeof (T) * 16 * N; i < 4096; ++i) \ + for (int i = sizeof (T) * MAX_VEC_ELEMENTS * N; i < 4096; ++i) \ if (out[i] != 0) \ __builtin_abort (); \ } while (0)