| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-require-effective-target int32plus } */ |
| 3 |
/* { dg-options "-O2 -fdump-tree-fre1" } */ |
| 4 |
|
| 5 |
long long int a = -465274079317386463LL; |
| 6 |
int b = 856872806; |
| 7 |
int c = -1940894202; |
| 8 |
int d = 1718449211; |
| 9 |
int e = -392681565; |
| 10 |
unsigned long long int f = 13521452247506316486ULL; |
| 11 |
int g = -13194608; |
| 12 |
|
| 13 |
__attribute__((noinline, noclone)) |
| 14 |
void foo () |
| 15 |
{ |
| 16 |
if (!a - a) |
| 17 |
c = b = 0; |
| 18 |
else |
| 19 |
d = 3UL * a == 0; |
| 20 |
if (g / a) |
| 21 |
e = 0 < -a + 500849970701012771LL + (unsigned long) -a; |
| 22 |
else |
| 23 |
f = 4081116982543369LL & a; |
| 24 |
} |
| 25 |
|
| 26 |
int |
| 27 |
main () |
| 28 |
{ |
| 29 |
asm volatile ("" : : : "memory"); |
| 30 |
foo (); |
| 31 |
if (f != 2818598057803777LL) |
| 32 |
__builtin_abort (); |
| 33 |
return 0; |
| 34 |
} |
| 35 |
|
| 36 |
/* Should CSE all loads of a. */ |
| 37 |
/* { dg-final { scan-tree-dump-times " = a;" 1 "fre1" } } */ |