From a2b107b61b1fa7d2ac7689b93ac3fcd124c842fe Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 17 Apr 2023 16:55:21 -0700 Subject: compiler: propagate t-reg rename into end insn. * stdlib/optimize.tl (basic-blocks rename): When we stop the renaming due to an end instruction and the src being a v-reg, we can still do the rename in that end instruction itself. If the v-reg becomes invalid, that doesn't happen until after the instruction. --- stdlib/optimize.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/optimize.tl b/stdlib/optimize.tl index f3e2a6c6..095350d3 100644 --- a/stdlib/optimize.tl +++ b/stdlib/optimize.tl @@ -385,7 +385,7 @@ (cond (close (add insn)) ((and vreg end) - (add insn) + (add (subst-preserve dst src bb li insn)) (pend insns) (set insns nil)) ((or (mequal dst li.def0 li.def1) -- cgit v1.2.3