[llvm-bugs] [Bug 50298] New: opt -loop-vectorizer crashes with Assertion `Ingredient2Recipe[I] != nullptr && "Ingredient doesn't have a recipe"' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 11 03:47:04 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50298

            Bug ID: 50298
           Summary: opt -loop-vectorizer crashes with Assertion
                    `Ingredient2Recipe[I] != nullptr && "Ingredient
                    doesn't have a recipe"' failed
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 24849
  --> https://bugs.llvm.org/attachment.cgi?id=24849&action=edit
bbi-55938.ll reproducer

Reproduce with
 opt -o /dev/null bbi-55938.ll -loop-vectorize

Result:
opt: ../lib/Transforms/Vectorize/VPRecipeBuilder.h:154: llvm::VPRecipeBase
*llvm::VPRecipeBuilder::getRecipe(llvm::Instruction *): Assertion
`Ingredient2Recipe[I] != nullptr && "Ingredient doesn't have a recipe"' failed.
PLEASE submit a bug report to
https://developer.internal.ericsson.com/docs/bbi/languages/support/ and include
the crash backtrace.
Stack dump:
0.      Program arguments: build-all/bin/opt -o /dev/null bbi-55938.ll
-loop-vectorize
 #0 0x0000000002b598b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(build-all/bin/opt+0x2b598b8)
 #1 0x0000000002b5756e llvm::sys::RunSignalHandlers()
(build-all/bin/opt+0x2b5756e)
 #2 0x0000000002b5a096 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007f2d4bdf8630 __restore_rt sigaction.c:0:0
 #4 0x00007f2d4952b387 raise (/lib64/libc.so.6+0x36387)
 #5 0x00007f2d4952ca78 abort (/lib64/libc.so.6+0x37a78)
 #6 0x00007f2d495241a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
 #7 0x00007f2d49524252 (/lib64/libc.so.6+0x2f252)
 #8 0x0000000002d20576 llvm::VPRecipeBuilder::getRecipe(llvm::Instruction*)
crtstuff.c:0:0
 #9 0x0000000002d20269 llvm::VPRecipeBuilder::fixHeaderPhis()
(build-all/bin/opt+0x2d20269)
#10 0x0000000002d23d60
llvm::LoopVectorizationPlanner::buildVPlanWithVPRecipes(llvm::VFRange&,
llvm::SmallPtrSetImpl<llvm::Instruction*>&, llvm::DenseMap<llvm::Instruction*,
llvm::Instruction*, llvm::DenseMapInfo<llvm::Instruction*>,
llvm::detail::DenseMapPair<llvm::Instruction*, llvm::Instruction*> > const&)
(build-all/bin/opt+0x2d23d60)
#11 0x0000000002d1aa0a
llvm::LoopVectorizationPlanner::buildVPlansWithVPRecipes(llvm::ElementCount,
llvm::ElementCount) (build-all/bin/opt+0x2d1aa0a)
#12 0x0000000002d19c1d llvm::LoopVectorizationPlanner::plan(llvm::ElementCount,
unsigned int) (build-all/bin/opt+0x2d19c1d)
#13 0x0000000002d29d7d llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(build-all/bin/opt+0x2d29d7d)
#14 0x0000000002d2e9e2 llvm::LoopVectorizePass::runImpl(llvm::Function&,
llvm::ScalarEvolution&, llvm::LoopInfo&, llvm::TargetTransformInfo&,
llvm::DominatorTree&, llvm::BlockFrequencyInfo&, llvm::TargetLibraryInfo*,
llvm::DemandedBits&, llvm::AAResults&, llvm::AssumptionCache&,
std::function<llvm::LoopAccessInfo const& (llvm::Loop&)>&,
llvm::OptimizationRemarkEmitter&, llvm::ProfileSummaryInfo*)
(build-all/bin/opt+0x2d2e9e2)
#15 0x0000000002d2f571 llvm::LoopVectorizePass::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&) (build-all/bin/opt+0x2d2f571)
#16 0x0000000002e364ed llvm::detail::PassModel<llvm::Function,
llvm::LoopVectorizePass, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&) crtstuff.c:0:0
#17 0x00000000023854d9 llvm::PassManager<llvm::Function,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&) (build-all/bin/opt+0x23854d9)
#18 0x0000000000c39c0d 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>&) crtstuff.c:0:0
#19 0x00000000023897b6 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) (build-all/bin/opt+0x23897b6)
#20 0x000000000077f0dd llvm::detail::PassModel<llvm::Module,
llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) crtstuff.c:0:0
#21 0x000000000238433b llvm::PassManager<llvm::Module,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) (build-all/bin/opt+0x238433b)
#22 0x0000000000777f4d llvm::runPassPipeline(llvm::StringRef, llvm::Module&,
llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*,
llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef,
llvm::ArrayRef<llvm::StringRef>, llvm::opt_tool::OutputKind,
llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool)
(build-all/bin/opt+0x777f4d)
#23 0x0000000000788f06 main (build-all/bin/opt+0x788f06)
#24 0x00007f2d49517555 __libc_start_main (/lib64/libc.so.6+0x22555)
#25 0x0000000000772e00 _start (build-all/bin/opt+0x772e00)
Abort


This starts happening with commit 4ba8720f8844:

    [VPlan] Representing backedge def-use feeding reduction phis.

    This patch updates the code handling reduction recipes to also keep
    track of the incoming value from the latch in the recipe. This is needed
    to model the def-use chains completely in VPlan, so that it is possible
    to replace the incoming value with an arbitrary VPValue.

    Reviewed By: Ayal

    Differential Revision: https://reviews.llvm.org/D99294

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210511/b8149eeb/attachment.html>


More information about the llvm-bugs mailing list