| 1 |
/* PR middle-end/87138 */ |
| 2 |
/* { dg-do run { target int128 } } */ |
| 3 |
/* { dg-options "-O -fno-tree-fre -mavx512bw -mtune=k8" } */ |
| 4 |
/* { dg-require-effective-target avx512bw } */ |
| 5 |
|
| 6 |
#include "avx512bw-check.h" |
| 7 |
|
| 8 |
typedef int U __attribute__ ((vector_size (64))); |
| 9 |
typedef __int128 V __attribute__ ((vector_size (64))); |
| 10 |
V g, i; |
| 11 |
|
| 12 |
static inline void |
| 13 |
foo (unsigned h, V j, U k, V n) |
| 14 |
{ |
| 15 |
k /= h; |
| 16 |
__builtin_memmove (&h, &n, 1); |
| 17 |
n[j[1]] *= 0x7FFFFFFFFFFFFFFF; |
| 18 |
j[k[5]] = 0; |
| 19 |
g = n; |
| 20 |
i = h + j + n; |
| 21 |
} |
| 22 |
|
| 23 |
void |
| 24 |
avx512bw_test () |
| 25 |
{ |
| 26 |
foo (~0, (V) { }, (U) { 5 }, (V) { 3 }); |
| 27 |
if (g[0] != (__int128) 3 * 0x7FFFFFFFFFFFFFFF) |
| 28 |
abort (); |
| 29 |
} |