PR middle-end/85090
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512f-pr85090-1.c
blobf5c0feec319b7575a31082ed42e794eea284fb0c
1 /* PR middle-end/85090 */
2 /* { dg-do run { target int128 } } */
3 /* { dg-require-effective-target avx512f } */
4 /* { dg-options "-O2 -fno-tree-dominator-opts -mavx512f -fira-algorithm=priority" } */
6 #include "avx512f-check.h"
8 typedef unsigned short U __attribute__ ((vector_size (64)));
9 typedef unsigned int V __attribute__ ((vector_size (64)));
10 typedef unsigned __int128 W __attribute__ ((vector_size (64)));
12 V h;
13 W d, e, g;
14 U f;
16 static __attribute__((noipa)) U
17 foo (U i)
19 f >>= ((U)d > f) & 1;
20 i[0] <<= 1;
21 e = (7 & -d) << (7 & -(g & 7));
22 return i;
25 void
26 avx512f_test (void)
28 U x;
29 for (unsigned i = 0; i < 32; i++)
30 x[i] = i;
31 x = foo (x);
32 for (unsigned i = 0; i < 32; i++)
33 if (x[i] != i)
34 abort ();