[llvm] 290a111 - [docs] Add a brief description of using -fveclib to enable some math library vectorizations (#119215)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 07:06:28 PST 2024
Author: Simon Pilgrim
Date: 2024-12-09T15:06:23Z
New Revision: 290a111792577810bfd1a858f230260489cf90cf
URL: https://github.com/llvm/llvm-project/commit/290a111792577810bfd1a858f230260489cf90cf
DIFF: https://github.com/llvm/llvm-project/commit/290a111792577810bfd1a858f230260489cf90cf.diff
LOG: [docs] Add a brief description of using -fveclib to enable some math library vectorizations (#119215)
Fixes #62283
Added:
Modified:
llvm/docs/Vectorizers.rst
Removed:
################################################################################
diff --git a/llvm/docs/Vectorizers.rst b/llvm/docs/Vectorizers.rst
index c2beb1669c4e3b..a4462e53edda09 100644
--- a/llvm/docs/Vectorizers.rst
+++ b/llvm/docs/Vectorizers.rst
@@ -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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
More information about the llvm-commits
mailing list