| 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 } } */ |
| 6 |
|
| 7 |
#include "avx2-check.h" |
| 8 |
|
| 9 |
typedef char A __attribute__((vector_size (32))); |
| 10 |
typedef short B __attribute__((vector_size (32))); |
| 11 |
|
| 12 |
int |
| 13 |
foo (int x, __int128 y, __int128 z, A w) |
| 14 |
{ |
| 15 |
y <<= 64; |
| 16 |
w *= (A) { 0, -1, z, 0, ~y }; |
| 17 |
return w[0] + ((B) { x, 0, y, 0, -1 } | 1)[4]; |
| 18 |
} |
| 19 |
|
| 20 |
static void |
| 21 |
avx2_test () |
| 22 |
{ |
| 23 |
int x = foo (0, 0, 0, (A) {}); |
| 24 |
if (x != -1) |
| 25 |
__builtin_abort (); |
| 26 |
} |