| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-require-effective-target avx } */ |
| 3 |
/* { dg-options "-O3 -mavx" } */ |
| 4 |
|
| 5 |
#include "avx-check.h" |
| 6 |
|
| 7 |
#include "rotate-4.c" |
| 8 |
|
| 9 |
static void |
| 10 |
__attribute__((noinline)) |
| 11 |
avx_test (void) |
| 12 |
{ |
| 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++) |
| 18 |
{ |
| 19 |
unsigned int x = i * 1073741789U; |
| 20 |
if (a[i] != ((x << 3) | (x >> ((-3) & 31)))) |
| 21 |
abort (); |
| 22 |
} |
| 23 |
foo (0); |
| 24 |
for (i = 0; i < 1024; i++) |
| 25 |
{ |
| 26 |
unsigned int x = i * 1073741789U; |
| 27 |
if (a[i] != ((x << 3) | (x >> ((-3) & 31)))) |
| 28 |
abort (); |
| 29 |
} |
| 30 |
foo (29); |
| 31 |
for (i = 0; i < 1024; i++) |
| 32 |
if (a[i] != i * 1073741789U) |
| 33 |
abort (); |
| 34 |
} |