[llvm-bugs] [Bug 45525] New: opt -loop-vectorize crashes with 'VPlan.h:941: [...] "Expected either a single incoming value or a greater than two and even number of operands' failed.
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 14 01:13:46 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45525
Bug ID: 45525
Summary: opt -loop-vectorize crashes with 'VPlan.h:941: [...]
"Expected either a single incoming value or a greater
than two and even number of operands' 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 23346
--> https://bugs.llvm.org/attachment.cgi?id=23346&action=edit
bbi-41665.ll reproducer
Reproduce with:
opt -loop-vectorize -S -o - bbi-41665.ll
Result:
opt: ../lib/Transforms/Vectorize/VPlan.h:941:
llvm::VPBlendRecipe::VPBlendRecipe(llvm::PHINode *, ArrayRef<llvm::VPValue *>):
Assertion `((Operands.size() == 1) || (Operands.size() > 2 && Operands.size() %
2 == 0)) && "Expected either a single incoming value or a greater than two and
" "even number of operands"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0. Program arguments: build-all-builtins/bin/opt -loop-vectorize -S -o -
bbi-41665.ll
1. Running pass 'Function Pass Manager' on module 'bbi-41665.ll'.
2. Running pass 'Loop Vectorization' on function '@main'
#0 0x000000000432de94 PrintStackTraceSignalHandler(void*)
(build-all-builtins/bin/opt+0x432de94)
#1 0x000000000432ba5e llvm::sys::RunSignalHandlers()
(build-all-builtins/bin/opt+0x432ba5e)
#2 0x000000000432e1ac SignalHandler(int)
(build-all-builtins/bin/opt+0x432e1ac)
#3 0x00007fdd82c50890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#4 0x00007fdd816f9e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#5 0x00007fdd816fb801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
#6 0x00007fdd816eb39a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
#7 0x00007fdd816eb412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
#8 0x00000000044866c1 llvm::VPRecipeBuilder::tryToBlend(llvm::Instruction*,
std::unique_ptr<llvm::VPlan, std::default_delete<llvm::VPlan> >&)
(build-all-builtins/bin/opt+0x44866c1)
#9 0x00000000044883f5
llvm::VPRecipeBuilder::tryToCreateRecipe(llvm::Instruction*, llvm::VFRange&,
std::unique_ptr<llvm::VPlan, std::default_delete<llvm::VPlan> >&,
llvm::VPBasicBlock*) (build-all-builtins/bin/opt+0x44883f5)
#10 0x00000000044894c7
llvm::LoopVectorizationPlanner::buildVPlanWithVPRecipes(llvm::VFRange&,
llvm::SmallPtrSetImpl<llvm::Value*>&,
llvm::SmallPtrSetImpl<llvm::Instruction*>&, llvm::DenseMap<llvm::Instruction*,
llvm::Instruction*, llvm::DenseMapInfo<llvm::Instruction*>,
llvm::detail::DenseMapPair<llvm::Instruction*, llvm::Instruction*> > const&)
(build-all-builtins/bin/opt+0x44894c7)
#11 0x0000000004483210
llvm::LoopVectorizationPlanner::buildVPlansWithVPRecipes(unsigned int, unsigned
int) (build-all-builtins/bin/opt+0x4483210)
#12 0x0000000004482a24 llvm::LoopVectorizationPlanner::plan(unsigned int)
(build-all-builtins/bin/opt+0x4482a24)
#13 0x000000000448dd3f llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(build-all-builtins/bin/opt+0x448dd3f)
#14 0x0000000004490da4 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-builtins/bin/opt+0x4490da4)
#15 0x0000000004495ab8 (anonymous
namespace)::LoopVectorize::runOnFunction(llvm::Function&)
(build-all-builtins/bin/opt+0x4495ab8)
#16 0x0000000003b8a6d4 llvm::FPPassManager::runOnFunction(llvm::Function&)
(build-all-builtins/bin/opt+0x3b8a6d4)
#17 0x0000000003b8a988 llvm::FPPassManager::runOnModule(llvm::Module&)
(build-all-builtins/bin/opt+0x3b8a988)
#18 0x0000000003b8afdd llvm::legacy::PassManagerImpl::run(llvm::Module&)
(build-all-builtins/bin/opt+0x3b8afdd)
#19 0x00000000023d9ee9 main (build-all-builtins/bin/opt+0x23d9ee9)
#20 0x00007fdd816dcb97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#21 0x00000000023c402a _start (build-all-builtins/bin/opt+0x23c402a)
Abort (core dumped)
Starts crashing with commit e2a1867880:
[LV] Add VPValue operands to VPBlendRecipe (NFCI)
InnerLoopVectorizer's code called during VPlan execution still relies on
original IR's def-use relations to decide which vector code to generate,
limiting VPlan transformations ability to modify def-use relations and
still
have ILV generate the vector code.
This commit introduces VPValues for VPBlendRecipe to use as the values to
blend. The recipe is generated with VPValues wrapping the phi's incoming
values
of the scalar phi. This reduces ingredient def-use usage by ILV as a step
towards full VPlan-based def-use relations.
Differential Revision: https://reviews.llvm.org/D77539
--
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/20200414/72756531/attachment.html>
More information about the llvm-bugs
mailing list