summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/reassoc-12.c
blob: 65e2931ad4a7d735939fe62530ef73a294987554 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* { dg-do compile } */ 
/* { dg-options "-O2 -fdump-tree-reassoc1-details" } */
int f(int a, int b)
{
  /* MAX_EXPR <a, a> should cause it to be equivalent to a.  */
  int c = a>=b?a:b;
  int d = c>=a?c:a;
  return d;
}
/* { dg-final { scan-tree-dump-times "Equivalence:" 1 "reassoc1"} } */
/* { dg-final { cleanup-tree-dump "reassoc1" } } */