Skip to content

[docs] Add a brief description of using -fveclib to enable some math library vectorizations #119215

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

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions llvm/docs/Vectorizers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,16 @@ instruction is available.
f[i] = floorf(f[i]);
}

Many of these math functions are only vectorizable if the file has been built
with a specified target vector library that provides a vector implemention
of that math function. Using clang, this is handled by the "-fveclib" command
line option with one of the following vector libraries:
"accelerate,libmvec,massv,svml,sleef,darwin_libsystem_m,armpl,amdlibm"

.. code-block:: console

$ clang ... -fno-math-errno -fveclib=libmvec file.c

Partial unrolling during vectorization
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
Loading