Remove some redundant shift operations.