<html>
    <head>
      <base href="http://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 --- - [ARM] Allow selection of the SMULW[BT] and SMLAW[BT] instructions"
   href="http://llvm.org/bugs/show_bug.cgi?id=21297">21297</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[ARM] Allow selection of the SMULW[BT] and SMLAW[BT] instructions
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>Backend: ARM
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>oliver.stannard@arm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Our current instruction selection for the SMULW[BT] and SMLAW[BT] instructions
is incorrect (<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - ARM code emitter misoptimization with 16-bit multiplication"
   href="show_bug.cgi?id=19396">http://llvm.org/bugs/show_bug.cgi?id=19396</a>), and I have a patch
up for review to remove the incorrect selection patterns
(<a href="http://reviews.llvm.org/D5824">http://reviews.llvm.org/D5824</a>).

However, it should be possible to use these instructions from C code, for
example:

int smulwb(int a, short b) {
  return ((long long)a * (long long)b) >> 16;
}

This involves a 64-bit multiply on a 32-bit target, which is an isel DAG node
with two results, so it is not possible to write a pattern to select this. This
would require C++ code to perform the match.</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>