Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

There are no LLVM intrinsics like llvm.x86.bmi.{pdep,pext}.{8,16}
## Summary The LLVM backend refers to non-existent LLVM intrinsics like `llvm.x86.bmi.{pdep,pext}.{8,16}`. LLVM provides only 32-bit and 64-bit ones (see [here](https://github.com/llvm/llvm-project/blob/0fa3ba7c395a859f3c0120d4e82763c692d6712b/llvm/lib/Target/X86/X86InstrMisc.td#L1397-L1409)). ## Steps to reproduce ```haskell {-# LANGUAGE MagicHash #-} import GHC.Exts import GHC.Word pdep8 :: Word8 -> Word8 -> Word8 pdep8 (W8# a) (W8# b) = W8# (wordToWord8# (pdep8# (word8ToWord# a) (word8ToWord# b))) {-# NOINLINE pdep8 #-} pdep16 :: Word16 -> Word16 -> Word16 pdep16 (W16# a) (W16# b) = W16# (wordToWord16# (pdep16# (word16ToWord# a) (word16ToWord# b))) {-# NOINLINE pdep16 #-} pdep32 :: Word32 -> Word32 -> Word32 pdep32 (W32# a) (W32# b) = W32# (wordToWord32# (pdep32# (word32ToWord# a) (word32ToWord# b))) {-# NOINLINE pdep32 #-} pdep64 :: Word64 -> Word64 -> Word64 pdep64 (W64# a) (W64# b) = W64# (pdep64# a b) {-# NOINLINE pdep64 #-} pext8 :: Word8 -> Word8 -> Word8 pext8 (W8# a) (W8# b) = W8# (wordToWord8# (pext8# (word8ToWord# a) (word8ToWord# b))) {-# NOINLINE pext8 #-} pext16 :: Word16 -> Word16 -> Word16 pext16 (W16# a) (W16# b) = W16# (wordToWord16# (pext16# (word16ToWord# a) (word16ToWord# b))) {-# NOINLINE pext16 #-} pext32 :: Word32 -> Word32 -> Word32 pext32 (W32# a) (W32# b) = W32# (wordToWord32# (pext32# (word32ToWord# a) (word32ToWord# b))) {-# NOINLINE pext32 #-} pext64 :: Word64 -> Word64 -> Word64 pext64 (W64# a) (W64# b) = W64# (pext64# a b) {-# NOINLINE pext64 #-} main :: IO () main = do print (pdep8 7 3) print (pdep16 7 3) print (pdep32 7 3) print (pdep64 7 3) print (pext8 7 3) print (pext16 7 3) print (pext32 7 3) print (pext64 7 3) ``` ``` $ ghc -fforce-recomp bmitest.hs # OK $ ghc -fforce-recomp -mbmi2 bmitest.hs # OK $ ghc -fforce-recomp -fllvm bmitest.hs # OK $ ghc -fforce-recomp -fllvm -mbmi2 bmitest.hs # fail bmitest.o:ghc_tmp_5_1.ll:c1aQ_info$def:(.text+0xb7): error: undefined reference to 'llvm.x86.bmi.pdep.8' bmitest.o:ghc_tmp_5_1.ll:c1bq_info$def:(.text+0x1b7): error: undefined reference to 'llvm.x86.bmi.pdep.16' bmitest.o:ghc_tmp_5_1.ll:c1d1_info$def:(.text+0x497): error: undefined reference to 'llvm.x86.bmi.pext.8' bmitest.o:ghc_tmp_5_1.ll:c1dB_info$def:(.text+0x597): error: undefined reference to 'llvm.x86.bmi.pext.16' collect2: error: ld returned 1 exit status ghc: Uncaught exception ghc-9.13-inplace:GHC.Utils.Panic.GhcException: `gcc' failed in phase `Linker'. (Exit code: 1) While handling `gcc' failed in phase `Linker'. (Exit code: 1) ``` ## Expected behavior `ghc -fforce-recomp -fllvm -mbmi2 bmitest.hs` should succeed. ## Environment * GHC version used: 9.10.2, 9.12.2, 9.13.20250523 (823d1ccf9a8057e8e04dbb48dae54fbe5b7e9f3d) * Operating System: Linux * System Architecture: x86_64
issue