aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/rotate-3a.c
blob: 0685efbd0a5c15888156b1d33971c13faf9ac7f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do run } */
/* { dg-require-effective-target avx2 } */
/* { dg-options "-O3 -mavx2" } */

#include "avx2-check.h"

#include "rotate-3.c"

static void
__attribute__((noinline))
avx2_test (void)
{
  int i;
  for (i = 0; i < 1024; i++)
    a[i] = i * 1073741789U;
  foo ();
  for (i = 0; i < 1024; i++)
    {
      int j = i & 31;
      unsigned int x = i * 1073741789U;
      if (a[i] != ((x << j) | (x >> ((-j) & 31))))
	abort ();
    }
}