1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-O3 -fno-version-loops-for-strides" } */
7 /* AVX512BW has V64QImode, make char_1 vectorizable with that. */
8 #define MAX_VEC_ELEMENTS 64
11 void __attribute__((noinline,noclone)) \
12 foo_ ## T ## _ ## N (T * __restrict__ in_, T * __restrict__ out_, int s) \
14 T *in = __builtin_assume_aligned (in_, __BIGGEST_ALIGNMENT__); \
15 T *out = __builtin_assume_aligned (out_, __BIGGEST_ALIGNMENT__); \
16 for (int i = 0; i < MAX_VEC_ELEMENTS; i++) \
18 for (int j = 0; j < N; ++j) \
26 _Pragma("GCC novector") \
28 memset (out, 0, 4096); \
29 foo_ ## T ## _ ## N ((T *)in, (T *)out, 1); \
30 if (memcmp (in, out, sizeof (T) * MAX_VEC_ELEMENTS * N) != 0) \
32 _Pragma("GCC novector") \
33 for (int i = sizeof (T) * MAX_VEC_ELEMENTS * N; i < 4096; ++i) \
52 char in
[4096] __attribute__((aligned(__BIGGEST_ALIGNMENT__
)));
53 char out
[4096] __attribute__((aligned(__BIGGEST_ALIGNMENT__
)));
59 for (int i
= 0; i
< 4096; ++i
)
62 __asm__
volatile ("" : : : "memory");
82 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 13 "vect" { target vect_hw_misalign } } } */