summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/subs_compare_2.c
blob: 60c6d9e5ccd8fce42c388c831a8060dead128491 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O2" } */

int
foo (int a, int b)
{
  int x = a - 4;
  if (a < 4)
    return x;
  else
    return 0;
}

/* { dg-final { scan-assembler-times "subs\\tw\[0-9\]+, w\[0-9\]+, #4" 1 } } */
/* { dg-final { scan-assembler-not "cmp\\tw\[0-9\]+, w\[0-9\]+" } } */