diff options
| author | 2023-07-07 09:08:38 +0200 | |
|---|---|---|
| committer | 2023-07-07 09:08:38 +0200 | |
| commit | 40f1c14f7594f6e979316ad8f6bfff51341ad33d (patch) | |
| tree | ce56eef826eb3fc8d13030ebf145544d930d9277 | |
| parent | cc426d72bf14199050a8eb6f357b2d98d67e321f (diff) | |
regalloc: update preds during simplify pass
| -rw-r--r-- | regalloc.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -762,7 +762,13 @@ regalloc(struct function *fn) if (p->s1 == blk) p->s1 = next; else if (p->s2 == blk) p->s2 = next; else continue; - goto DelBlk; + for (int i = 0; i < next->npred; ++i) { + if (blkpred(next, i) == blk) { + blkpred(next, i) = p; + goto DelBlk; + } + } + assert(0); } } } while ((blk = blk->lnext) != fn->entry); |