aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/minmax-22.c
blob: 481c375f5f92dfc14d3cfba05a27a631de1eb74b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-phiopt2" } */

int f(int num)
{
  if (num < 3) __builtin_unreachable();
  return num != 3 ?  num : 4;
}

/* In phiopt2 with the range information, this should be turned into
   a MAX_EXPR.  */
/* { dg-final { scan-tree-dump-times "MAX_EXPR" 1 "phiopt2" } } */