In PR27925:
https://llvm.org/bugs/show_bug.cgi?id=27925
...we proposed adding this fold to eliminate a bitcast. In D20774, there was some concern about changing the type of a bitwise op as well as creating bitcasts that might not be free for a target. However, if we're strictly eliminating an instruction (by limiting this to one-use ops), then we should be able to do this in InstCombine.
I purposely chose vector+scalar types in a couple of the tests to show the possibility of changing the logic op from a scalar to vector or vice-versa. But again, I think we're safe because we can assume that the source and destination types are DataLayout-legal because InstCombine shouldn't be creating strange types. Ie, I would typically only expect this pattern to emerge for vector-vector bitcasts like in the PR27925 test.