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

Hal Finkel hfinkel at anl.gov
Thu Feb 28 17:59:05 PST 2013


----- Original Message -----
> From: "Benjamin Kramer" <benny.kra at googlemail.com>
> To: llvm-commits at cs.uiuc.edu
> Sent: Thursday, February 28, 2013 1:33:46 PM
> Subject: [llvm] r176292 - Brag about function call vectorization in the docs.
> 
> 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]);
> +  }

Do some of these only happen in fast-math mode? floorf is a nice example because it will never set errno (according to the Linux man page), and so is always safe. Nevertheless, for functions that set errno I assume we only do this in fast-math mode and we should say so (unless, of course, I'm wrong about that -- but in that case, we might have a correctness problem).

On that thought, we might want some kind of analysis that can determine if errno from some math function is unused so that we can optimize regardless of the conformance mode when possible.

Thanks again,
Hal

>  
>  Partial unrolling during vectorization
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 



More information about the llvm-commits mailing list