sbcl-0.8.14.15:
[sbcl.git] / src / compiler / sparc / float.lisp
index 5ae9ef2..b96cecc 100644 (file)
 (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
                                            (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)
                 (arg2 (gensym)))
             `(let ((,arg1 x)
                    (,arg2 y))
-              (if (> ,arg1 ,arg2)
+              (if (>= ,arg1 ,arg2)
                   ,arg1 ,arg2)))))))
 
 (deftransform min ((x y) (real real) *)
                 (arg2 (gensym)))
             `(let ((,arg1 x)
                    (,arg2 y))
-               (if (< ,arg1 ,arg2)
+               (if (<= ,arg1 ,arg2)
                    ,arg1 ,arg2)))))))
 
 ) ; PROGN