summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-4.c
blob: da477867ef346bc2b6e3feedc8fb6ee41c4e7959 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-optimized" } */

/* Testcase extracted from PR15353.  */

extern void bar(void);

void foo (int x, int a)
{
  /* if ((x < a) || (x != a)) return; else bar (); */
  if (x < a)
    return;
  if (x != a)
    return;

  /* else */
  bar ();
}

/* { dg-final { scan-tree-dump "!=" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */