[llvm] [CodeGen] Forbid passing a PointerType to MVT::getVT and EVT::getEVT (PR #92671)
Jan Patrick Lehr via llvm-commits
llvm-commits at lists.llvm.org
Mon May 27 03:42:08 PDT 2024
jplehr wrote:
I believe this broke the build of miniQMC with the following assertion.
```
Unknown type!
UNREACHABLE executed at /work1/omp-nightly/build/git/trunk19.0/llvm-project/llvm/lib/CodeGen/ValueTypes.cpp:592!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /mnt/COD/2024-05-27/trunk_19.0-0/bin/clang-19 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -clear-ast-before-backend -main-file-name catch_main.cpp -mrelocation-model static -mframe-pointer=none -menable-no-infs -menable-no-nans -fapprox-func -funsafe-math-optimizations -fno-signed-zeros -mreassociate -freciprocal-math -ffp-contract=fast -fno-rounding-math -ffast-math -ffinite-math-only -complex-range=basic -mconstructor-aliases -funwind-tables=2 -target-cpu znver4 -target-feature +prfchw -target-feature -cldemote -target-feature +avx -target-feature +aes -target-feature +sahf -target-feature +pclmul -target-feature -xop -target-feature +crc32 -target-feature +xsaves -target-feature -avx512fp16 -target-feature -usermsr -target-feature -sm4 -target-feature -egpr -target-feature +sse4.1 -target-feature +avx512ifma -target-feature +xsave -target-feature +sse4.2 -target-feature -tsxldtrk -target-feature -sm3 -target-feature -ptwrite -target-feature -widekl -target-feature +invpcid -target-feature +64bit -target-feature +xsavec -target-feature -avx10.1-512 -target-feature +avx512vpopcntdq -target-feature +cmov -target-feature -avx512vp2intersect -target-feature +avx512cd -target-feature +movbe -target-feature -avxvnniint8 -target-feature -ccmp -target-feature -amx-int8 -target-feature -kl -target-feature -avx10.1-256 -target-feature +evex512 -target-feature -avxvnni -target-feature -rtm -target-feature +adx -target-feature +avx2 -target-feature -hreset -target-feature -movdiri -target-feature -serialize -target-feature -sha512 -target-feature +vpclmulqdq -target-feature +avx512vl -target-feature -uintr -target-feature -cf -target-feature +clflushopt -target-feature -raoint -target-feature -cmpccxadd -target-feature +bmi -target-feature -amx-tile -target-feature +sse -target-feature +gfni -target-feature -avxvnniint16 -target-feature -amx-fp16 -target-feature -ndd -target-feature +xsaveopt -target-feature +rdrnd -target-feature +avx512f -target-feature -amx-bf16 -target-feature +avx512bf16 -target-feature +avx512vnni -target-feature -push2pop2 -target-feature +cx8 -target-feature +avx512bw -target-feature +sse3 -target-feature +pku -target-feature +fsgsbase -target-feature +clzero -target-feature +mwaitx -target-feature -lwp -target-feature +lzcnt -target-feature +sha -target-feature -movdir64b -target-feature -ppx -target-feature +wbnoinvd -target-feature -enqcmd -target-feature -avxneconvert -target-feature -tbm -target-feature -pconfig -target-feature -amx-complex -target-feature +ssse3 -target-feature +cx16 -target-feature +bmi2 -target-feature +fma -target-feature +popcnt -target-feature -avxifma -target-feature +f16c -target-feature +avx512bitalg -target-feature +rdpru -target-feature +clwb -target-feature +mmx -target-feature +sse2 -target-feature +rdseed -target-feature +avx512vbmi2 -target-feature -prefetchi -target-feature +rdpid -target-feature -fma4 -target-feature +avx512vbmi -target-feature +shstk -target-feature +vaes -target-feature -waitpkg -target-feature -sgx -target-feature +fxsr -target-feature +avx512dq -target-feature +sse4a -debugger-tuning=gdb -fdebug-compilation-dir=/home/janplehr/git/aomp-test/miniqmc_build/build_aomp_clang/src/Utilities -fcoverage-compilation-dir=/home/janplehr/git/aomp-test/miniqmc_build/build_aomp_clang/src/Utilities -resource-dir /mnt/COD/2024-05-27/trunk_19.0-0/lib/clang/19 -O3 -Wvla -Wall -Wno-unused-variable -Wno-overloaded-virtual -Wno-unused-private-field -Wno-unused-local-typedef -Wno-unknown-pragmas -Wmisleading-indentation -Wno-linker-warnings -std=c++17 -ferror-limit 19 -fopenmp -fopenmp-assume-no-thread-state -fopenmp-assume-no-nested-parallelism -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -vectorize-loops -vectorize-slp -fembed-offload-object=/tmp/catch_main-029a51.out -fopenmp-targets=amdgcn-amd-amdhsa -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/catch_main.dir/catch_main.cpp.o -x ir /tmp/catch_main-7afc88.bc
1. Optimizer
#0 0x00007f7943272bef llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMSupport.so.19.0git+0x1e2bef)
#1 0x00007f7943270144 SignalHandler(int) Signals.cpp:0:0
#2 0x00007f7942a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x00007f7942a969fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#4 0x00007f7942a969fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
#5 0x00007f7942a969fc pthread_kill ./nptl/pthread_kill.c:89:10
#6 0x00007f7942a42476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
#7 0x00007f7942a287f3 abort ./stdlib/abort.c:81:7
#8 0x00007f794318bc0e (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMSupport.so.19.0git+0xfbc0e)
#9 0x00007f7946d3dae6 (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMCodeGen.so.19.0git+0x764ae6)
#10 0x00007f7949a2b8d3 llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(unsigned int, llvm::FixedVectorType*, unsigned int, llvm::ArrayRef<unsigned int>, llvm::Align, unsigned int, llvm::TargetTransformInfo::TargetCostKind, bool, bool) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMX86CodeGen.so.19.0git+0x41e8d3)
#11 0x00007f7949a2ce16 llvm::X86TTIImpl::getInterleavedMemoryOpCost(unsigned int, llvm::Type*, unsigned int, llvm::ArrayRef<unsigned int>, llvm::Align, unsigned int, llvm::TargetTransformInfo::TargetCostKind, bool, bool) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMX86CodeGen.so.19.0git+0x41fe16)
#12 0x00007f7943ff5ca6 llvm::TargetTransformInfo::getInterleavedMemoryOpCost(unsigned int, llvm::Type*, unsigned int, llvm::ArrayRef<unsigned int>, llvm::Align, unsigned int, llvm::TargetTransformInfo::TargetCostKind, bool, bool) const (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMAnalysis.so.19.0git+0x46dca6)
#13 0x00007f7945e5f6a1 llvm::LoopVectorizationCostModel::getInterleaveGroupCost(llvm::Instruction*, llvm::ElementCount) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMVectorize.so.19.0git+0x836a1)
#14 0x00007f7945e79261 llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(llvm::ElementCount) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMVectorize.so.19.0git+0x9d261)
#15 0x00007f7945e9aca2 llvm::LoopVectorizationPlanner::plan(llvm::ElementCount, unsigned int) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMVectorize.so.19.0git+0xbeca2)
#16 0x00007f7945e9dfaf llvm::LoopVectorizePass::processLoop(llvm::Loop*) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMVectorize.so.19.0git+0xc1faf)
#17 0x00007f7945ea114d llvm::LoopVectorizePass::runImpl(llvm::Function&, llvm::ScalarEvolution&, llvm::LoopInfo&, llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::BlockFrequencyInfo*, llvm::TargetLibraryInfo*, llvm::DemandedBits&, llvm::AssumptionCache&, llvm::LoopAccessInfoManager&, llvm::OptimizationRemarkEmitter&, llvm::ProfileSummaryInfo*) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMVectorize.so.19.0git+0xc514d)
#18 0x00007f7945ea2360 llvm::LoopVectorizePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMVectorize.so.19.0git+0xc6360)
#19 0x00007f7941ce5356 llvm::detail::PassModel<llvm::Function, llvm::LoopVectorizePass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/../lib/libLLVMPasses.so.19.0git+0x6f356)
#20 0x00007f79436c548d llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMCore.so.19.0git+0x32148d)
#21 0x00007f79496b6166 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMX86CodeGen.so.19.0git+0xa9166)
#22 0x00007f79436c3cfd llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMCore.so.19.0git+0x31fcfd)
#23 0x00007f79496b7356 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMX86CodeGen.so.19.0git+0xaa356)
#24 0x00007f79436c1b9d llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libLLVMCore.so.19.0git+0x31db9d)
#25 0x00007f79471b3eb8 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#26 0x00007f79471b7695 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) BackendUtil.cpp:0:0
#27 0x00007f79471b7d46 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libclangCodeGen.so.19.0git+0x115d46)
#28 0x00007f79476b5e90 clang::CodeGenAction::ExecuteAction() (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libclangCodeGen.so.19.0git+0x613e90)
#29 0x00007f7945caa4d9 clang::FrontendAction::Execute() (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libclangFrontend.so.19.0git+0x1614d9)
#30 0x00007f7945c2294e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libclangFrontend.so.19.0git+0xd994e)
#31 0x00007f7948115706 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/../lib/libclangFrontendTool.so.19.0git+0x5706)
#32 0x0000564e1faec03c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/clang-19+0x1403c)
#33 0x0000564e1fae525a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#34 0x0000564e1fae8c1e clang_main(int, char**, llvm::ToolContext const&) (/mnt/COD/2024-05-27/trunk_19.0-0/bin/clang-19+0x10c1e)
#35 0x0000564e1fae4c8b main (/mnt/COD/2024-05-27/trunk_19.0-0/bin/clang-19+0xcc8b)
#36 0x00007f7942a29d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#37 0x00007f7942a29e40 call_init ./csu/../csu/libc-start.c:128:20
#38 0x00007f7942a29e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#39 0x0000564e1fae4cee _start (/mnt/COD/2024-05-27/trunk_19.0-0/bin/clang-19+0xccee)
clang++: error: unable to execute command: Aborted (core dumped)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 19.0.0git (https://github.com/llvm/llvm-project 686600b521aa3ca5fb9f015d25636067e2c5c9fa)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /mnt/COD/2024-05-27/trunk_19.0-0/bin
Build config: +assertions
Configuration file: /mnt/COD/2024-05-27/trunk_19.0-0/bin/clang++.cfg
clang++: note: diagnostic msg:
********************
```
https://github.com/llvm/llvm-project/pull/92671
More information about the llvm-commits
mailing list