https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69155
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 37335 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37335&action=edit gcc6-pr69155-wip.patch Partial patch I've bootstrapped/regtested on x86_64-linux and i686-linux. Either our testsuite coverage is insufficient, or it might be safe to only deal with PHI arguments and nothing else if we walk in rpo order. In that case, as the renamer is not prepared to handle PHIs with non-is_gimple_val arguments and renaming them, it might be much easier to just not use the renamer and simply record the PHIs we still need to update, push the underlying VAR_DECLs (or extra temporaries for anon SSA_NAMEs) to the PHI arguments first and get back to them at the end (or immediately once the SSA_NAME is defined?).