From d9d7c988fc80bd12698ba7440979dea2d93d7a97 Mon Sep 17 00:00:00 2001 From: Paul Khuong Date: Mon, 26 Apr 2010 21:34:34 +0000 Subject: [PATCH] 1.0.37.64: Fixtransforms for float TRUNCATE * Detect ignored secondary values correctly * Handle being unused (no result LVAR) without dying at compile-time --- NEWS | 2 ++ src/compiler/float-tran.lisp | 9 ++++++--- version.lisp-expr | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 7c4b267..d1c8e99 100644 --- a/NEWS +++ b/NEWS @@ -67,6 +67,8 @@ changes relative to sbcl-1.0.37: denormals. * bug fix: We were too eager in eliding range reduction tests on x87. The maximal magnitude is 2^63, not 2^64. + * bug fix: Transforms for TRUNCATE don't die when the result is completely + ignored anymore. changes in sbcl-1.0.37 relative to sbcl-1.0.36: * enhancement: Backtrace from THROW to uncaught tag on x86oids now shows diff --git a/src/compiler/float-tran.lisp b/src/compiler/float-tran.lisp index 6efa676..882cc70 100644 --- a/src/compiler/float-tran.lisp +++ b/src/compiler/float-tran.lisp @@ -1522,16 +1522,19 @@ (,type &optional (or ,type ,@other-float-arg-types integer)) * :result result) - (let ((result-type (lvar-derived-type result))) + (let* ((result-type (and result + (lvar-derived-type result))) + (compute-all (and (values-type-p result-type) + (not (type-single-value-p result-type))))) (if (or (not y) (and (constant-lvar-p y) (= 1 (lvar-value y)))) - (if (values-type-p result-type) + (if compute-all `(let ((res (,',unary x))) (values res (- x (,',coerce res)))) `(let ((res (,',unary x))) ;; Dummy secondary value! (values res x))) - (if (values-type-p result-type) + (if compute-all `(let* ((f (,',coerce y)) (res (,',unary (/ x f)))) (values res (- x (* f (,',coerce res))))) diff --git a/version.lisp-expr b/version.lisp-expr index b5e1381..8ae5003 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".) -"1.0.37.63" +"1.0.37.64" -- 1.7.10.4