This patch adds A & (A && B) -> A && B (similarly for or + logical or)
Also, this patch adds ~(select C, (icmp pred X, Y), const) -> select C, (icmp pred' X, Y), ~const.
Alive2 proof:
merge_and: https://alive2.llvm.org/ce/z/teMR97
merge_or: https://alive2.llvm.org/ce/z/b4yZUp
xor_and: https://alive2.llvm.org/ce/z/_-TXHi
xor_or: https://alive2.llvm.org/ce/z/2uYx_a
clang-format not found in user's PATH; not linting file.