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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Wait this part is wrong `which does basically `(a ^ 4) & (a ^ (~4))` -> `(4 ^
(~4)) & (a ^ a)` which is 0 as `a ^ a` is 0.`

Anyways a pattern like:
```
(simplify
 (bit_and (bit_xor @0 @1) (bit_xor @0 @2))
 (with { bool wascmp; }
  (if (bitwise_inverted_equal_p (@1, @2, &wascmp))
   { wascmp ? constant_boolean_node (false, type) : build_zero_cst (type); })))
```

Is needed for bool.

Reply via email to