[llvm-bugs] [Bug 24419] New: New features for vector extensions
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 10 12:03:42 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24419
Bug ID: 24419
Summary: New features for vector extensions
Product: clang
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: peter.eastman at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
The vector extensions
(http://clang.llvm.org/docs/LanguageExtensions.html#vectors-and-extended-vectors)
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).
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150810/7f9c78b6/attachment.html>
More information about the llvm-bugs
mailing list