adam-bzowski wrote: > It is incorrect. You should check that the shift amount is always smaller than `NewWidth`. Good point. Fixed that and added some LIT tests to check, https://github.com/llvm/llvm-project/pull/119577