[PATCH] D127531: [SLP]Improve analysis of same/alternate code ops and scheduling.

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 06:27:47 PDT 2022


uabelho added a comment.

Hello,

The following starts crashing with this patch:
 opt --passes=slp-vectorizer bbi-75302.ll -o /dev/null

I get

  opt: ../include/llvm/ADT/ArrayRef.h:256: const T &llvm::ArrayRef<llvm::Value *>::operator[](size_t) const [T = llvm::Value *]: Assertion `Index < Length && "Invalid index!"' failed.
  PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
  Stack dump:
  0.	Program arguments: build-all/bin/opt --passes=slp-vectorizer /home/uabelho/bbi-75302.ll -o /dev/null
   #0 0x0000000002e58093 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (build-all/bin/opt+0x2e58093)
   #1 0x0000000002e55dae llvm::sys::RunSignalHandlers() (build-all/bin/opt+0x2e55dae)
   #2 0x0000000002e58416 SignalHandler(int) (build-all/bin/opt+0x2e58416)
   #3 0x00007ff50079f630 __restore_rt (/lib64/libpthread.so.0+0xf630)
   #4 0x00007ff4fdee6387 raise (/lib64/libc.so.6+0x36387)
   #5 0x00007ff4fdee7a78 abort (/lib64/libc.so.6+0x37a78)
   #6 0x00007ff4fdedf1a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
   #7 0x00007ff4fdedf252 (/lib64/libc.so.6+0x2f252)
   #8 0x0000000002f40627 (build-all/bin/opt+0x2f40627)
   #9 0x00000000030ae5b2 llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*) (build-all/bin/opt+0x30ae5b2)
  #10 0x00000000030aa658 llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::ArrayRef<llvm::Value*>) (build-all/bin/opt+0x30aa658)
  #11 0x00000000030ab1e7 llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*) (build-all/bin/opt+0x30ab1e7)
  #12 0x00000000030b2659 llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::MapVector<llvm::Value*, llvm::SmallVector<llvm::Instruction*, 2u>, llvm::DenseMap<llvm::Value*, unsigned int, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::Value*, unsigned int> >, std::vector<std::pair<llvm::Value*, llvm::SmallVector<llvm::Instruction*, 2u> >, std::allocator<std::pair<llvm::Value*, llvm::SmallVector<llvm::Instruction*, 2u> > > > >&) (build-all/bin/opt+0x30b2659)
  #13 0x00000000030d9d6f (anonymous namespace)::HorizontalReduction::tryToReduce(llvm::slpvectorizer::BoUpSLP&, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo const&) (build-all/bin/opt+0x30d9d6f)
  #14 0x00000000030c7588 llvm::SLPVectorizerPass::vectorizeHorReduction(llvm::PHINode*, llvm::Value*, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&, llvm::TargetTransformInfo*, llvm::SmallVectorImpl<llvm::WeakTrackingVH>&) (build-all/bin/opt+0x30c7588)
  #15 0x00000000030c8969 llvm::SLPVectorizerPass::vectorizeRootInstruction(llvm::PHINode*, llvm::Value*, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&, llvm::TargetTransformInfo*) (build-all/bin/opt+0x30c8969)
  #16 0x00000000030bf821 llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) (build-all/bin/opt+0x30bf821)
  #17 0x00000000030bd85c llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (build-all/bin/opt+0x30bd85c)
  #18 0x00000000030bcbff llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (build-all/bin/opt+0x30bcbff)
  #19 0x00000000031c7c4d llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (build-all/bin/opt+0x31c7c4d)
  #20 0x000000000266850c llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (build-all/bin/opt+0x266850c)
  #21 0x0000000000aefdbd llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (build-all/bin/opt+0xaefdbd)
  #22 0x000000000266c7ee llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (build-all/bin/opt+0x266c7ee)
  #23 0x0000000000aefb9d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (build-all/bin/opt+0xaefb9d)
  #24 0x00000000026677bc llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (build-all/bin/opt+0x26677bc)
  #25 0x0000000000721779 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::StringRef>, llvm::ArrayRef<llvm::PassPlugin>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool) (build-all/bin/opt+0x721779)
  #26 0x0000000000730c61 main (build-all/bin/opt+0x730c61)
  #27 0x00007ff4fded2555 __libc_start_main (/lib64/libc.so.6+0x22555)
  #28 0x000000000071a3e0 _start (build-all/bin/opt+0x71a3e0)
  Abort

F25137229: bbi-75302.ll <https://reviews.llvm.org/F25137229>


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127531/new/

https://reviews.llvm.org/D127531



More information about the llvm-commits mailing list