aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/sparc/setcc-9.c
blob: 201e7e452871ad8c62acf3389bc20b8ddbd3f275 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
/* { dg-options "-O1 -msubxc" } */

long foo2 (long a, long i)
{
  return a - (i != 0);
}

long foo4 (long a, long b, long i)
{
  return a - b - (i != 0);
}

/* { dg-final { scan-assembler-times "subxc\t%" 2 } } */
/* { dg-final { scan-assembler-times "cmp\t%" 2 } } */
/* { dg-final { scan-assembler-not "sub\t%" } } */