1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-O3" } */
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) \
27 memset (out, 0, 4096); \
28 foo_ ## T ## _ ## N ((T *)in, (T *)out, 1); \
29 if (memcmp (in, out, sizeof (T) * MAX_VEC_ELEMENTS * N) != 0) \
31 for (int i = sizeof (T) * MAX_VEC_ELEMENTS * N; i < 4096; ++i) \
50 char in
[4096] __attribute__((aligned(__BIGGEST_ALIGNMENT__
)));
51 char out
[4096] __attribute__((aligned(__BIGGEST_ALIGNMENT__
)));
57 for (int i
= 0; i
< 4096; ++i
)
60 __asm__
volatile ("" : : : "memory");
80 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 13 "vect" { target vect_hw_misalign } } } */
81 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target { ! vect_hw_misalign } } } } */