https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93272
--- Comment #5 from Andreas Krebbel <krebbel at gcc dot gnu.org> --- (In reply to Vladimir Makarov from comment #4) > (In reply to Andreas Krebbel from comment #3) > > Created attachment 47714 [details] > > IRA EH fix - only when added at start of BB > > > > A probably better version of the fix. This version only reverts the > > allocation decision if the move is about to be added at the start of an EH > > basic block. > > Andreas, thank you for explaining the problem. Your patch should solve the > problem but my worry is that the final assignment can be worse (especially > if the pseudo in a loop goes into an EH bb). > > I think that such pseudo should have the right conflicting hard regnos > **before** the assignment. In this case the pseudo did not get a hard > register living into EH but still can get another hard register. > If you don't mind, I will take it from here and try to create such patch. > If you want to continue this work by yourself, please let me know. Please do. Thanks!