Remove redundant instructions