Skip to content

ghc panic using SIMD types with unboxed sums

{-# language MagicHash,UnboxedSums #-} 
module Test where
import GHC.Prim

foo :: (# Int8X16# | () #) -> ()
foo _ = ()

building with -fllvm yields:

<no location info>: error:
    panic! (the 'impossible' happened)
  GHC version 9.4.2:
	primRepSlot
  No slot for VecRep
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/GHC/Utils/Panic.hs:182:37 in ghc:GHC.Utils.Panic
        pprPanic, called at compiler/GHC/Types/RepType.hs:329:27 in ghc:GHC.Types.RepType

This appears to happen for all SIMD types.

Other combinations of SIMD types (eg in an unboxed tuple) are working fine.

Edited by David Orion Girardo
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information