[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:22:51 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `flang-aarch64-dylib` running on `linaro-flang-aarch64-dylib` while building `llvm` at step 5 "build-unified-tree".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/1983
Here is the relevant piece of the build log for the reference:
```
Step 5 (build-unified-tree) failure: build (failure)
...
| ^
1 warning generated.
1.445 [4/13/35] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_gsupport.cpp.o
1.480 [4/12/36] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_extra.cpp.o
1.710 [4/11/37] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_barrier.cpp.o
1.715 [4/10/38] Building CXX object openmp/libompd/src/CMakeFiles/ompd.dir/TargetValue.cpp.o
1.755 [4/9/39] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_dispatch.cpp.o
1.767 [4/8/40] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_atomic.cpp.o
1.856 [4/7/41] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_tasking.cpp.o
1.947 [4/6/42] 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-dylib/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-dylib/build/runtimes/runtimes-bins/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/i18n -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/include -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/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-dylib/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-dylib/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-dylib/build/runtimes/runtimes-bins/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/i18n -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/include -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/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-dylib/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-dylib/llvm-project/openmp/runtime/src/kmp_affinity.cpp"
4. Running pass "slp-vectorizer" on function "_ZN14kmp_topology_t12canonicalizeEiiii"
#0 0x0000ffff8b7595b0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x8bb5b0)
#1 0x0000ffff8b757374 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x8b9374)
#2 0x0000ffff8b758908 llvm::sys::CleanupOnSignal(unsigned long) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x8ba908)
#3 0x0000ffff8b695c64 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#4 0x0000ffff94890598 (linux-vdso.so.1+0x598)
#5 0x0000ffff8aaaad78 raise /build/glibc-Q8DG8B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#6 0x0000ffff8aa97aac abort /build/glibc-Q8DG8B/glibc-2.31/stdlib/abort.c:81:7
#7 0x0000ffff8aaa4490 __assert_fail_base /build/glibc-Q8DG8B/glibc-2.31/assert/assert.c:89:7
#8 0x0000ffff8aaa44f4 (/lib/aarch64-linux-gnu/libc.so.6+0x2d4f4)
#9 0x0000ffff8b87f0d0 llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x9e10d0)
#10 0x0000ffff8d29f0a8 llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x24010a8)
#11 0x0000ffff8d28f8c8 llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x23f18c8)
#12 0x0000ffff8d1bdf5c llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x231ff5c)
#13 0x0000ffff8ced7728 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x2039728)
#14 0x0000ffff8ced7c28 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x2039c28)
#15 0x0000ffff8cecf8c0 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x20318c0)
#16 0x0000ffff8cf16830 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x2078830)
#17 0x0000ffff8cf18c4c 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 0x0000ffff8cf179d4 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-dylib/build/bin/../lib/libLLVM.so.20.0git+0x20799d4)
#19 0x0000ffff8cf13300 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x2075300)
#20 0x0000ffff8cf11ce8 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-dylib/build/bin/../lib/libLLVM.so.20.0git+0x2073ce8)
#21 0x0000ffff8cf11350 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x2073350)
#22 0x0000ffff8b957b4c llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0xab9b4c)
#23 0x0000ffff8b95c284 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0xabe284)
#24 0x0000ffff8b9568e0 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0xab88e0)
#25 0x0000ffff919f9a10 (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 0x0000ffff919f07f4 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-dylib/build/bin/../lib/libclang-cpp.so.20.0git+0x22477f4)
#27 0x0000ffff91dd3e40 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libclang-cpp.so.20.0git+0x262ae40)
#28 0x0000ffff903747a0 clang::ParseAST(clang::Sema&, bool, bool) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libclang-cpp.so.20.0git+0xbcb7a0)
```
https://github.com/llvm/llvm-project/pull/101198
More information about the llvm-commits
mailing list