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

Friedman, Eli via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 20 16:07:30 PDT 2018


See http://lists.llvm.org/pipermail/llvm-dev/2018-July/124792.html ?

-Eli

On 9/20/2018 3:40 PM, hameeza ahmed wrote:
> 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 
> <mailto: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
>
> -- 
> You received this message because you are subscribed to the Google 
> Groups "Polly Development" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to polly-dev+unsubscribe at googlegroups.com 
> <mailto:polly-dev+unsubscribe at googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 
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/20180920/dc02fbb4/attachment.html>


More information about the llvm-dev mailing list