[llvm] [SLP]Initial support for non-power-of-2 (but still whole register) number of elements in operands. (PR #106449)

Mikael Holmén via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 2 06:03:09 PDT 2024


mikaelholmen wrote:

We see crashes also with the updated patch a3ea90ffbbe4
```
opt: ../include/llvm/ADT/ArrayRef.h:377: MutableArrayRef<T> llvm::MutableArrayRef<llvm::Value *>::slice(size_t, size_t) const [T = llvm::
Value *]: Assertion `N + M <= this->size() && "Invalid specifier"' failed.

 #8 0x0000559277fec73c llvm::slpvectorizer::BoUpSLP::tryToGatherExtractElements(llvm::SmallVectorImpl<llvm::Value*>&, llvm::SmallVectorImpl<int>&, unsigned int) const (opt+0x597673c)
 #9 0x0000559277feb95f llvm::slpvectorizer::BoUpSLP::findReusedOrderedScalars(llvm::slpvectorizer::BoUpSLP::TreeEntry const&) (opt+0x597595f)
#10 0x0000559277ff550e llvm::slpvectorizer::BoUpSLP::getReorderingData(llvm::slpvectorizer::BoUpSLP::TreeEntry const&, bool) (opt+0x597f50e)
#11 0x0000559277ff8d79 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (opt+0x5982d79)
#12 0x000055927807557d (anonymous namespace)::HorizontalReduction::tryToReduce(llvm::slpvectorizer::BoUpSLP&, llvm::DataLayout const&, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo const&) SLPVectorizer.cpp:0:0
#13 0x00005592780546de llvm::SLPVectorizerPass::vectorizeHorReduction(llvm::PHINode*, llvm::Instruction*, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&, llvm::TargetTransformInfo*, llvm::SmallVectorImpl<llvm::WeakTrackingVH>&) (opt+0x59de6de)
#14 0x0000559278054a9b llvm::SLPVectorizerPass::vectorizeRootInstruction(llvm::PHINode*, llvm::Instruction*, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&, llvm::TargetTransformInfo*) (opt+0x59dea9b)
#15 0x0000559278049d00 llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) (opt+0x59d3d00)
#16 0x00005592780469c0 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (opt+0x59d09c0)
```
Unfortunately I don't have a reproducer to share at the moment. I'll try to extract one but not sure I'll succeed.

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


More information about the llvm-commits mailing list