1 /* { dg-do run } */ 2 /* { dg-require-effective-target avx2 } */ 3 /* { dg-options "-O3 -mavx2" } */ 4 5 #include "avx2-check.h" 6 7 #include "rotate-3.c" 8 9 static void 10 __attribute__((noinline)) avx2_test(void)11avx2_test (void) 12 { 13 int i; 14 for (i = 0; i < 1024; i++) 15 a[i] = i * 1073741789U; 16 foo (); 17 for (i = 0; i < 1024; i++) 18 { 19 int j = i & 31; 20 unsigned int x = i * 1073741789U; 21 if (a[i] != ((x << j) | (x >> ((-j) & 31)))) 22 abort (); 23 } 24 } 25