<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - New vector shuffle legality: fails to reuse shuffle result, and turns unpcklps into shufps x2."
href="http://llvm.org/bugs/show_bug.cgi?id=22377">22377</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>New vector shuffle legality: fails to reuse shuffle result, and turns unpcklps into shufps x2.
</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>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ahmed.bougacha@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=13753" name="attach_13753" title="IR testcase">attachment 13753</a> <a href="attachment.cgi?id=13753&action=edit" title="IR testcase">[details]</a></span>
IR testcase
For the attached reduced IR, we used to generate:
vpermilps $221, %xmm0, %xmm1 ## xmm1 = xmm0[1,3,1,3]
vpermilps $136, %xmm0, %xmm0 ## xmm0 = xmm0[0,2,0,2]
vaddps %xmm0, %xmm1, %xmm1
vunpcklps %xmm1, %xmm0, %xmm0 ## xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
With the new all-shuffles-are-legal lowering, we now generate:
vpermilps $221, %xmm0, %xmm1 ## xmm1 = xmm0[1,3,1,3]
vpermilps $136, %xmm0, %xmm2 ## xmm2 = xmm0[0,2,0,2]
vaddps %xmm2, %xmm1, %xmm1
vshufps $72, %xmm1, %xmm0, %xmm0 ## xmm0 = xmm0[0,2],xmm1[0,1]
vshufps $216, %xmm0, %xmm0, %xmm0 ## xmm0 = xmm0[0,2,1,3]
That is, we no longer reuse the intermediate shuffle result, and fall back to
shufps.</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>