[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:42:33 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `flang-runtime-cuda-clang` running on `as-builder-7` while building `llvm` at step 10 "build-flang-runtime-FortranRuntime".

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

Here is the relevant piece of the build log for the reference:
```
Step 10 (build-flang-runtime-FortranRuntime) failure: cmake (failure)
...
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/flang/runtime/../include/flang/Decimal/binary-floating-point.h:39:24: warning: declaration is not declared in any declare target region [-Wopenmp-target]
   39 |   static constexpr int significandBits{realChars.significandBits};
      |                        ^
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/flang/runtime/../include/flang/Decimal/binary-floating-point.h:51:59: note: used here
   51 |   static constexpr RawType significandMask{(RawType{1} << significandBits) - 1};
      |                                                           ^~~~~~~~~~~~~~~
1 warning generated.
10.953 [1/35/30] Building CXX object CMakeFiles/FortranRuntime.dir/memory.cpp.o
11.232 [1/34/31] Building CXX object CMakeFiles/FortranRuntime.dir/file.cpp.o
11.408 [1/33/32] Building CXX object CMakeFiles/FortranRuntime.dir/ISO_Fortran_binding.cpp.o
FAILED: CMakeFiles/FortranRuntime.dir/ISO_Fortran_binding.cpp.o 
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang++ -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DOMP_OFFLOAD_BUILD -I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/flang/runtime/../include -I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/flang-runtime -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 -fno-lto -O3 -DNDEBUG   -U_GLIBCXX_ASSERTIONS -U_LIBCPP_ENABLE_ASSERTIONS -std=c++17  -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -fopenmp -fvisibility=hidden -fopenmp-cuda-mode --offload-arch=sm_50,sm_60,sm_70,sm_80 -foffload-lto -MD -MT CMakeFiles/FortranRuntime.dir/ISO_Fortran_binding.cpp.o -MF CMakeFiles/FortranRuntime.dir/ISO_Fortran_binding.cpp.o.d -o CMakeFiles/FortranRuntime.dir/ISO_Fortran_binding.cpp.o -c /home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/flang/runtime/ISO_Fortran_binding.cpp
clang-20: /home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:400: 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/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -clear-ast-before-backend -main-file-name ISO_Fortran_binding.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/flang-runtime -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/flang-runtime -resource-dir /home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/lib/clang/20 -O3 -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 -std=c++17 -fconst-strings -ferror-limit 19 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -fopenmp-cuda-mode -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcolor-diagnostics -vectorize-loops -vectorize-slp -fembed-offload-object=/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/ISO_Fortran_binding-cd4bd6.out -fopenmp-targets=nvptx64-nvidia-cuda -faddrsig -o CMakeFiles/FortranRuntime.dir/ISO_Fortran_binding.cpp.o -x ir /home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/ISO_Fortran_binding-99f023.bc
1.	Optimizer
2.	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/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/ISO_Fortran_binding-99f023.bc"
3.	Running pass "slp-vectorizer" on function "CFI_section"
 #0 0x0000636be454ad70 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x221ed70)
 #1 0x0000636be454818f llvm::sys::RunSignalHandlers() (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x221c18f)
 #2 0x0000636be45482e5 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007270e4642520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007270e46969fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x00007270e46969fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x00007270e46969fc pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x00007270e4642476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x00007270e46287f3 abort ./stdlib/abort.c:81:7
 #9 0x00007270e462871b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x00007270e4639e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#11 0x0000636be3f2b3ff llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x1bff3ff)
#12 0x0000636be365a910 llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x132e910)
#13 0x0000636be3670a80 llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x1344a80)
#14 0x0000636be379ff78 llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x1473f78)
#15 0x0000636be5f47d01 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c1bd01)
#16 0x0000636be5f48242 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c1c242)
#17 0x0000636be5f759b1 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom()::'lambda'(std::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry>> const&)::operator()(std::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry>> const&) const SLPVectorizer.cpp:0:0
#18 0x0000636be5f8cd67 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c60d67)
#19 0x0000636be5fb094a llvm::SLPVectorizerPass::tryToVectorizeList(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, bool) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c8494a)
#20 0x0000636be5fb391d llvm::SLPVectorizerPass::tryToVectorize(llvm::Instruction*, llvm::slpvectorizer::BoUpSLP&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c8791d)
#21 0x0000636be5fb3a9a llvm::SLPVectorizerPass::tryToVectorize(llvm::ArrayRef<llvm::WeakTrackingVH>, llvm::slpvectorizer::BoUpSLP&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c87a9a)
#22 0x0000636be5fb42a9 llvm::SLPVectorizerPass::vectorizeRootInstruction(llvm::PHINode*, llvm::Instruction*, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&, llvm::TargetTransformInfo*) (.constprop.0) SLPVectorizer.cpp:0:0
#23 0x0000636be5fb82d0 llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c8c2d0)
#24 0x0000636be5fbe660 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (.part.0) SLPVectorizer.cpp:0:0
#25 0x0000636be5fbf1c2 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c931c2)
#26 0x0000636be5921b76 llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x35f5b76)
#27 0x0000636be4022d6f llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x1cf6d6f)
#28 0x0000636be3147ae6 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/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0xe1bae6)
#29 0x0000636be4021aeb llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x1cf5aeb)

```

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


More information about the llvm-commits mailing list