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

--- Comment #8 from Ivan Sorokin <vanyacpp at gmail dot com> ---
>     How often these show up, I have no idea.

Perhaps I should have written this in the original message.

The original expression "(x | c) & ~(y | c)" is obviously a reduced version of
what happens in real code. The idea is the following: When we are working with
bitsets "|" can be read as adding bits and "&~" as removing. Therefore the
expression can be read as first adding "c" to "x" and then removing "y | c"
from the result.

So the simplification

(x | c) & ~(y | c) -> x & ~(y | c)

means there is no need to add "c" if later we remove something containing "c".

Reply via email to