1.0.15.19: use TEST X X when possible in SIGNED-BYTE-*-LEN VOPS
[sbcl.git] / src / compiler / x86 / arith.lisp
index e7ec031..970b369 100644 (file)
   (:result-types unsigned-num)
   (:generator 28
     (move res arg)
-    (inst cmp res 0)
+    (if (sc-is res unsigned-reg)
+        (inst test res res)
+        (inst cmp res 0))
     (inst jmp :ge POS)
     (inst not res)
     POS