So I want to determine the following:
and(..., x, not(x)) -> and(..., 0)
So in this case, given two constants, see if
not(x) exist, and if they do, drop them and add a zero in the rewrite.
A simple manner of approaching this is getting their constant values
value2 and see if
value1 & value2 == 0. However, this does require comparing all constants. So my question: Is there a better way to do this? Are there any guarantees about
not(x) being next each other or something else that I’m missing?
Documentation and examples very welcome. Thanks!