1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -fno-tree-ccp -fno-tree-dominator-opts -fdump-tree-vrp1" } */ 3 foo(int x,int b)4int foo (int x, int b) 5 { 6 int cst; 7 if (b) 8 cst = -__INT_MAX__ - 1; 9 else 10 cst = -__INT_MAX__; 11 x = x | cst; 12 if (x >= 0) 13 return 12345; 14 return x; 15 } 16 bar(int x,int b)17int bar (int x, int b) 18 { 19 int cst; 20 if (b) 21 cst = __INT_MAX__; 22 else 23 cst = __INT_MAX__ - 1; 24 x = x & cst; 25 if (x < 0) 26 return 12345; 27 return x; 28 } 29 30 /* { dg-final { scan-tree-dump-not "12345" "vrp1" } } */ 31