This is a follow-on suggested in D112634. Two folds that were added with that patch are subsumed in the call to decomposeBitTestICmp, and two other folds are potentially inverted. The deleted folds were very specialized by instcombine standards because they were restricted to legal integer types based on the data layout. This generalizes the canonical form independent of target/types.
This change has a reasonable chance of exposing regressions either in IR or codegen, but I don't have any evidence for either of those yet. A spot check of asm across several in-tree targets shows variations that I expect are mostly neutral.
We have one improvement in an existing IR test that I noted with a comment. Using mask ops might also make more code match with D114272.