[llvm] [SLP] Loop aware cost model/tree building (PR #150450)

Paul Osmialowski via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 11 03:26:38 PDT 2026


pawosm-arm wrote:

Seeing this when building SNAP in our CI:
```
04:24:23  flang: /workspace/src/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1308: Instruction *(anonymous namespace)::InstructionsState::getMatchingMainOpOrAltOp(Instruction *) const: Assertion `MainOp && "MainOp cannot be nullptr."' failed.

04:24:23  2.	Running pass "slp-vectorizer" on function "_QMouter_modulePouter_src"
04:24:23   #0 0x0000b85f6d1a14e0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/arm/atfl/bin/flang+0x43c14e0)
04:24:23   #1 0x0000b85f6d19e82c llvm::sys::RunSignalHandlers() (/opt/arm/atfl/bin/flang+0x43be82c)
04:24:23   #2 0x0000b85f6d1a212c SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
04:24:23   #3 0x0000e5a0a441ea60 (linux-vdso.so.1+0xa60)
04:24:23   #4 0x0000e5a0a4032008 (/lib/aarch64-linux-gnu/libc.so.6+0x82008)
04:24:23   #5 0x0000e5a0a3fea83c gsignal (/lib/aarch64-linux-gnu/libc.so.6+0x3a83c)
04:24:23   #6 0x0000e5a0a3fd7134 abort (/lib/aarch64-linux-gnu/libc.so.6+0x27134)
04:24:23   #7 0x0000e5a0a3fe4114 (/lib/aarch64-linux-gnu/libc.so.6+0x34114)
04:24:23   #8 0x0000e5a0a3fe418c (/lib/aarch64-linux-gnu/libc.so.6+0x3418c)
04:24:23   #9 0x0000b85f71038a80 (anonymous namespace)::InstructionsState::getMatchingMainOpOrAltOp(llvm::Instruction*) const SLPVectorizer.cpp:0:0
04:24:23  #10 0x0000b85f70fe9aa8 llvm::slpvectorizer::BoUpSLP::getLastInstructionInBundle(llvm::slpvectorizer::BoUpSLP::TreeEntry const*) (/opt/arm/atfl/bin/flang+0x8209aa8)
04:24:23  #11 0x0000b85f70ff6924 llvm::slpvectorizer::BoUpSLP::isGatherShuffledSingleRegisterEntry(llvm::slpvectorizer::BoUpSLP::TreeEntry const*, llvm::ArrayRef<llvm::Value*>, llvm::MutableArrayRef<int>, llvm::SmallVectorImpl<llvm::slpvectorizer::BoUpSLP::TreeEntry const*>&, unsigned int, bool) (/opt/arm/atfl/bin/flang+0x8216924)
04:24:23  #12 0x0000b85f70fac458 llvm::slpvectorizer::BoUpSLP::isGatherShuffledEntry(llvm::slpvectorizer::BoUpSLP::TreeEntry const*, llvm::ArrayRef<llvm::Value*>, llvm::SmallVectorImpl<int>&, llvm::SmallVectorImpl<llvm::SmallVector<llvm::slpvectorizer::BoUpSLP::TreeEntry const*, 6u>>&, unsigned int, bool) (/opt/arm/atfl/bin/flang+0x81cc458)
```

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


More information about the llvm-commits mailing list