https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111543
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- /* (X & ~Y) & Y -> 0 */ (simplify (bit_and:c (bit_and @0 @1) @2) (with { bool wascmp; } (if (bitwise_inverted_equal_p (@0, @2, wascmp) || bitwise_inverted_equal_p (@1, @2, wascmp)) { wascmp ? constant_boolean_node (false, type) : build_zero_cst (type); }))) /* (X | ~Y) | Y -> -1 */ (simplify (bit_ior:c (bit_ior @0 @1) @2) (with { bool wascmp; } (if ((bitwise_inverted_equal_p (@0, @2, wascmp) || bitwise_inverted_equal_p (@1, @2, wascmp)) && (!wascmp || element_precision (type) == 1)) { build_all_ones_cst (TREE_TYPE (@0)); })))