[Git][ghc/ghc][wip/ncg-simd] slight improvement to vector unpack

sheaf (@sheaf) gitlab at gitlab.haskell.org
Wed Jun 12 10:35:25 UTC 2024



sheaf pushed to branch wip/ncg-simd at Glasgow Haskell Compiler / GHC


Commits:
7c08ed94 by sheaf at 2024-06-12T12:34:40+02:00
slight improvement to vector unpack

- - - - -


1 changed file:

- compiler/GHC/CmmToAsm/X86/CodeGen.hs


Changes:

=====================================
compiler/GHC/CmmToAsm/X86/CodeGen.hs
=====================================
@@ -1552,7 +1552,7 @@ getRegister' platform is32Bit (CmmMachOp mop [x, y]) = do -- dyadic MachOps
           imm      = litToImm lit
           code dst
             = case lit of
-                CmmInt 0 _ -> exp `snocOL` (VMOVU format (OpReg r) (OpReg dst))
+                CmmInt 0 _ -> exp `snocOL` (MOV FF32 (OpReg r) (OpReg dst))
                 CmmInt _ _ -> exp `snocOL` (VPSHUFD format imm (OpReg r) dst)
                 _          -> panic "Error in offset while unpacking"
       return (Any format code)
@@ -1564,8 +1564,7 @@ getRegister' platform is32Bit (CmmMachOp mop [x, y]) = do -- dyadic MachOps
           code dst
             = case lit of
                 CmmInt 0 _ -> exp `snocOL`
-                              (MOVL format (OpReg r) (OpAddr addr)) `snocOL`
-                              (MOV FF64 (OpAddr addr) (OpReg dst))
+                              (MOV FF64 (OpReg r) (OpReg dst))
                 CmmInt 1 _ -> exp `snocOL`
                               (MOVH format (OpReg r) (OpAddr addr)) `snocOL`
                               (MOV FF64 (OpAddr addr) (OpReg dst))



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7c08ed94c0c102f2cbe1691088890c3b2ff1b3c6

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7c08ed94c0c102f2cbe1691088890c3b2ff1b3c6
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240612/b666b11c/attachment-0001.html>


More information about the ghc-commits mailing list