optimize some dead stores