[llvm] [Support] Assert that DomTree nodes share parent (PR #101198)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 10 09:30:24 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `llvm` at step 5 "compile-openmp".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/3976

Here is the relevant piece of the build log for the reference:
```
Step 5 (compile-openmp) failure: build (failure)
...
9.187 [838/34/808] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_gsupport.cpp.o
9.193 [837/34/809] Building LLVM bitcode Allocator.cpp-sm_87.bc
9.202 [836/34/810] Building LLVM bitcode Debug.cpp-sm_87.bc
9.234 [835/34/811] Building LLVM bitcode State.cpp-sm_90.bc
9.235 [834/34/812] Building LLVM bitcode LibC.cpp-sm_87.bc
9.254 [833/34/813] Building LLVM bitcode Kernel.cpp-sm_87.bc
9.273 [832/34/814] Building LLVM bitcode Misc.cpp-sm_87.bc
9.284 [831/34/815] Building LLVM bitcode Utils.cpp-sm_87.bc
9.320 [830/34/816] Building LLVM bitcode Mapping.cpp-sm_87.bc
9.321 [829/34/817] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o
FAILED: openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang++ --target=x86_64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -Iopenmp/runtime/src -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/openmp/runtime/src -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/openmp/runtime/src/i18n -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/openmp/runtime/src/include -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/openmp/runtime/src/thirdparty/ittnotify -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -fPIC   -D _GNU_SOURCE -D _REENTRANT -U_GLIBCXX_ASSERTIONS -UNDEBUG -std=c++17 -fno-exceptions -fno-rtti -Wno-covered-switch-default -Wno-frame-address -Wno-strict-aliasing -Wno-switch -Wno-uninitialized -Wno-return-type-c-linkage -Wno-cast-qual -Wno-int-to-void-pointer-cast -MD -MT openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -MF openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o.d -o openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -c /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/openmp/runtime/src/kmp_affinity.cpp
clang++: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/Support/GenericDomTree.h:401: llvm::DomTreeNodeBase<NodeT>* llvm::DominatorTreeBase<NodeT, IsPostDom>::getNode(const NodeT*) const [with NodeT = llvm::BasicBlock; bool IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
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: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang++ --target=x86_64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -Iopenmp/runtime/src -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/openmp/runtime/src -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/openmp/runtime/src/i18n -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/openmp/runtime/src/include -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/openmp/runtime/src/thirdparty/ittnotify -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -fPIC -D _GNU_SOURCE -D _REENTRANT -U_GLIBCXX_ASSERTIONS -UNDEBUG -std=c++17 -fno-exceptions -fno-rtti -Wno-covered-switch-default -Wno-frame-address -Wno-strict-aliasing -Wno-switch -Wno-uninitialized -Wno-return-type-c-linkage -Wno-cast-qual -Wno-int-to-void-pointer-cast -MD -MT openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -MF openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o.d -o openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -c /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/openmp/runtime/src/kmp_affinity.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/openmp/runtime/src/kmp_affinity.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN14kmp_topology_t12canonicalizeEiiii"
 #0 0x0000000002653788 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x2653788)
 #1 0x000000000265147c llvm::sys::CleanupOnSignal(unsigned long) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x265147c)
 #2 0x000000000259d3e0 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007efecb6e2910 __restore_rt (/lib64/libpthread.so.0+0x16910)
 #4 0x00007efecb010d2b raise (/lib64/libc.so.6+0x4ad2b)
 #5 0x00007efecb0123e5 abort (/lib64/libc.so.6+0x4c3e5)
 #6 0x00007efecb008c6a __assert_fail_base (/lib64/libc.so.6+0x42c6a)
 #7 0x00007efecb008cf2 (/lib64/libc.so.6+0x42cf2)
 #8 0x0000000001fb37c6 (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x1fb37c6)
 #9 0x0000000001819fdd llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x1819fdd)
#10 0x000000000184e8af llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x184e8af)
#11 0x00000000018fd0a4 llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x18fd0a4)
#12 0x0000000003cb0e55 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x3cb0e55)
#13 0x0000000003cb14ac llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x3cb14ac)
#14 0x0000000003ccce22 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom()::'lambda'(std::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry>> const&) llvm::for_each<llvm::SmallVector<std::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry>>, 8u>&, llvm::slpvectorizer::BoUpSLP::reorderTopToBottom()::'lambda'(std::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry>> const&)>(llvm::SmallVector<std::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry>>, 8u>&, llvm::slpvectorizer::BoUpSLP::reorderTopToBottom()::'lambda'(std::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry>> const&)) SLPVectorizer.cpp:0:0
#15 0x0000000003cdf9d5 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x3cdf9d5)
#16 0x0000000003d0ae70 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x3d0ae70)
#17 0x0000000003d0c4d6 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::'lambda'(std::set<std::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::allocator<std::pair<unsigned int, int>>> const&)::operator()(std::set<std::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::allocator<std::pair<unsigned int, int>>> const&) const SLPVectorizer.cpp:0:0
#18 0x0000000003d0e2ef llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x3d0e2ef)
#19 0x0000000003d0eba7 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x3d0eba7)
#20 0x0000000003d0fff1 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (.part.4718) SLPVectorizer.cpp:0:0
#21 0x0000000003d1090f llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x3d1090f)
#22 0x000000000387448d llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x387448d)
#23 0x0000000002099916 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x2099916)
#24 0x0000000000d7830d llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0xd7830d)
#25 0x00000000020990b3 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x20990b3)
#26 0x0000000000d786bd llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0xd786bd)
#27 0x0000000002097ac7 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang+++0x2097ac7)
#28 0x00000000028b1a8f (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

```

https://github.com/llvm/llvm-project/pull/101198


More information about the llvm-commits mailing list