aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/arm/thumb2-mul-space-2.c
blob: b53df2fa12ae3e5b72b3ff4403a71d33b45ff7c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* In Thumb-2 mode, when optimizing for size, generate a "muls"
   instruction and use the resulting condition flags rather than a
   separate compare instruction.  */
/* { dg-options "-mthumb -Os" }  */
/* { dg-require-effective-target arm_thumb2_ok } */
/* { dg-final { scan-assembler "muls" } } */
/* { dg-final { scan-assembler-not "cmp" } } */

int x;

void f(int i, int j)
{
  if (i * j < 0)
    x = 1;
}