There were many offline discussions about that issue that was found by our desktop testing so I want to open it here to summarize what we decided to do with that.
genPushCalleeSavedRegisters determinates registers that need to be saved in the prolog and expect no holes between them. However, we can't always guarantee that contract; holes can appear at least in stress mode testing.
genSaveCalleeSavedRegistersHelp uses no-holes contract to use save_pair and restore_pair optimization, so when it is not true it hits an assert.
The repro was added by dotnet/coreclr#21344.
There were many offline discussions about that issue that was found by our desktop testing so I want to open it here to summarize what we decided to do with that.
genPushCalleeSavedRegistersdeterminates registers that need to be saved in the prolog and expect no holes between them. However, we can't always guarantee that contract; holes can appear at least in stress mode testing.genSaveCalleeSavedRegistersHelpusesno-holescontract to usesave_pairandrestore_pairoptimization, so when it is not true it hits an assert.The repro was added by dotnet/coreclr#21344.