2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / rotate-4a.c
blob3da440fb78c8a1d837f287e717bcbfdc2ac9da5d
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx } */
3 /* { dg-options "-O3 -mavx" } */
5 #include "avx-check.h"
7 #include "rotate-4.c"
9 static void
10 __attribute__((noinline))
11 avx_test (void)
13 int i;
14 for (i = 0; i < 1024; i++)
15 a[i] = i * 1073741789U;
16 foo (3);
17 for (i = 0; i < 1024; i++)
19 unsigned int x = i * 1073741789U;
20 if (a[i] != ((x << 3) | (x >> ((-3) & 31))))
21 abort ();
23 foo (0);
24 for (i = 0; i < 1024; i++)
26 unsigned int x = i * 1073741789U;
27 if (a[i] != ((x << 3) | (x >> ((-3) & 31))))
28 abort ();
30 foo (29);
31 for (i = 0; i < 1024; i++)
32 if (a[i] != i * 1073741789U)
33 abort ();