summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/pr42835.c
blob: 71c51ebe31c810da74c49eb3ad6b7a27f8526ea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile } */
/* { dg-options "-mthumb -Os" }  */
/* { dg-require-effective-target arm_thumb2_ok } */

int foo(int *p, int i)
{
  return( (i < 0 && *p == 1)
	  || (i > 0 && *p == 2) );
}

/* { dg-final { scan-assembler-times "movne\[\\t \]*r.,\[\\t \]*#" 1 } } */
/* { dg-final { scan-assembler-times "moveq\[\\t \]*r.,\[\\t \]*#" 1 } } */