nikic added a comment. It looks like this should be part of simplifySelectBitTest(), which covers other "select of icmp and" patterns. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148420/new/ https://reviews.llvm.org/D148420