<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - opt -loop-vectorize fails with 'Assertion `(EdgeMask || NumIncoming == 1) && "Multiple predecessors with one having a full mask"' failed.'"
href="https://bugs.llvm.org/show_bug.cgi?id=44800">44800</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>opt -loop-vectorize fails with 'Assertion `(EdgeMask || NumIncoming == 1) && "Multiple predecessors with one having a full mask"' failed.'
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Loop Optimizer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mikael.holmen@ericsson.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23093" name="attach_23093" title="bbi-38415.ll reproducer">attachment 23093</a> <a href="attachment.cgi?id=23093&action=edit" title="bbi-38415.ll reproducer">[details]</a></span>
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
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Miscompile with opt -loop-vectorize"
href="show_bug.cgi?id=44488">https://bugs.llvm.org/show_bug.cgi?id=44488</a>
which also dealt with a case where we had a conditional branch with the two
exits being the same.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>