| 1 |
/* PR target/107131 */ |
| 2 |
/* { dg-do run } */ |
| 3 |
/* { dg-options "-Os -fno-ipa-vrp -fno-tree-bit-ccp -Wno-psabi" } */ |
| 4 |
|
| 5 |
typedef unsigned char C; |
| 6 |
typedef unsigned long long __attribute__((__vector_size__ (32))) U; |
| 7 |
typedef unsigned long long __attribute__((__vector_size__ (64))) V; |
| 8 |
|
| 9 |
static __attribute__((__noclone__)) C |
| 10 |
foo (C o, U x, U y, U z) |
| 11 |
{ |
| 12 |
V a = __builtin_shufflevector (x, x, 3, 1, 3, 0, 0, 1, 1, 3); |
| 13 |
V b = (V) { } >= o; |
| 14 |
V c = b <= (V)(b >= (V) { 0, 0, 0, 0, 0, 0x90DF0BE3990AC871ULL }); |
| 15 |
U d = __builtin_shufflevector (y, z, 3, 1, 4, 5); |
| 16 |
V e = a + c; |
| 17 |
U f = ((union { V v; U u[2]; }) e).u[1] + d; |
| 18 |
return ((union { U u; C c[32]; }) f).c[9]; |
| 19 |
} |
| 20 |
|
| 21 |
int |
| 22 |
main () |
| 23 |
{ |
| 24 |
if (__SIZEOF_LONG_LONG__ != 8 || __CHAR_BIT__ != 8) |
| 25 |
return 0; |
| 26 |
C x = foo (0, (U) { }, (U) { }, (U) { }); |
| 27 |
if (x != 0xff) |
| 28 |
__builtin_abort(); |
| 29 |
return 0; |
| 30 |
} |