From d7949c371a527ca4064bbe59b2768361dd7ab7e0 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 4 May 2023 20:44:01 -0700 Subject: compiler: bugfix: wrong condition in late-peephole. * stdlib/optimize.tl (basic-blocks late-peephole): The test whether lab2 is used is bogus, and will never be true. The correct test is simply whether the block has two or more rlinks. This makes no --- stdlib/optimize.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/optimize.tl b/stdlib/optimize.tl index bf82e5c1..9950d934 100644 --- a/stdlib/optimize.tl +++ b/stdlib/optimize.tl @@ -642,7 +642,7 @@ @lab1 . @rest) (let* ((bl [bb.hash lab2])) - (if (some bl.rlinks (op eq bb) .next) + (if (cdr bl.rlinks) insns ^((ifq ,reg (t 0) ,lab3) ,lab1 -- cgit v1.2.3