aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/short-it-ifcvt-1.c
blob: f3d29b7d2344d0d677ad0a14a5e579df66ca2621 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Test that ifcvt is not being too aggressive when -mrestrict-it.  */
/* { dg-do compile } */
/* { dg-options "-O2 -mrestrict-it" } */
/* { dg-require-effective-target arm_thumb2_ok } */

int
f1(int x, int y, int z)
{
  if (x > 100)
    {
      x++;
      z = -z;
    }
  else
    {
      x = -x;
      y = -y;
      z = 1;
    }
  return x + y + z;
}

/* { dg-final { scan-assembler "b(gt|le)" } } */