From c9f04db881e8ec0bb0beeba6274a5755c46cb534 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Tue, 14 Jun 2022 09:04:27 +0200 Subject: [PATCH] refine assertion in liveness analysis We were redundantly checking cardinality in a way that prevented fp regs from ever being globally live. We now check that the live regs after a return are exactly the globally live ones. --- live.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/live.c b/live.c index a1b4219..68f48b0 100644 --- a/live.c +++ b/live.c @@ -74,8 +74,7 @@ Again: nlv[KBASE(f->tmp[t].cls)]++; if (rtype(b->jmp.arg) == RCall) { assert((int)bscount(b->in) == T.nrglob && - nlv[0] == T.nrglob && - nlv[1] == 0); + b->in->t[0] == T.rglob); b->in->t[0] |= T.retregs(b->jmp.arg, nlv); } else bset(b->jmp.arg, b, nlv, f->tmp);