view gcc/testsuite/gcc.dg/tree-ssa/vrp60.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-ccp -fno-tree-dominator-opts -fdump-tree-vrp1" } */

int foo (int x, int b)
{
  int cst;
  if (b)
    cst = -__INT_MAX__ - 1;
  else
    cst = -__INT_MAX__;
  x = x | cst;
  if (x >= 0)
    return 12345;
  return x;
}

int bar (int x, int b)
{
  int cst;
  if (b)
    cst = __INT_MAX__;
  else
    cst = __INT_MAX__ - 1;
  x = x & cst;
  if (x < 0)
    return 12345;
  return x;
}

/* { dg-final { scan-tree-dump-not "12345" "vrp1" } } */