remove redundant instructions