From: Alexey Dejneka Date: Thu, 11 Sep 2003 10:31:56 +0000 (+0000) Subject: 0.8.3.50: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=b7cce43431d34a7ef27940fa1e47553d91e4a542;p=sbcl.git 0.8.3.50: * Fix compiler failures reported by Paul Dietz: be more accurate with BLOCK-LAST treating in CONSTANT-FOLD-CALL and DO-NODES. --- diff --git a/src/compiler/ir1opt.lisp b/src/compiler/ir1opt.lisp index f7e4318..2bf6ecf 100644 --- a/src/compiler/ir1opt.lisp +++ b/src/compiler/ir1opt.lisp @@ -1182,6 +1182,9 @@ (add-continuation-use call prev) (reference-constant prev cont (first values)) (setf (continuation-next cont) next) + (let ((block (node-block call))) + (when (eq (block-last block) call) + (setf (block-last block) (continuation-next prev)))) ;; FIXME: type checking? (reoptimize-continuation cont) (reoptimize-continuation prev) diff --git a/src/compiler/macros.lisp b/src/compiler/macros.lisp index dd15d8c..1f94cc5 100644 --- a/src/compiler/macros.lisp +++ b/src/compiler/macros.lisp @@ -624,6 +624,7 @@ ,@body (when ,(if restart-p `(or (eq ,node-var (block-last ,n-block)) + (eq ,cont-var (node-cont (block-last ,n-block))) (block-delete-p ,n-block)) `(eq ,cont-var ,n-last-cont)) (return nil)))))) diff --git a/tests/compiler.impure-cload.lisp b/tests/compiler.impure-cload.lisp index b012b17..09c0fb5 100644 --- a/tests/compiler.impure-cload.lisp +++ b/tests/compiler.impure-cload.lisp @@ -161,5 +161,26 @@ (declare (type (double-float -0d0) x)) (declare (optimize speed)) (+ x (sqrt (log (random 1d0))))) + +;;; compiler failures reported by Paul Dietz: inaccurate dealing with +;;; BLOCK-LAST in CONSTANT-FOLD-CALL and DO-NODES +(defun #:foo (a b c d) + (declare (type (integer -1 1000655) b) + (optimize (speed 3) (safety 1) (debug 1))) + (- (logior + (abs (- (+ b (logandc1 -473949 (max 5165 (abs (logandc1 a 250775))))))) + (logcount (logeqv (max (logxor (abs c) -1) 0) -4))) + d)) + +(defun #:foo (a d) + (declare (type (integer -8507 26755) a) + (type (integer -393314538 2084485) d) + (optimize (speed 3) (safety 1) (debug 1))) + (gcd + (if (= 0 a) 10 (abs -1)) + (logxor -1 + (min -7580 + (max (logand a 31365125) d))))) + (sb-ext:quit :unix-status 104) diff --git a/version.lisp-expr b/version.lisp-expr index 3d3da69..60fbb52 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.3.49" +"0.8.3.50"