Add patterns for selecting TBM instructions from logical operations. Patch from Yunzhong Gao.