summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/cmov6.c
blob: 535326e4c2a3c11aec303f6e677f5b0736bc17fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -march=k8" } */
/* { dg-final { scan-assembler "cmov\[^6\]" } } */

/* Verify that blocks are converted to conditional moves.  */
extern int bar (int, int);
int foo (int c, int d, int e)
{
  int a, b;

  if (c)
    {
      a = 10;
      b = d;
    }
  else
    {
      a = e;
      b = 20;
    }
  return bar (a, b);
}