aboutsummaryrefslogtreecommitdiff
path: root/spill.c
diff options
context:
space:
mode:
authorMichael Forney <[email protected]>2021-03-11 19:24:28 -0800
committerQuentin Carbonneaux <[email protected]>2021-03-18 12:43:49 +0100
commite0b94a3d6ade2f99ded481318e9e6d9f16953662 (patch)
tree2570c110b56de93f491b84e29438fd0434cf26ac /spill.c
parent097dc86c45cc2f20cf98ec0385dbb57aaba419ec (diff)
spill: use stronger assertion for registers in use at start of function
Diffstat (limited to 'spill.c')
-rw-r--r--spill.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/spill.c b/spill.c
index 1aab8e5..132e0e9 100644
--- a/spill.c
+++ b/spill.c
@@ -397,7 +397,6 @@ spill(Fn *fn)
bscopy(b->out, v);
/* 2. process the block instructions */
- r = v->t[0];
curi = &insb[NIns];
for (i=&b->ins[b->nins]; i!=b->ins;) {
i--;
@@ -469,7 +468,10 @@ spill(Fn *fn)
if (r)
sethint(v, r);
}
- assert(r == T.rglob || b == fn->start);
+ if (b == fn->start)
+ assert(v->t[0] == (T.rglob | fn->reg));
+ else
+ assert(v->t[0] == T.rglob);
for (p=b->phi; p; p=p->link) {
assert(rtype(p->to) == RTmp);