<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 - Interleave failure in Loop Vectorizer"
href="https://bugs.llvm.org/show_bug.cgi?id=45572">45572</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Interleave failure in Loop Vectorizer
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</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>quic_abhikran@quicinc.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=23370" name="attach_23370" title="IR to reproduce the error">attachment 23370</a> <a href="attachment.cgi?id=23370&action=edit" title="IR to reproduce the error">[details]</a></span>
IR to reproduce the error
Hello,
I'm observing a problem with load instruction being vectorized(by Loop
Vectorizer) but erroring out because of the below mentioned error:
Error message :: void
llvm::InnerLoopVectorizer::vectorizeMemoryInstruction(llvm::Instruction*,
llvm::VPTransformState&, llvm::VPValue*, llvm::VPValue*, llvm::VPValue*):
Assertion `(Decision == LoopVectorizationCostModel::CM_Widen || Decision ==
LoopVectorizationCostModel::CM_Widen_Reverse || Decision ==
LoopVectorizationCostModel::CM_GatherScatter) && "CM decision is not to widen
the memory instruction"' failed.
Source code ::
<a href="https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp#L2373">https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp#L2373</a>
The problem is observed because Decision variable is set to CM_Interleave.
While debugging, I found out that the decision is being set to CM_Interleave in
the following
line(<a href="https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp#L6088">https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp#L6088</a>
). But, CM_Interleave decision type is not supported in
InnerLoopVectorizer::vectorizeMemoryInstruction function.
The attached file(vect.ll) is able to reproduce the error from LLVM master
branch.
Command to reproduce the error:
./opt -loop-vectorize -hexagon-autohvx=1 vect.ll -S
Thanks,
Abhikrant</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>