Fix assertion failure if temporary was spilled in all predecessors
Since ce0ab53ed7
, we skip over predecessors that spilled the
temporary. However, if all predecessors spilled, then we might not have
an entry in `rl`, triggering an assertion failure in the following loop.
This commit is contained in:
parent
dad4550dfb
commit
44fbc60237
1 changed files with 2 additions and 0 deletions
2
rega.c
2
rega.c
|
@ -591,6 +591,8 @@ rega(Fn *fn)
|
|||
continue;
|
||||
rl[r] = (!rl[r] || rl[r] == x) ? x : -1;
|
||||
}
|
||||
if (rl[r] == 0)
|
||||
rl[r] = -1;
|
||||
}
|
||||
|
||||
npm = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue