[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 10:13:27 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `flang-aarch64-rel-assert` running on `linaro-flang-aarch64-rel-assert` while building `llvm` at step 5 "build-unified-tree".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/29/builds/2073
Here is the relevant piece of the build log for the reference:
```
Step 5 (build-unified-tree) failure: build (failure)
...
| ^
1 warning generated.
3.176 [5/21/26] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_taskdeps.cpp.o
3.246 [4/21/27] Building CXX object openmp/libompd/src/CMakeFiles/ompd.dir/omp-state.cpp.o
3.259 [4/20/28] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_cdecl.cpp.o
3.267 [4/19/29] Linking C shared module openmp/libompd/gdb-plugin/python-module/ompd/ompdModule.so
3.275 [4/18/30] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_lock.cpp.o
3.367 [4/17/31] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_extra.cpp.o
3.716 [4/16/32] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o
3.737 [4/15/33] 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/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/runtimes/runtimes-bins/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/i18n -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/include -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/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/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/kmp_affinity.cpp
clang++: ../llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, 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/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/runtimes/runtimes-bins/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/i18n -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/include -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/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/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/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/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/kmp_affinity.cpp"
4. Running pass "slp-vectorizer" on function "_ZN14kmp_topology_t12canonicalizeEiiii"
#0 0x0000aaaab4a7cb64 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x1eb7b64)
#1 0x0000aaaab4a7a928 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x1eb5928)
#2 0x0000aaaab4a7bebc llvm::sys::CleanupOnSignal(unsigned long) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x1eb6ebc)
#3 0x0000aaaab49f7990 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#4 0x0000ffff8af09598 (linux-vdso.so.1+0x598)
#5 0x0000ffff8aa5ed78 raise /build/glibc-Q8DG8B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#6 0x0000ffff8aa4baac abort /build/glibc-Q8DG8B/glibc-2.31/stdlib/abort.c:81:7
#7 0x0000ffff8aa58490 __assert_fail_base /build/glibc-Q8DG8B/glibc-2.31/assert/assert.c:89:7
#8 0x0000ffff8aa584f4 (/lib/aarch64-linux-gnu/libc.so.6+0x2d4f4)
#9 0x0000aaaab4583f44 llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x19bef44)
#10 0x0000aaaab3e4319c llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x127e19c)
#11 0x0000aaaab3e33608 llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x126e608)
#12 0x0000aaaab3db278c llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x11ed78c)
#13 0x0000aaaab5f95b7c llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x33d0b7c)
#14 0x0000aaaab5f9615c llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x33d115c)
#15 0x0000aaaab5f8dd14 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x33c8d14)
#16 0x0000aaaab5fd4c10 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x340fc10)
#17 0x0000aaaab5fd702c 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>>&)::$_0::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 0x0000aaaab5fd5db4 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/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x3410db4)
#19 0x0000aaaab5fd16e0 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x340c6e0)
#20 0x0000aaaab5fd01c4 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x340b1c4)
#21 0x0000aaaab5fcf82c llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x340a82c)
#22 0x0000aaaab465039c llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x1a8b39c)
#23 0x0000aaaab4654514 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x1a8f514)
#24 0x0000aaaab464f5a4 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x1a8a5a4)
#25 0x0000aaaab4c7c024 (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 0x0000aaaab4c73544 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*) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x20ae544)
#27 0x0000aaaab5186cf8 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x25c1cf8)
#28 0x0000aaaab6c9b098 clang::ParseAST(clang::Sema&, bool, bool) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x40d6098)
```
https://github.com/llvm/llvm-project/pull/101198
More information about the llvm-commits
mailing list