-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use LLVM intrinsics for floor, ceil, trunc, and round #5983
Comments
I think |
The openlibm |
LLVM can vectorize a small number of commonly used math functions (see http://llvm.org/docs/Vectorizers.html#vectorization-of-function-calls). It is useful to emit intrinsics for these functions (instead of ccall), which would make |
Alas |
@ArchRobison My guess (which could be completely wrong) for why I would be in favour of a new function ( |
What if we have a SIMD module that can have versions that Vectorise? A kludge but comes with the buyer beware notice. |
I'd like to see this PR pulled and then open a new issue on the other functions. They involve significantly heavier hacking. Here is the list of function calls that LLVM can vectorize. One way to correctly vectorize
I would also be in favor of adding |
I updated my previous remarks after I saw that Julia has support for the IEEE rounding state. Is there yet a Julia interface to |
I don't know if it is an LLVM target, but apparently Haskell
No, but again |
|
Haskell has an LLVM code generator backend as an option. |
Closed by #8364. |
Right now we call openlibm for these, but that is really slow (see my benchmarks versus VML). I think LLVM can optimize the intrinsics into a single instruction. Might be easiest to wait until we have #5046.
The text was updated successfully, but these errors were encountered: