https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:da85bfc75024a92b97e60e4436863dd5789786ec commit r13-4743-gda85bfc75024a92b97e60e4436863dd5789786ec Author: Richard Biener <rguent...@suse.de> Date: Fri Dec 16 13:01:40 2022 +0100 middle-end/108086 - avoid unshare_expr when remapping SSA names r0-89280-g129a37fc319db8 added unsharing to remap_ssa_name but that wasn't in the version of the patch posted. That has some non-trivial cost through mostly_copy_tree_r and copy_tree_r but more importantly it doesn't seem to be necessary. I've successfully bootstrapped and tested with an assert we only get tree_node_can_be_shared trees here. Bootstrapped and tested on x86_64-unknown-linux-gnu with all languages. PR middle-end/108086 * tree-inline.cc (remap_ssa_name): Do not unshare the result from the decl_map.