diff options
| author | Michael Forney <[email protected]> | 2021-03-11 19:24:28 -0800 |
|---|---|---|
| committer | Quentin Carbonneaux <[email protected]> | 2021-03-18 12:43:49 +0100 |
| commit | e0b94a3d6ade2f99ded481318e9e6d9f16953662 (patch) | |
| tree | 2570c110b56de93f491b84e29438fd0434cf26ac /spill.c | |
| parent | 097dc86c45cc2f20cf98ec0385dbb57aaba419ec (diff) | |
spill: use stronger assertion for registers in use at start of function
Diffstat (limited to 'spill.c')
| -rw-r--r-- | spill.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |
