X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fsparc%2Ffloat.lisp;h=b96cecc09eaf765fa222a60d2c7d172269925284;hb=cd875f8c1fb306067521330fbf84411713b7c20d;hp=5ae9ef2c49a82e4434c4c025d8ad166343a4d5e0;hpb=4ed3f0d08c3a57a6762018d9622f253ab9d0f2b6;p=sbcl.git diff --git a/src/compiler/sparc/float.lisp b/src/compiler/sparc/float.lisp index 5ae9ef2..b96cecc 100644 --- a/src/compiler/sparc/float.lisp +++ b/src/compiler/sparc/float.lisp @@ -2396,14 +2396,14 @@ (defun %%min (x y) (declare (type (or (unsigned-byte 32) (signed-byte 32) single-float double-float) x y)) - (if (< x y) + (if (<= x y) x y)) #+nil (defun %%max (x y) (declare (type (or (unsigned-byte 32) (signed-byte 32) single-float double-float) x y)) - (if (> x y) + (if (>= x y) x y)) #+nil (macrolet @@ -2538,11 +2538,11 @@ (lvar-type y))))))) (defoptimizer (min derive-type) ((x y)) - (multiple-value-bind (definitely-< definitely->=) - (ir1-transform-<-helper x y) - (cond (definitely-< + (multiple-value-bind (definitely-> definitely-<=) + (ir1-transform-<-helper y x) + (cond (definitely-<= (lvar-type x)) - (definitely->= + (definitely-> (lvar-type y)) (t (make-canonical-union-type (list (lvar-type x) @@ -2575,7 +2575,7 @@ (arg2 (gensym))) `(let ((,arg1 x) (,arg2 y)) - (if (> ,arg1 ,arg2) + (if (>= ,arg1 ,arg2) ,arg1 ,arg2))))))) (deftransform min ((x y) (real real) *) @@ -2602,7 +2602,7 @@ (arg2 (gensym))) `(let ((,arg1 x) (,arg2 y)) - (if (< ,arg1 ,arg2) + (if (<= ,arg1 ,arg2) ,arg1 ,arg2))))))) ) ; PROGN