<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 - [VectorCombine] Combining permute+blend with zero into a two-source permute"
href="https://bugs.llvm.org/show_bug.cgi?id=50939">50939</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[VectorCombine] Combining permute+blend with zero into a two-source permute
</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>Transformation Utilities
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>lebedev.ri@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Not sure how useful this would be, but we could do the following:
<a href="https://godbolt.org/z/qnc87j9dd">https://godbolt.org/z/qnc87j9dd</a>
define <4 x i32> @src(<4 x i32> %x) local_unnamed_addr #0 {
%permil = shufflevector <4 x i32> %x, <4 x i32> poison, <4 x i32> <i32
undef, i32 0, i32 undef, i32 undef>
%blend = shufflevector <4 x i32> <i32 0, i32 poison, i32 0, i32 0>, <4 x
i32> %permil, <4 x i32> <i32 0, i32 5, i32 2, i32 3>
ret <4 x i32> %blend
}
define <4 x i32> @tgt(<4 x i32> %x) local_unnamed_addr #0 {
%shuf = shufflevector <4 x i32> %x, <4 x i32> zeroinitializer, <4 x i32>
<i32 4, i32 0, i32 5, i32 6>
ret <4 x i32> %shuf
}
Iff SK_PermuteTwoSrc is not costlier than SK_PermuteSingleSrc+SK_Select.
Though, for non-zero second source, looks like we fail to drop unneeded
vpermilps:
<a href="https://godbolt.org/z/3qhzEM933">https://godbolt.org/z/3qhzEM933</a></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>