(and/or (icmp eq/ne A,C0), (icmp eq/ne A,C1)) can be lowered to
(icmp eq/ne (and (sub A, (smin C0, C1)), (not (sub (smax C0, C1), (smin C0, C1)))), 0)
generically if (sub (smax C0, C1), (smin C0,C1)) is a power of 2.
This covers the existing case of (and/or (icmp eq/ne A, C_Pow2),(icmp eq/ne A, -C_Pow2))
as well as other cases.
Alive2 Links:
EQ: https://alive2.llvm.org/ce/z/mLJiUW
NE: https://alive2.llvm.org/ce/z/TKnzUr
Should the name be addand? Same for below.