PR target/80969 - Fix ICE with -mabi=ms -mavx512f, reduce wasted space when realignin...
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr71077.c
blob0637bc990b88bf31020a181ccb4f507a1324264a
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx2 } */
3 /* { dg-options "-O3 -mavx2" } */
5 #include "avx2-check.h"
7 typedef unsigned int ui;
8 ui x[32*32];
9 ui y[32];
10 ui z[32];
11 void __attribute__ ((noinline, noclone)) foo (ui n, ui z)
13 ui i, b;
14 ui v;
15 for (i = 0; i< n; i++)
17 v = y[i];
18 if (v) {
19 for (b = 0; b < 32; b++)
20 if ((v >> b) & 1)
21 x[i*32 +b] = z;
22 y[i] = 0;
27 static void
28 avx2_test (void)
30 int i;
31 unsigned int val;
32 for (i = 0; i<32; i++)
34 val = 1U << i;
35 y[i] = (i & 1)? 0 : val;
36 z[i] = i;
38 foo (32, 10);
39 for (i=0; i<1024; i+=66)
40 if (x[i] != 10)
41 __builtin_abort ();