gcc/testsuite/gcc.target/i386/pr101617.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2" } */ |
| 3 | int f(int i) |
| 4 | { |
| 5 | int t = i ? -1 : 0; |
| 6 | return t | 1; |
| 7 | } |
| 8 | |
| 9 | int f1(int i) |
| 10 | { |
| 11 | int t = i ? -1 : 1; |
| 12 | return t; |
| 13 | } |
| 14 | |
| 15 | /* { dg-final { scan-assembler-times "negl" 2 } } */ |
| 16 | /* { dg-final { scan-assembler-times "sbbl" 2 } } */ |
| 17 | /* { dg-final { scan-assembler-times "orl" 2 } } */ |
| 18 | /* { dg-final { scan-assembler-not "cmpl" } } */ |
| 19 |