craig.topper added a comment. If the AND immediate is more than 16 bits, I don't think this transform is valid. Do we have a test for that? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154193/new/ https://reviews.llvm.org/D154193