<html>
<head>
<base href="https://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 --- - SLPVectorizer is sensitive to the order of operands (commutative ops)"
href="https://llvm.org/bugs/show_bug.cgi?id=25247">25247</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>SLPVectorizer is sensitive to the order of operands (commutative ops)
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mehdi.amini@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=15107" name="attach_15107" title="This IR will be vectorized">attachment 15107</a> <a href="attachment.cgi?id=15107&action=edit" title="This IR will be vectorized">[details]</a></span>
This IR will be vectorized
The two IR files attached shows the issue. The diff between the two files is
only the order of the operands to two xor operations.
363c363
< %284 = xor i8 %31, %283
---
<span class="quote">> %284 = xor i8 %283, %31</span >
401c401
< %306 = xor i8 %146, %283
---
<span class="quote">> %306 = xor i8 %283, %146</span >
In one case, reorderInputsAccordingToOpcode() will produce a splat on one-side,
which lead to a lower cost and triggers the vectorization.</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>