gcc/testsuite/gcc.target/arm/thumb2-mul-space-3.c
raw| 1 | /* In Thumb-2 mode, when optimizing for size, generate a "muls" |
| 2 | instruction and use the resulting condition flags rather than a |
| 3 | separate compare instruction. */ |
| 4 | /* { dg-options "-mthumb -Os" } */ |
| 5 | /* { dg-require-effective-target arm_thumb2_ok } */ |
| 6 | /* { dg-final { scan-assembler "muls" } } */ |
| 7 | /* { dg-final { scan-assembler-not "cmp" } } */ |
| 8 | |
| 9 | int x; |
| 10 | |
| 11 | int f(int i, int j) |
| 12 | { |
| 13 | i = i * j; |
| 14 | if (i < 0) |
| 15 | x = 1; |
| 16 | return i; |
| 17 | } |