[llvm-bugs] [Bug 44800] New: opt -loop-vectorize fails with 'Assertion `(EdgeMask || NumIncoming == 1) && "Multiple predecessors with one having a full mask"' failed.'

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 5 06:09:11 PST 2020


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

            Bug ID: 44800
           Summary: opt -loop-vectorize fails with 'Assertion `(EdgeMask
                    || NumIncoming == 1) && "Multiple predecessors with
                    one having a full mask"' 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 23093
  --> https://bugs.llvm.org/attachment.cgi?id=23093&action=edit
bbi-38415.ll reproducer

opt -S -o - bbi-38415.ll -loop-vectorize

hits an assertion

opt: ../lib/Transforms/Vectorize/LoopVectorize.cpp:6869: llvm::VPBlendRecipe
*llvm::VPRecipeBuilder::tryToBlend(llvm::Instruction *, llvm::VPlanPtr &):
Assertion `(EdgeMask || NumIncoming == 1) && "Multiple predecessors with one
having a full mask"' failed.
Stack dump:
0.      Program arguments: ../../master/llvm/build-all-builtins/bin/opt -S -o -
bbi-38415.ll -loop-vectorize 
1.      Running pass 'Function Pass Manager' on module 'bbi-38415.ll'.
2.      Running pass 'Loop Vectorization' on function '@g'
 #0 0x0000000003f41904 PrintStackTraceSignalHandler(void*)
(../../master/llvm/build-all-builtins/bin/opt+0x3f41904)
 #1 0x0000000003f3f4ce llvm::sys::RunSignalHandlers()
(../../master/llvm/build-all-builtins/bin/opt+0x3f3f4ce)
 #2 0x0000000003f41d0c SignalHandler(int)
(../../master/llvm/build-all-builtins/bin/opt+0x3f41d0c)
 #3 0x00007f1ff0879890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00007f1fef322e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x00007f1fef324801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #6 0x00007f1fef31439a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #7 0x00007f1fef314412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #8 0x000000000408d279 llvm::VPRecipeBuilder::tryToBlend(llvm::Instruction*,
std::unique_ptr<llvm::VPlan, std::default_delete<llvm::VPlan> >&)
(../../master/llvm/build-all-builtins/bin/opt+0x408d279)
 #9 0x000000000408eba3
llvm::VPRecipeBuilder::tryToCreateRecipe(llvm::Instruction*, llvm::VFRange&,
std::unique_ptr<llvm::VPlan, std::default_delete<llvm::VPlan> >&,
llvm::VPBasicBlock*) (../../master/llvm/build-all-builtins/bin/opt+0x408eba3)
#10 0x000000000408fbd7
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&)
(../../master/llvm/build-all-builtins/bin/opt+0x408fbd7)
#11 0x000000000408a2a0
llvm::LoopVectorizationPlanner::buildVPlansWithVPRecipes(unsigned int, unsigned
int) (../../master/llvm/build-all-builtins/bin/opt+0x408a2a0)
#12 0x00000000040899d2 llvm::LoopVectorizationPlanner::plan(unsigned int)
(../../master/llvm/build-all-builtins/bin/opt+0x40899d2)
#13 0x0000000004094406 llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(../../master/llvm/build-all-builtins/bin/opt+0x4094406)
#14 0x0000000004097404 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*)
(../../master/llvm/build-all-builtins/bin/opt+0x4097404)
#15 0x000000000409be28 (anonymous
namespace)::LoopVectorize::runOnFunction(llvm::Function&)
(../../master/llvm/build-all-builtins/bin/opt+0x409be28)
#16 0x00000000037dfef4 llvm::FPPassManager::runOnFunction(llvm::Function&)
(../../master/llvm/build-all-builtins/bin/opt+0x37dfef4)
#17 0x00000000037e01a8 llvm::FPPassManager::runOnModule(llvm::Module&)
(../../master/llvm/build-all-builtins/bin/opt+0x37e01a8)
#18 0x00000000037e07fd llvm::legacy::PassManagerImpl::run(llvm::Module&)
(../../master/llvm/build-all-builtins/bin/opt+0x37e07fd)
#19 0x0000000002131ab3 main
(../../master/llvm/build-all-builtins/bin/opt+0x2131ab3)
#20 0x00007f1fef305b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#21 0x000000000211902a _start
(../../master/llvm/build-all-builtins/bin/opt+0x211902a)
Abort (core dumped)

This seems to be related to

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

which also dealt with a case where we had a conditional branch with the two
exits being the same.

-- 
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/20200205/7fd3ce9f/attachment.html>


More information about the llvm-bugs mailing list