aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-11-26 19:44:24 +0100
committerlemon <lsof@mailbox.org>2025-11-26 19:44:24 +0100
commitcba84f37bc9b1d939c04ed31beec5b803ee4da5a (patch)
treef1caea4ea95bea84719b506e688db33e7590395d /ir
parent375e9f050de6b09c00eecafd63bd9b967fbeb335 (diff)
regalloc: skip dead phis
Diffstat (limited to 'ir')
-rw-r--r--ir/regalloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ir/regalloc.c b/ir/regalloc.c
index e060ebf..6706905 100644
--- a/ir/regalloc.c
+++ b/ir/regalloc.c
@@ -376,7 +376,10 @@ lowerphis(struct rega *ra, struct block *blk, struct block *suc)
DBG(" phi had R%d\n", to.a);
} else {
to = ra->intervals.temps[phi - instrtab].alloc;
- assert(to.t != ADEAD);
+ if (to.t == ADEAD) {
+ DBG(" skip dead phi\n");
+ continue;
+ }
DBG(" found phi %c%d\n", " RS"[to.t], to.a);
if (to.t == AREG)
phi->reg = to.a+1;