Skip to content

Commit 290a111

Browse files
authored
[docs] Add a brief description of using -fveclib to enable some math library vectorizations (#119215)
Fixes #62283
1 parent 9e6e7c6 commit 290a111

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

llvm/docs/Vectorizers.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,16 @@ instruction is available.
345345
f[i] = floorf(f[i]);
346346
}
347347
348+
Many of these math functions are only vectorizable if the file has been built
349+
with a specified target vector library that provides a vector implemention
350+
of that math function. Using clang, this is handled by the "-fveclib" command
351+
line option with one of the following vector libraries:
352+
"accelerate,libmvec,massv,svml,sleef,darwin_libsystem_m,armpl,amdlibm"
353+
354+
.. code-block:: console
355+
356+
$ clang ... -fno-math-errno -fveclib=libmvec file.c
357+
348358
Partial unrolling during vectorization
349359
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
350360

0 commit comments

Comments
 (0)