PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-xor-3.c
blobc2c0af66ad3fee7c31057ab8f892fbfb310e648f
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-cddce1" } */
4 int
5 fn1 (signed int x, signed int y)
7 signed int tem1 = x & y;
8 signed int tem2 = x | y;
9 return tem1 ^ tem2;
12 unsigned int
13 fn2 (unsigned int x, unsigned int y)
15 unsigned int tem1 = x & y;
16 unsigned int tem2 = x | y;
17 return tem1 ^ tem2;
20 int
21 fn3 (signed int x, signed int y)
23 signed int tem1 = x & y;
24 signed int tem2 = x | y;
25 return tem2 ^ tem1;
28 unsigned int
29 fn4 (unsigned int x, unsigned int y)
31 unsigned int tem1 = x & y;
32 unsigned int tem2 = x | y;
33 return tem2 ^ tem1;
36 /* { dg-final { scan-tree-dump-not " & " "cddce1" } } */
37 /* { dg-final { scan-tree-dump-not " \\| " "cddce1" } } */