When we see this:
%and = G_AND %x, %y %xor = G_XOR %and, %y
Produce this:
%not = G_XOR %x, -1 %new_and = G_AND %not, %y
as long as we are guaranteed to eliminate the original G_AND.
Also matches all commuted forms. E.g.
%and = G_AND %y, %x %xor = G_XOR %y, %and
will be matched as well.
This code is a bit big-brain for me this morning. Simplify this to return X == SharedReg || Y == SharedReg?