PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp102.c
blobfb62e570bede628f4422e6e1819c13b459859991
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1" } */
4 int f(int x, int y)
5 {
6 int ret;
7 if (x == y)
8 ret = x ^ y;
9 else
10 ret = 1;
12 return ret;
15 /* We should have computed x ^ y as zero and propagated the result into the
16 PHI feeding the result. */
18 /* { dg-final { scan-tree-dump "ret_\[0-9\]+ = PHI <\[01\]\\\(\[0-9\]+\\\), \[01\]\\\(\[0-9\]+\\\)>" "vrp1" } } */