<html>
    <head>
      <base href="https://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 --- - New features for vector extensions"
   href="https://llvm.org/bugs/show_bug.cgi?id=24419">24419</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>New features for vector extensions
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>peter.eastman@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The vector extensions
(<a href="http://clang.llvm.org/docs/LanguageExtensions.html#vectors-and-extended-vectors">http://clang.llvm.org/docs/LanguageExtensions.html#vectors-and-extended-vectors</a>)
are fine as far as they go, but they only expose a fraction of what is
available in SSE, AVX, AltiVec, or even NEON.  I recognize that a portable API
cannot hope to support every feature of every instruction set, but I think it
could easily do a lot more than it does.

For example, how about providing vectorized versions of standard math functions
like abs, floor, ceil, round, min, max, sqrt, and rsqrt?  Some instructions
sets (such as SSE) provide machine instructions for these functions, and even
the ones that don't (such as NEON) still have features that can be used to
implement them more efficiently than just calling the standard function once on
every element.  Users should be able to simply call vectorized functions, and
know it will be compiled in whatever way is most efficient on the target
instruction set.

Also, how about a version of the ternary operator that operates element-wise on
vectors?  This is a very important operation when writing vectorized code, and
there are machine instructions specifically for implementing it efficiently
(such as BLEND in SSE and VBSL in NEON).</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>