diff --git a/bits-extra.cabal b/bits-extra.cabal
--- a/bits-extra.cabal
+++ b/bits-extra.cabal
@@ -1,7 +1,7 @@
 cabal-version: 2.2
 
 name:                   bits-extra
-version:                0.0.2.2
+version:                0.0.2.3
 synopsis:               Useful bitwise operations
 description:            Please see the README on Github at <https://github.com/haskell-works/bits-extra#readme>
 category:               Data, Bit
diff --git a/src/Data/Bits/Pdep/Prim.hs b/src/Data/Bits/Pdep/Prim.hs
--- a/src/Data/Bits/Pdep/Prim.hs
+++ b/src/Data/Bits/Pdep/Prim.hs
@@ -1,4 +1,6 @@
-{-# LANGUAGE CPP       #-}
+{-# LANGUAGE BangPatterns #-}
+{-# LANGUAGE CPP          #-}
+{-# LANGUAGE MagicHash    #-}
 
 {-|
 Module      : Data.Bits.Pdep.Prim
@@ -17,10 +19,10 @@
   , fastPdepEnabled
   ) where
 
+import GHC.Prim
 import GHC.Word
 
 #if MIN_VERSION_base(4,11,0) && defined(BMI2_ENABLED)
-import GHC.Prim
 #else
 import Data.Bits.Pdep.Slow
 #endif
@@ -72,7 +74,10 @@
   -> Word32 -- ^ bitmap selecting the bits that are to be deposited
   -> Word32 -- ^ word containing the deposited bits
 #if MIN_VERSION_base(4,11,0) && defined(BMI2_ENABLED)
-primPdep32 (W32# src#) (W32# mask#) = W32# (pdep32# src# mask#)
+primPdep32 src mask =
+  let !(W# src#)   = fromIntegral src  in
+  let !(W# mask#)  = fromIntegral mask in
+  fromIntegral (W# (pdep32# src# mask#))
 #else
 primPdep32 = slowPdep
 #endif
diff --git a/src/Data/Bits/Pext/Prim.hs b/src/Data/Bits/Pext/Prim.hs
--- a/src/Data/Bits/Pext/Prim.hs
+++ b/src/Data/Bits/Pext/Prim.hs
@@ -1,4 +1,6 @@
-{-# LANGUAGE CPP       #-}
+{-# LANGUAGE BangPatterns #-}
+{-# LANGUAGE CPP          #-}
+{-# LANGUAGE MagicHash    #-}
 
 {-|
 Module      : Data.Bits.Pext.Prim
@@ -62,7 +64,10 @@
   -> Word32 -- ^ bitmap selecting the bits that are to be extracted
   -> Word32 -- ^ word containing the extracted bits
 #if MIN_VERSION_base(4,11,0) && defined(BMI2_ENABLED)
-primPext32 (W32# src#) (W32# mask#) = W32# (pext32# src# mask#)
+primPext32 src mask =
+  let !(W# src#)   = fromIntegral src  in
+  let !(W# mask#)  = fromIntegral mask in
+  fromIntegral (W# (pext32# src# mask#))
 #else
 primPext32 = slowPext
 #endif
