https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63823
--- Comment #9 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- The patch was committed as a part of latest rematerialization patches. So the trunk has a fix for this. It would be nice to confirm the fix on the trunk and close the PR in the case of confirmation.