More robust FILTER-LVAR through CASTs
authorPaul Khuong <pvk@pvk.ca>
Sun, 19 May 2013 14:14:35 +0000 (10:14 -0400)
committerPaul Khuong <pvk@pvk.ca>
Sun, 19 May 2013 15:49:29 +0000 (11:49 -0400)
 * 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
tests/compiler.pure.lisp

index 82bea22..478be97 100644 (file)
         ;; 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))
 
index d1c8656..6e1d150 100644 (file)
                      #\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)))))))