[PATCH] D116879: [llvm] Allow auto-vectorization of sincos() using libmvec
Tim Schmielau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 9 01:10:47 PST 2022
tim.schmielau added a comment.
In line with existing behavior, I have not added vector function definitions for AVX-512.
I have not included vector function definitions for `@llvm.sincos.f(32|64)` either as I believe nothing would be able to generate them.
They would be straightforward and I could add them if requested.
I've added regression tests to the same extend as for the existing, i.e. checking auto-vectorisation with `float` and `double` for vector widths 2, 4 and 8 where those are covered by SSE or AVX-2.
At some point we might want to limit the number of tests. In that case I'd still recommend keeping all tests I've added, because of the unique signature of `sincos()` producing two results from one call.
Instead I'd suggest to prune the existing coverage of combinations of `sin()`, `cos()`, vector lengths, `float`/`double` and libm functions / LLVM intrinsics.
We might also consider updating the documentation <https://llvm.org/docs/Vectorizers.html#vectorization-of-function-calls> by mentioning that further functions might be auto-vectorized on some platforms as well as some combinations not being supported by others, Then again, a conscient user would likely be able to deduce that themselves.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116879/new/
https://reviews.llvm.org/D116879
More information about the llvm-commits
mailing list