<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:llvm-dev@redking.me.uk" title="Simon Pilgrim <llvm-dev@redking.me.uk>"> <span class="fn">Simon Pilgrim</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - shuffle and vectorize repeated scalar ops on extracted elements"
href="https://bugs.llvm.org/show_bug.cgi?id=31880">bug 31880</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Fixed By Commit(s)</td>
<td>
</td>
<td>309812
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - shuffle and vectorize repeated scalar ops on extracted elements"
href="https://bugs.llvm.org/show_bug.cgi?id=31880#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - shuffle and vectorize repeated scalar ops on extracted elements"
href="https://bugs.llvm.org/show_bug.cgi?id=31880">bug 31880</a>
from <span class="vcard"><a class="email" href="mailto:llvm-dev@redking.me.uk" title="Simon Pilgrim <llvm-dev@redking.me.uk>"> <span class="fn">Simon Pilgrim</span></a>
</span></b>
<pre>Fixed in trunk by rL309812:
opt pr31880.ll -S -slp-vectorizer
define <2 x i8> @g(<2 x i8> %x, <2 x i8> %y) {
%x0 = extractelement <2 x i8> %x, i32 0
%y1 = extractelement <2 x i8> %y, i32 1
%1 = insertelement <2 x i8> undef, i8 %x0, i32 0
%2 = insertelement <2 x i8> %1, i8 %y1, i32 1
%3 = mul <2 x i8> %2, %2
%4 = extractelement <2 x i8> %3, i32 0
%ins1 = insertelement <2 x i8> undef, i8 %4, i32 0
%5 = extractelement <2 x i8> %3, i32 1
%ins2 = insertelement <2 x i8> %ins1, i8 %5, i32 1
ret <2 x i8> %ins2
}
opt pr31880.ll -S -slp-vectorizer -instcombine
define <2 x i8> @g(<2 x i8> %x, <2 x i8> %y) {
%1 = shufflevector <2 x i8> %x, <2 x i8> %y, <2 x i32> <i32 0, i32 3>
%2 = mul <2 x i8> %1, %1
ret <2 x i8> %2
}</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>