master: arm64: don't translate (dpb x (byte ..) 0) to bfm

stassats via Sbcl-commits <[email protected]> Tue, 28 Jul 2026 08:39:37 +0000
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  34977e04079d689242434132a78066590a04201d (commit)
      from  e42312fedaa849a6d39363b43d22b9fa14d2276f (commit)

- Log -----------------------------------------------------------------
commit 34977e04079d689242434132a78066590a04201d
Author: Stas Boukarev <[email protected]>
Date:   Tue Jul 28 06:26:19 2026 +0300

    arm64: don't translate (dpb x (byte ..) 0) to bfm
---
 src/compiler/arm64/arith.lisp | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/compiler/arm64/arith.lisp b/src/compiler/arm64/arith.lisp
index e51cf96bf..5db174dd9 100644
--- a/src/compiler/arm64/arith.lisp
+++ b/src/compiler/arm64/arith.lisp
@@ -1042,11 +1042,13 @@
                                                    (constant-arg (mod #.n-word-bits))
                                                    signed-word) *)) *
                     :vop t)
-  (not (and (constant-lvar-p new)
-            (let* ((size (lvar-value size))
-                   (new (ldb (byte size 0) (lvar-value new))))
-              (or (zerop new)
-                  (= (logcount new) size))))))
+  (not (or (and (constant-lvar-p new)
+                (let* ((size (lvar-value size))
+                       (new (ldb (byte size 0) (lvar-value new))))
+                  (or (zerop new)
+                      (= (logcount new) size))))
+           (and (constant-lvar-p integer)
+                (zerop (lvar-value integer))))))
 
 (define-vop (dpb-c/orr/any-reg)
   (:args (new :scs (unsigned-reg signed-reg any-reg))

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL