* Remove register allocations of coalesced registers if the alias

register is spilled.
This commit is contained in:
Yuriy Sydorov 2021-09-06 18:37:45 +03:00
parent d20f18634f
commit b96057adeb

View File

@ -2467,8 +2467,9 @@ unit rgobj;
begin begin
if (getregtype(reg)=regtype) then if (getregtype(reg)=regtype) then
begin begin
{A register allocation of a spilled register can be removed.} {A register allocation of the spilled register (and all coalesced registers)
supreg:=getsupreg(reg); must be removed.}
supreg:=get_alias(getsupreg(reg));
if supregset_in(regs_to_spill_set,supreg) then if supregset_in(regs_to_spill_set,supreg) then
begin begin
{ Remove loading of the register from its initial memory location { Remove loading of the register from its initial memory location