aboutsummaryrefslogtreecommitdiff
path: root/docs/Vectorizers.rst
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-02-28 19:33:46 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-02-28 19:33:46 +0000
commit19949d8b867013d8a0ef90ac6d3051c49a92eef5 (patch)
tree95e1477843e0e5eea1572c1bf76735850aeeac61 /docs/Vectorizers.rst
parent1abc00b6d18b1a81548e52783fbccd1c59ebf968 (diff)
Brag about function call vectorization in the docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/Vectorizers.rst')
-rw-r--r--docs/Vectorizers.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/Vectorizers.rst b/docs/Vectorizers.rst
index 0894b1eb3f..e2d3667bc1 100644
--- a/docs/Vectorizers.rst
+++ b/docs/Vectorizers.rst
@@ -245,6 +245,17 @@ See the table below for a list of these functions.
| | | fmuladd |
+-----+-----+---------+
+The loop vectorizer knows about special instructions on the target and will
+vectorize a loop containing a function call that maps to the instructions. For
+example, the loop below will be vectorized on Intel x86 if the SSE4.1 roundps
+instruction is available.
+
+.. code-block:: c++
+
+ void foo(float *f) {
+ for (int i = 0; i != 1024; ++i)
+ f[i] = floorf(f[i]);
+ }
Partial unrolling during vectorization
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^