master: sb-simd: fix shifting of s64.2 and u32.4

stassats via Sbcl-commits <[email protected]> Sat, 16 May 2026 19:27:26 +0000
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  772ca5717fdd57c97f44f8086394a6bbcfd0b6e8 (commit)
      from  7aee69c49543c768256c96b0306e0c531f2238ce (commit)

- Log -----------------------------------------------------------------
commit 772ca5717fdd57c97f44f8086394a6bbcfd0b6e8
Author: Stas Boukarev <[email protected]>
Date:   Sat May 16 22:22:35 2026 +0300

    sb-simd: fix shifting of s64.2 and u32.4
    
    Fixes lp#2152791
---
 contrib/sb-simd/code/instruction-sets/avx2.lisp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/contrib/sb-simd/code/instruction-sets/avx2.lisp b/contrib/sb-simd/code/instruction-sets/avx2.lisp
index a0f50c2ea..7af8bdb47 100644
--- a/contrib/sb-simd/code/instruction-sets/avx2.lisp
+++ b/contrib/sb-simd/code/instruction-sets/avx2.lisp
@@ -59,8 +59,8 @@
    (u64.2!-from-p256      #:vextracti128  (u64.2) (p256)          :cost 1 :suffix '(0) :always-translatable nil)
    (u64.2-broadcast       nil             (u64.2) (u64)           :cost 1 :encoding :fake-vop)
    (u64.2-broadcastvec    #:vpbroadcastq  (u64.2) (u64.2)         :cost 1)
-   (u64.2-shiftl          #:vpsllvd       (u64.2) (u64.2 u64.2)   :cost 1)
-   (u64.2-shiftr          #:vpsrlvd       (u64.2) (u64.2 u64.2)   :cost 1)
+   (u64.2-shiftl          #:vpsllvq       (u64.2) (u64.2 u64.2)   :cost 1)
+   (u64.2-shiftr          #:vpsrlvq       (u64.2) (u64.2 u64.2)   :cost 1)
    ;; s8.16
    (s8.16!-from-p256      #:vextracti128  (s8.16) (p256)          :cost 1 :suffix '(0) :always-translatable nil)
    (s8.16-broadcast       nil             (s8.16) (s8)            :cost 1 :encoding :fake-vop)
@@ -73,8 +73,8 @@
    (s32.4!-from-p256      #:vextracti128  (s32.4) (p256)          :cost 1 :suffix '(0) :always-translatable nil)
    (s32.4-broadcast       nil             (s32.4) (s32)           :cost 1 :encoding :fake-vop)
    (s32.4-broadcastvec    #:vpbroadcastd  (s32.4) (s32.4)         :cost 1)
-   (s32.4-shiftl          #:vpsllvq       (s32.4) (s32.4 s32.4)   :cost 1)
-   (s32.4-shiftr          #:vpsrlvq       (s32.4) (s32.4 s32.4)   :cost 1)
+   (s32.4-shiftl          #:vpsllvd       (s32.4) (s32.4 s32.4)   :cost 1)
+   (s32.4-shiftr          #:vpsrlvd       (s32.4) (s32.4 s32.4)   :cost 1)
    ;; s64.2
    (s64.2!-from-p256      #:vextracti128  (s64.2) (p256)          :cost 1 :suffix '(0) :always-translatable nil)
    (s64.2-broadcast       nil             (s64.2) (s64)           :cost 1 :encoding :fake-vop)

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


hooks/post-receive
-- 
SBCL