master: x86-64-simd: more compact loading of -1

stassats via Sbcl-commits <[email protected]> Sun, 28 Jun 2026 16:17:03 +0000
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  e2165ebf7679b09d75b515cd7f2568388db0b921 (commit)
      from  74add191beb49161a04bd91e45891d2d77b02787 (commit)

- Log -----------------------------------------------------------------
commit e2165ebf7679b09d75b515cd7f2568388db0b921
Author: Stas Boukarev <[email protected]>
Date:   Sun Jun 28 19:01:32 2026 +0300

    x86-64-simd: more compact loading of -1
---
 src/code/x86-64-simd.lisp | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/code/x86-64-simd.lisp b/src/code/x86-64-simd.lisp
index 1243deae9..b42b6a151 100644
--- a/src/code/x86-64-simd.lisp
+++ b/src/code/x86-64-simd.lisp
@@ -1064,9 +1064,8 @@
                                                                                  collect 4))))
             (inst movdqa indexes (register-inline-constant :sse
                                                            (concat-ub 32 '(3 2 1 0))))
-            (inst movdqa last-newlines (register-inline-constant :sse
-                                                                 (concat-ub 32 (loop repeat 4
-                                                                                     collect -1))))
+            (inst pcmpeqb last-newlines last-newlines) ;; #xFF....
+
             (inst add byte-array* tail)
             (move byte-array byte-array*)
             (inst add end byte-array*)
@@ -1189,9 +1188,7 @@
                                                                                  collect 8))))
             (inst vmovdqu indexes (register-inline-constant :avx2
                                                            (concat-ub 32 '(7 6 5 4 3 2 1 0))))
-            (inst vmovdqu last-newlines (register-inline-constant :avx2
-                                                                 (concat-ub 32 (loop repeat 8
-                                                                                     collect -1))))
+            (inst vpcmpeqb last-newlines last-newlines last-newlines) ;; #xFF....
 
             (inst add byte-array* tail)
             (move byte-array byte-array*)

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


hooks/post-receive
-- 
SBCL