<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] Use UQADD for vector UADDSAT etc"
   href="https://bugs.llvm.org/show_bug.cgi?id=41023">41023</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[AArch64] Use UQADD for vector UADDSAT etc
          </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: AArch64
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nikita.ppv@gmail.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>AArch64 has uqadd, sqadd, uqsub and sqsub instructions for the legal vector
types. We should use them for uaddsat, saddsat, usubsat and ssubsat instead of
the fallback expansions.

I've tried implementing this myself, but couldn't figure out the right way to
do it. I initially thought we can just autoupgrade the aarch64.neon.uqadd etc
intrinsics to use the generic uadd.sat intrinsics instead and adjust the isel
patterns accordingly.

Unfortunately, this is complicated by the existence of the SIMD scalar variants
of these instructions. I'm assuming that it is preferable to use the fallback
expansion in the scalar case (e.g. adds+csinv) rather than using the SIMD
instruction with three register moves. On the other hand, we probably still
need to force the use of the SIMD instructions if the NEON intrinsics are used.</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>