From 587c903b0601dfd6763b5acc05778f793172c915 Mon Sep 17 00:00:00 2001 From: Paul Khuong Date: Sun, 19 May 2013 10:14:35 -0400 Subject: [PATCH] More robust FILTER-LVAR through CASTs * IR1-conversion can insert casts between a combination and its arguments. Handle that case via principal-lvar{-use}. * Fixes a regression in b111015 (lp#1181684). --- src/compiler/ir1util.lisp | 2 +- tests/compiler.pure.lisp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/compiler/ir1util.lisp b/src/compiler/ir1util.lisp index 82bea22..478be97 100644 --- a/src/compiler/ir1util.lisp +++ b/src/compiler/ir1util.lisp @@ -362,7 +362,7 @@ ;; this node. (let* ((node (lvar-use filtered-lvar)) (args (basic-combination-args node)) - (victim (first args))) + (victim (principal-lvar (first args)))) (aver (eq (constant-value (ref-leaf (lvar-use victim))) 'dummy)) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index d1c8656..6e1d150 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -4459,3 +4459,9 @@ #\1 :y 2)) (let ((p2 #'(lambda (char) (upper-case-p char)))) (funcall p2 s))))) + +(with-test (:name :bug-1181684) + (compile nil `(lambda () + (let ((hash #xD13CCD13)) + (setf hash (logand most-positive-word + (ash hash 5))))))) -- 1.7.10.4