Commit f971b281 by Richard Biener Committed by Richard Biener

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
parent c9930ecd
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> 2017-07-20 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
* gcc.dg/tree-ssa/vrp116.c: New Test. * gcc.dg/tree-ssa/vrp116.c: New Test.
......
...@@ -4,13 +4,16 @@ ...@@ -4,13 +4,16 @@
#include <string.h> #include <string.h>
#include "tree-vect.h" #include "tree-vect.h"
/* AVX512BW has V64QImode, make char_1 vectorizable with that. */
#define MAX_VEC_ELEMENTS 64
#define FOO(T,N) \ #define FOO(T,N) \
void __attribute__((noinline,noclone)) \ void __attribute__((noinline,noclone)) \
foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \ foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \
{ \ { \
T *in = __builtin_assume_aligned (in_, __BIGGEST_ALIGNMENT__); \ T *in = __builtin_assume_aligned (in_, __BIGGEST_ALIGNMENT__); \
T *out = __builtin_assume_aligned (out_, __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) \ for (int j = 0; j < N; ++j) \
out[j] = in[j]; \ out[j] = in[j]; \
...@@ -23,9 +26,9 @@ foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \ ...@@ -23,9 +26,9 @@ foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \
do { \ do { \
memset (out, 0, 4096); \ memset (out, 0, 4096); \
foo_ ## T ## _ ## N ((T *)in, (T *)out, 1); \ 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 (); \ __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) \ if (out[i] != 0) \
__builtin_abort (); \ __builtin_abort (); \
} while (0) } while (0)
......
...@@ -4,13 +4,16 @@ ...@@ -4,13 +4,16 @@
#include <string.h> #include <string.h>
#include "tree-vect.h" #include "tree-vect.h"
/* AVX512BW has V64QImode, make char_1 vectorizable with that. */
#define MAX_VEC_ELEMENTS 64
#define FOO(T,N) \ #define FOO(T,N) \
void __attribute__((noinline,noclone)) \ void __attribute__((noinline,noclone)) \
foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \ foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \
{ \ { \
T *in = __builtin_assume_aligned (in_, __BIGGEST_ALIGNMENT__); \ T *in = __builtin_assume_aligned (in_, __BIGGEST_ALIGNMENT__); \
T *out = __builtin_assume_aligned (out_, __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) \ for (int j = 0; j < N; ++j) \
out[j] = in[j]; \ out[j] = in[j]; \
...@@ -23,9 +26,9 @@ foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \ ...@@ -23,9 +26,9 @@ foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \
do { \ do { \
memset (out, 0, 4096); \ memset (out, 0, 4096); \
foo_ ## T ## _ ## N ((T *)in, (T *)out, 1); \ 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 (); \ __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) \ if (out[i] != 0) \
__builtin_abort (); \ __builtin_abort (); \
} while (0) } while (0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment