From: Paul K. <pk...@us...> - 2009-07-18 17:44:50
|
Update of /cvsroot/sbcl/sbcl/tests In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21904/tests Modified Files: float.pure.lisp Log Message: 1.0.30.2: more aggressive constant-folding * Allow constant-folding on values of an EQL type. * Fix a buggy :load-if in x86-64 float EQLs VOPs. Index: float.pure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/float.pure.lisp,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- float.pure.lisp 6 Jul 2009 13:18:09 -0000 1.47 +++ float.pure.lisp 18 Jul 2009 17:44:42 -0000 1.48 @@ -233,3 +233,14 @@ (assert (eql 0.0d0 (funcall f 123.0d0 0.0))) (assert (eql 0.0d0 (funcall f 123.0d0 0.0d0))) (assert (eql 0.0d0 (funcall f 123.0 0.0d0))))) + +;; Bug reported by Eric Marsden on July 15 2009. The compiler +;; used not to constant fold calls with arguments of type +;; (EQL foo). +(with-test (:name :eql-type-constant-fold) + (assert (equal '(FUNCTION (T) (VALUES (MEMBER T) &OPTIONAL)) + (sb-kernel:%simple-fun-type + (compile nil `(lambda (x) + (eql #c(1.0 2.0) + (the (eql #c(1.0 2.0)) + x)))))))) |