1 /* PR tree-optimization/96685 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-times "return 1;" 6 "optimized" } } */
5 
6 unsigned
f1(unsigned x,unsigned y)7 f1 (unsigned x, unsigned y)
8 {
9   unsigned a = ~(x - y);
10   unsigned b = ~x + y;
11   return a == b;
12 }
13 
14 unsigned
f2(unsigned x)15 f2 (unsigned x)
16 {
17   unsigned a = ~(x + -124U);
18   unsigned b = ~x + 124U;
19   return a == b;
20 }
21 
22 unsigned
f3(unsigned x)23 f3 (unsigned x)
24 {
25   unsigned a = ~(x + 124U);
26   unsigned b = ~x + -124U;
27   return a == b;
28 }
29 
30 int
f4(int x,int y)31 f4 (int x, int y)
32 {
33   int a = ~(x - y);
34   int b = ~x + y;
35   return a == b;
36 }
37 
38 int
f5(int x)39 f5 (int x)
40 {
41   int a = ~(x + -124);
42   int b = ~x + 124;
43   return a == b;
44 }
45 
46 int
f6(int x)47 f6 (int x)
48 {
49   int a = ~(x + 124);
50   int b = ~x + -124;
51   return a == b;
52 }
53