https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78614
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 40205 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40205&action=edit gcc7-pr78614-2.patch Perhaps better patch (if it works). The previous patch would copy even rtxes that simplify_*rtx would copy again, while this one should hopefully just mark those non-shareable rtxes that are going to stay in PARALLEL as used and then at the end we would unshare only whatever remained shared at the end. It works on the provided testcase in the cross too.