PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx2-pr70574.c
blobc9867ddf9b07d4aa585ec8c795cdbfdb18c6e689
1 /* PR rtl-optimization/70574 */
2 /* { dg-do run { target lp64 } } */
3 /* { dg-require-effective-target avx2 } */
4 /* { dg-options "-O -frerun-cse-after-loop -fno-tree-ccp -mcmodel=medium -mavx2" } */
5 /* { dg-additional-options "-fPIC" { target fpic } } */
7 #include "avx2-check.h"
9 typedef char A __attribute__((vector_size (32)));
10 typedef short B __attribute__((vector_size (32)));
12 int
13 foo (int x, __int128 y, __int128 z, A w)
15 y <<= 64;
16 w *= (A) { 0, -1, z, 0, ~y };
17 return w[0] + ((B) { x, 0, y, 0, -1 } | 1)[4];
20 static void
21 avx2_test ()
23 int x = foo (0, 0, 0, (A) {});
24 if (x != -1)
25 __builtin_abort ();