Move constant merging pass earlier