https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95923

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So there are some patterns for non boolean as for boolean values ~(a^b) is
converted to a==b so we need to support the == case for these:
```
/* (a | b) & ~(a ^ b)  -->  a & b  */
(simplify
 (bit_and:c (bit_ior @0 @1) (bit_not (bit_xor:c @0 @1)))
 (bit_and @0 @1))

/* a | ~(a ^ b)  -->  a | ~b  */
(simplify
 (bit_ior:c @0 (bit_not:s (bit_xor:c @0 @1)))
 (bit_ior @0 (bit_not @1)))

/* (a & b) | ~(a ^ b)  -->  ~(a ^ b)  */
(simplify
 (bit_ior:c (bit_and:c @0 @1) (bit_not@2 (bit_xor @0 @1)))
 @2)
```

So mine.

Reply via email to