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

#include "avx-check.h"

#include "rotate-5.c"

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