From: Nikodemus S. <de...@us...> - 2009-06-21 18:19:30
|
Update of /cvsroot/sbcl/sbcl/src/compiler In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21954/src/compiler Modified Files: float-tran.lisp Log Message: 1.0.29.28: optimize (EXPT -1 INTEGER) * Patch by Stas Boukarev. Index: float-tran.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/compiler/float-tran.lisp,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- float-tran.lisp 17 Dec 2008 20:36:18 -0000 1.43 +++ float-tran.lisp 21 Jun 2009 18:19:26 -0000 1.44 @@ -512,6 +512,8 @@ 'single-float)) (deftransform expt ((x y) ((double-float 0d0) (signed-byte 32)) *) `(%pow x (coerce y 'double-float))) +(deftransform expt ((x y) ((integer -1 -1) integer) *) + `(if (evenp y) 1 -1)) ;;; ANSI says log with base zero returns zero. (deftransform log ((x y) (float float) float) |