If one side simplifies to the identity value for inner opcode, we can replace the value with just the operation that can't be simplified.
I've removed a couple now unneeded special cases in visitAnd and visitOr. There are probably other cases I missed.
@spatel I believe this fixes your hidden not test cases with compares. If you send over your test cases I can add them to this patch.