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

pdep64# and pext64# fail to compile on i386 with BMI2
## Summary A recently added test, T26065, fails to compile on i386 with BMI2 enabled. ## Steps to reproduce Compile `T26065.hs` with `-mbmi2`: ``` $ i686-linux-gnu-ghc -fforce-recomp -fasm -mbmi2 T26065.hs [1 of 2] Compiling Main ( T26065.hs, T26065.o ) <no location info>: error: panic! (the 'impossible' happened) GHC version 9.15.20250925: allocateRegsAndSpill: Cannot read from uninitialized register %vHi_H1Zu Call stack: CallStack (from HasCallStack): pprPanic, called at compiler/GHC/CmmToAsm/Reg/Linear.hs:844:20 in ghc-9.15-inplace:GHC.CmmToAsm.Reg.Linear Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug ``` ``` $ i686-linux-gnu-ghc -fforce-recomp -fllvm -optlas=--target=i686-linux-gnu -mbmi2 T26065.hs [1 of 2] Compiling Main ( T26065.hs, T26065.o ) LLVM ERROR: Do not know how to expand the result of this operator! PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump: 0. Program arguments: llc-20 -O1 -relocation-model=static -mcpu=pentium4 -mattr=+sse2,+sse,+bmi,+bmi2 /tmp/ghc274492_tmp_5_0/ghc_tmp_5_3.bc -o /tmp/ghc274492_tmp_5_0/ghc_tmp_5_4.lm_s 1. Running pass 'Function Pass Manager' on module '/tmp/ghc274492_tmp_5_0/ghc_tmp_5_3.bc'. 2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@"c1Zp_info$def"' Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): 0 libLLVM.so.20.1 0x000074bf52e2bc7f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 63 1 libLLVM.so.20.1 0x000074bf52e29989 llvm::sys::RunSignalHandlers() + 89 2 libLLVM.so.20.1 0x000074bf52e2c390 3 libc.so.6 0x000074bf51645330 4 libc.so.6 0x000074bf5169eb2c pthread_kill + 284 5 libc.so.6 0x000074bf5164527e gsignal + 30 6 libc.so.6 0x000074bf516288ff abort + 223 7 libLLVM.so.20.1 0x000074bf52d7e564 llvm::report_fatal_error(llvm::Twine const&, bool) + 452 8 libLLVM.so.20.1 0x000074bf52d7e39d 9 libLLVM.so.20.1 0x000074bf535ff3d1 10 libLLVM.so.20.1 0x000074bf53615edf 11 libLLVM.so.20.1 0x000074bf53619853 llvm::SelectionDAG::LegalizeTypes() + 1315 12 libLLVM.so.20.1 0x000074bf537290c2 llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 322 13 libLLVM.so.20.1 0x000074bf53728cbc llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 6124 14 libLLVM.so.20.1 0x000074bf53726afa llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 410 15 libLLVM.so.20.1 0x000074bf53724e41 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) + 177 16 libLLVM.so.20.1 0x000074bf53243c23 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 611 17 libLLVM.so.20.1 0x000074bf52f8869f llvm::FPPassManager::runOnFunction(llvm::Function&) + 687 18 libLLVM.so.20.1 0x000074bf52f8e614 llvm::FPPassManager::runOnModule(llvm::Module&) + 68 19 libLLVM.so.20.1 0x000074bf52f88ea7 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1271 20 llc-20 0x00005b1f950e674c 21 llc-20 0x00005b1f950e41cf main + 1135 22 libc.so.6 0x000074bf5162a1ca 23 libc.so.6 0x000074bf5162a28b __libc_start_main + 139 24 llc-20 0x00005b1f950e0885 _start + 37 <no location info>: error: `llc-20' failed in phase `LLVM Compiler'. (Exit code: -6) ``` The run https://gitlab.haskell.org/ghc/ghc/-/jobs/2302530 exhibits the issue with LLVM backend. ## Expected behavior It should compile without issue. The fallback implementation (`hs_pdep64` and `hs_pext64`) should be used. ## Environment * GHC version used: 9.15.20250925 (8bf5b309e9d162f187e96562e6432d9205e29297) * Operating System: Linux (Ubuntu) * System Architecture: i686
issue