summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/rotate-3.c
blob: 0aba75ef37f92117a0d408b94a857264a88b16df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-O3 -mavx2 -fdump-tree-vect-details" } */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */

unsigned int a[1024] __attribute__((aligned (32)));

__attribute__((noinline, noclone)) void
foo (void)
{
  int i;
  for (i = 0; i < 1024; i++)
    {
      int j = i & 31;
      a[i] = (a[i] << j) | (a[i] >> ((-j) & 31));
    }
}