<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 - [AArch64] add tablegen pattern matching for "long" math instructions"
   href="https://bugs.llvm.org/show_bug.cgi?id=39722">39722</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[AArch64] add tablegen pattern matching for "long" math instructions
          </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>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: AArch64
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>spatel+llvm@rotateright.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>arnaud.degrandmaison@arm.com, llvm-bugs@lists.llvm.org, peter.smith@linaro.org, Ties.Stuij@arm.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>As discussed in <a href="https://reviews.llvm.org/D54392">https://reviews.llvm.org/D54392</a> :

define <4 x i16> @usubl(<8 x i8> %a, <8 x i8> %b) {
  %za = zext <8 x i8> %a to <8 x i16>
  %zb = zext <8 x i8> %b to <8 x i16>
  %xa = shufflevector <8 x i16> %za, <8 x i16> undef, <4 x i32> <i32 0, i32 1,
i32 2, i32 3>
  %xb = shufflevector <8 x i16> %zb, <8 x i16> undef, <4 x i32> <i32 0, i32 1,
i32 2, i32 3>
  %bo = sub <4 x i16> %xa, %xb
  ret <4 x i16> %bo
}

$ llc -o - uxtl.ll -mtriple=aarch64
        ushll   v0.8h, v0.8b, #0
        ushll   v1.8h, v1.8b, #0
        sub     v0.4h, v0.4h, v1.4h
        ret

This should be "usubl"? Similar matching should be added for other math ops and
types supported by the ISA.</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>