<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 - Instcombine: transform shl(inexact shr(x)) with different constant shifts."
   href="https://bugs.llvm.org/show_bug.cgi?id=37872">37872</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Instcombine: transform shl(inexact shr(x)) with different constant shifts.
          </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>Scalar Optimizations
          </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>IIn <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.</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>