[llvm-dev] Vectorization width not correct using #pragma clang loop vectorize_width

hameeza ahmed via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 20 15:40:59 PDT 2018


Thank you.

I am working on a machine with greater vector widths. How to enable the
emission of greater and different vector widths in loop codes through
pragma ? and automatically.

On Friday, September 21, 2018, Friedman, Eli <efriedma at codeaurora.org>
wrote:

> On 9/20/2018 2:15 PM, hameeza ahmed wrote:
>
> Hello,
> I m trying to set vector width using #pragma clang loop
> vectorize_width(32) but i m getting width 8 for the following kernel;
>
> *i m getting following output when i compiled;*
>
>
>
>
>
> *clang -O3  correlation.c   -Rpass=loop-vectorize  -emit-llvm
> -march=knl    -S  -o 1.ll correlation.c:38:9: remark: vectorized loop
> (vectorization width: 8, interleaved count: 4) [-Rpass=loop-vectorize]
>         for (j = 0; j < M; j++)         ^ *
>
>
> With AVX-512, an instruction can operate on at most 8 double-precision
> lanes.  The vectorizer recognizes that, and interleaves the loop so you get
> 8*4==32 scalar iterations per iteration of the vectorized loop.
>
> -Eli
>
> --
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180921/745710b9/attachment.html>


More information about the llvm-dev mailing list