[Git][ghc/ghc][master] x86: Don't require -mavx2 when using 256-bit floating-point SIMD primitives

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Nov 27 17:55:06 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
7d9a2e44 by ARATA Mizuki at 2023-11-27T12:54:39-05:00
x86: Don't require -mavx2 when using 256-bit floating-point SIMD primitives

Fixes #24222

- - - - -


1 changed file:

- compiler/GHC/StgToCmm/Prim.hs


Changes:

=====================================
compiler/GHC/StgToCmm/Prim.hs
=====================================
@@ -2350,13 +2350,15 @@ checkVecCompatibility cfg vcat l w =
       ArchX86 -> True
       _ -> False
     checkX86 :: Width -> PrimOpVecCat -> Length -> Width -> FCode ()
-    checkX86 W128 FloatVec 4 W32 | not (isSseEnabled platform) =
+    checkX86 W128 FloatVec 4 W32 | isSseEnabled platform = return ()
+                                 | otherwise =
         sorry $ "128-bit wide single-precision floating point " ++
                 "SIMD vector instructions require at least -msse."
     checkX86 W128 _ _ _ | not (isSse2Enabled platform) =
         sorry $ "128-bit wide integer and double precision " ++
                 "SIMD vector instructions require at least -msse2."
-    checkX86 W256 FloatVec _ _ | not (stgToCmmAvx cfg) =
+    checkX86 W256 FloatVec _ _ | stgToCmmAvx cfg = return ()
+                               | otherwise =
         sorry $ "256-bit wide floating point " ++
                 "SIMD vector instructions require at least -mavx."
     checkX86 W256 _ _ _ | not (stgToCmmAvx2 cfg) =



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7d9a2e44e8cce00e24671325aebe47d9e529aee5
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/20231127/434056bc/attachment-0001.html>


More information about the ghc-commits mailing list