https://github.com/nikic approved this pull request. LGTM. I believe you can also remove https://github.com/llvm/llvm-project/blob/ec42d547eba5c0ad0bddbecc8902d35383968e78/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp#L1229-L1236. https://github.com/llvm/llvm-project/pull/72535