aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-07-20 10:03:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-07-20 10:03:34 +0000
commitf971b2813d7ddbdba210a63290b790a175777679 (patch)
tree0bf6d3083645ed75cf0e5bfbdbf0a056dc6bbe62 /gcc
parentc9930ecd9c089bc2c9e82136280c9d2f494242bc (diff)
downloadgcc-f971b2813d7ddbdba210a63290b790a175777679.zip
gcc-f971b2813d7ddbdba210a63290b790a175777679.tar.gz
gcc-f971b2813d7ddbdba210a63290b790a175777679.tar.bz2
slp-43.c: Increase loop count to enable vectorization with V64QImode.
2017-07-20 Richard Biener <rguenther@suse.de> * gcc.dg/vect/slp-43.c: Increase loop count to enable vectorization with V64QImode. * gcc.dg/vect/slp-45.c: Likewise. From-SVN: r250380
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-43.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-45.c9
3 files changed, 18 insertions, 6 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0a67773..d222849 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2017-07-20 Richard Biener <rguenther@suse.de>
+
+ * 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 <Naveen.Hurugalawadi@cavium.com>
* 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 fea3aad..880a296 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-43.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-43.c
@@ -4,13 +4,16 @@
#include <string.h>
#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 a8300a4..20a9f81 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-45.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-45.c
@@ -4,13 +4,16 @@
#include <string.h>
#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)