gcc/testsuite/gcc.target/aarch64/cmp-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2" } */ |
| 3 | |
| 4 | int lt (int x, int y) |
| 5 | { |
| 6 | if ((x - y) < 0) |
| 7 | return 10; |
| 8 | |
| 9 | return 0; |
| 10 | } |
| 11 | |
| 12 | int ge (int x, int y) |
| 13 | { |
| 14 | if ((x - y) >= 0) |
| 15 | return 10; |
| 16 | |
| 17 | return 0; |
| 18 | } |
| 19 | |
| 20 | /* { dg-final { scan-assembler-times "csel\t" 2 } } */ |
| 21 | /* { dg-final { scan-assembler-not "sub\t" } } */ |