Only use MASK-SIGNED-FIELD VOPs as last resorts
authorPaul Khuong <pvk@pvk.ca>
Sat, 8 Jun 2013 15:26:19 +0000 (11:26 -0400)
committerPaul Khuong <pvk@pvk.ca>
Sat, 8 Jun 2013 15:26:19 +0000 (11:26 -0400)
 The MOVE hack usually leads to better code when it can be used.

src/compiler/ir2tran.lisp

index 146e8ec..61cf153 100644 (file)
 \f
 (defoptimizer (mask-signed-field ir2-convert) ((width x) node block)
   (block nil
-    (when (template-p (basic-combination-info node))
-      (ir2-convert-template node block)
-      (return))
     (when (constant-lvar-p width)
       (case (lvar-value width)
         (#.(- sb!vm:n-word-bits sb!vm:n-fixnum-tag-bits)
                   temp (first results))
              (move-lvar-result node block results lvar)
              (return))))))
-    (ir2-convert-full-call node block)))
+    (if (template-p (basic-combination-info node))
+        (ir2-convert-template node block)
+        (ir2-convert-full-call node block))))
 \f
 ;;; Convert the code in a component into VOPs.
 (defun ir2-convert (component)