gcc/testsuite/gcc.target/cris/pr93372-18.c
raw| 1 | /* Check that eliminable compare-instructions are eliminated. */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2" } */ |
| 4 | /* { dg-final { scan-assembler-not "\tcmp|\ttest|\tor" } } */ |
| 5 | |
| 6 | #ifndef t |
| 7 | #define t long long |
| 8 | #endif |
| 9 | #ifndef t2 |
| 10 | #define t2 t |
| 11 | #endif |
| 12 | #ifndef op |
| 13 | #define op - |
| 14 | #endif |
| 15 | |
| 16 | extern void foo(t2); |
| 17 | |
| 18 | void g(t a, t b) |
| 19 | { |
| 20 | t2 c = a op b; |
| 21 | |
| 22 | if (c >= 0) |
| 23 | foo(c); |
| 24 | } |