view gcc/testsuite/gcc.dg/vrp-min-max-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-vrp2" } */
/* { dg-require-effective-target int32plus } */

int Foo (int X)
{
  if (X < 0)
    X = 0;
  if (X > 191)
    X = 191;

  return X << 23;
}

/* We expect this min/max pair to survive.  */

/* { dg-final { scan-tree-dump-times "MIN_EXPR" 1 "vrp2" } } */
/* { dg-final { scan-tree-dump-times "MAX_EXPR" 1 "vrp2" } } */