<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 - Does SCEV have any problems with recognizing shl+shr/shr+shl pairs turned into masks?"
href="https://bugs.llvm.org/show_bug.cgi?id=37793">37793</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Does SCEV have any problems with recognizing shl+shr/shr+shl pairs turned into masks?
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Global Analyses
</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>I'm not sure this is a bug, more like a question.
In <a href="https://reviews.llvm.org/D46760#1123713">https://reviews.llvm.org/D46760#1123713</a>, Sanjay Patel suggests transforming
lshr+shl into mask(and)+shl, which is not only a canonicalization, but
would also sidestep the problem which D46760 is trying to fix.
This canonicalization is already being done for the non-constants,
or equal constants, but not unequal constants.
The commit that introduced that restriction: <a href="https://reviews.llvm.org/rL155136">https://reviews.llvm.org/rL155136</a>
suggests that said transform negatively impacts backend (rotate instruction),
and SCEV.
The backend part will likely be resolved in <a href="https://reviews.llvm.org/D47681">https://reviews.llvm.org/D47681</a> or
followups.
But the state of SCEV is unknown.
Does it actually have a problem with the mask+shift,
or that comment is no longer correct?</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>