master: let-lvar-dest: ignore NIL lvars

stassats via Sbcl-commits <[email protected]>
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  0079393bff74d216d9fe463b2879f78ce9c0e20c (commit)
      from  3eb58efbbe070e67ad7968f36e8d9c59b2e81e1f (commit)

- Log -----------------------------------------------------------------
commit 0079393bff74d216d9fe463b2879f78ce9c0e20c
Author: Stas Boukarev <[email protected]>
Date:   Mon Apr 20 16:09:23 2026 +0300

    let-lvar-dest: ignore NIL lvars
    
    Fixes lp#2148799
---
 src/compiler/ir1util.lisp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/compiler/ir1util.lisp b/src/compiler/ir1util.lisp
index 72775f7a9..d87782449 100644
--- a/src/compiler/ir1util.lisp
+++ b/src/compiler/ir1util.lisp
@@ -271,8 +271,9 @@
     (pld lvar)))
 
 (defun let-lvar-dest (lvar &optional single-use)
-  (when (or (not single-use)
-            (atom (lvar-uses lvar)))
+  (when (and lvar
+             (or (not single-use)
+                 (atom (lvar-uses lvar))))
     (let* ((lvar (principal-lvar lvar))
            (dest (and (or (not single-use)
                           (atom (lvar-uses lvar)))

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.