Stop only if there aren't any usable algorithms
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / rotate-3.c
blob7f255732b5018203f1d67afc80cb5cd815a99cda
1 /* { dg-do compile } */
2 /* { dg-require-effective-target avx2 } */
3 /* { dg-options "-O3 -mavx2 -fdump-tree-vect-details" } */
4 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
5 /* { dg-final { cleanup-tree-dump "vect" } } */
7 unsigned int a[1024] __attribute__((aligned (32)));
9 __attribute__((noinline, noclone)) void
10 foo (void)
12 int i;
13 for (i = 0; i < 1024; i++)
15 int j = i & 31;
16 a[i] = (a[i] << j) | (a[i] >> ((-j) & 31));