gcc/testsuite/gcc.target/i386/pr105338.c
raw| 1 | /* PR target/105338 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2 -fno-ipa-icf -masm=att" } */ |
| 4 | /* { dg-final { scan-assembler-times "\tnegl\t" 3 } } */ |
| 5 | /* { dg-final { scan-assembler-times "\tsbbl\t" 3 } } */ |
| 6 | /* { dg-final { scan-assembler-times "\tandl\t" 3 } } */ |
| 7 | |
| 8 | int |
| 9 | foo (int i) |
| 10 | { |
| 11 | return i ? 5 : 0; |
| 12 | } |
| 13 | |
| 14 | int |
| 15 | bar (int b) |
| 16 | { |
| 17 | return !!b * 5; |
| 18 | } |
| 19 | |
| 20 | int |
| 21 | baz (int b) |
| 22 | { |
| 23 | if (!b) |
| 24 | return 0; |
| 25 | return 5; |
| 26 | } |