1  /* PR tree-optimization/49039 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O2 -fdump-tree-evrp" } */
       4  
       5  extern void bar (void);
       6  
       7  void
       8  foo (unsigned int x, unsigned int y)
       9  {
      10    unsigned int minv, maxv;
      11    if (x >= 3 && x <= 6)
      12      return;
      13    if (y >= 5 && y <= 8)
      14      return;
      15    minv = x < y ? x : y;
      16    maxv = x > y ? x : y;
      17    if (minv == 5)
      18      bar ();
      19    if (minv == 6)
      20      bar ();
      21    if (maxv == 5)
      22      bar ();
      23    if (maxv == 6)
      24      bar ();
      25  }
      26  
      27  /* { dg-final { scan-tree-dump-times "Folding predicate minv_.* == 5 to 0" 1 "evrp" } } */
      28  /* { dg-final { scan-tree-dump-times "Folding predicate minv_.* == 6 to 0" 1 "evrp" } } */
      29  /* { dg-final { scan-tree-dump-times "Folding predicate maxv_.* == 5 to 0" 1 "evrp" } } */
      30  /* { dg-final { scan-tree-dump-times "Folding predicate maxv_.* == 6 to 0" 1 "evrp" } } */