| 1 |
/* Check that eliminable compare-instructions are eliminated. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-O2" } */ |
| 4 |
/* See pr93372-5.c regarding the xfails. */ |
| 5 |
/* { dg-final { scan-assembler-not "\tcmp|\ttest|\tor" { xfail *-*-* } } } */ |
| 6 |
/* { dg-final { scan-assembler-not "\tnot" { xfail cc0 } } } */ |
| 7 |
/* { dg-final { scan-assembler-not "\tlsr" { xfail cc0 } } } */ |
| 8 |
|
| 9 |
int f(long long int a, long long int b, int *d) |
| 10 |
{ |
| 11 |
long long int c = a + b; |
| 12 |
|
| 13 |
*d = (c == 0); |
| 14 |
|
| 15 |
return c >= 0; |
| 16 |
} |