[llvm] r176292 - Brag about function call vectorization in the docs.

Benjamin Kramer benny.kra at googlemail.com
Thu Feb 28 11:33:46 PST 2013


Author: d0k
Date: Thu Feb 28 13:33:46 2013
New Revision: 176292

URL: http://llvm.org/viewvc/llvm-project?rev=176292&view=rev
Log:
Brag about function call vectorization in the docs.

Modified:
    llvm/trunk/docs/Vectorizers.rst

Modified: llvm/trunk/docs/Vectorizers.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/Vectorizers.rst?rev=176292&r1=176291&r2=176292&view=diff
==============================================================================
--- llvm/trunk/docs/Vectorizers.rst (original)
+++ llvm/trunk/docs/Vectorizers.rst Thu Feb 28 13:33:46 2013
@@ -245,6 +245,17 @@ See the table below for a list of these
 |     |     | 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
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^





More information about the llvm-commits mailing list