<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 - [SLPVectorizer] Generation of seed operands in the wrong order for insertelement."
href="https://bugs.llvm.org/show_bug.cgi?id=44067">44067</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[SLPVectorizer] Generation of seed operands in the wrong order for insertelement.
</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>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>v.porpodas@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>a.bataev@hotmail.com, anton.a.afanasyev@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>There seems to be a bug in findBuildVector() when the insertelement
instructions are not in increasing index order.
For example:
%Ins1 = insertelement <2 x float> undef, float %Elem1, i32 1 ; NOTE: index=1
%Ins0 = insertelement <2 x float> %Ins1, float %Elem0, i32 0 ; NOTE: index=0
This generates a seed vector of %Elem1, %Elem0, but it should generate the
reverse: %Elem0, %Elem1.
Test:
----
define dso_local <2 x float> @foo({{float, float}}* %A, float %B) {
entry:
%0 = bitcast {{float, float}}* %A to <2 x float>*
%1 = load <2 x float>, <2 x float>* %0
%L0 = extractelement <2 x float> %1, i32 0
%L1 = extractelement <2 x float> %1, i32 1
%Mul0 = fmul float %L0, 2.000000e+00
%Mul1 = fmul float %L1, 2.000000e+00
%Ins1 = insertelement <2 x float> undef, float %Mul1, i32 1
%Ins0 = insertelement <2 x float> %Ins1, float %Mul0, i32 0
ret <2 x float> %Ins0
}
Compile:
----
opt -slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu test.ll</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>