1.0.29.42: small fixoid for the EXPT optimization from 1.0.29.40
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 25 Jun 2009 15:00:34 +0000 (15:00 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 25 Jun 2009 15:00:34 +0000 (15:00 +0000)
* EQL -1, not 1 -- no easily observable difference, but this one gets
  the branchless version actually used.

src/compiler/srctran.lisp
version.lisp-expr

index 30ef11e..d2f472c 100644 (file)
 (deftransform expt ((x y) ((constant-arg (member -1 -1.0 -1.0d0)) integer) *)
   "recode as an ODDP check"
   (let ((val (lvar-value x)))
 (deftransform expt ((x y) ((constant-arg (member -1 -1.0 -1.0d0)) integer) *)
   "recode as an ODDP check"
   (let ((val (lvar-value x)))
-    (if (eql 1 val)
+    (if (eql -1 val)
         '(- 1 (* 2 (logand 1 y)))
         `(if (oddp y)
              ,val
         '(- 1 (* 2 (logand 1 y)))
         `(if (oddp y)
              ,val
index 5355a14..1f82c99 100644 (file)
@@ -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".)
 ;;; 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.29.41"
+"1.0.29.42"