Skip to content

Commit 74f8c76

Browse files
committed
[docs] Add a brief description of using -fveclib to enable some math library vectorizations
Fixes #62283
1 parent 788d5a5 commit 74f8c76

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

llvm/docs/Vectorizers.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,18 @@ 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+
353+
.. code-block:: console
354+
accelerate,libmvec,massv,svml,sleef,darwin_libsystem_m,armpl,amdlibm
355+
356+
.. code-block:: console
357+
358+
$ clang ... -fno-math-errno -fveclib=libmvec file.c
359+
348360
Partial unrolling during vectorization
349361
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
350362

0 commit comments

Comments
 (0)