[llvm-dev] LLVM opt unable to vectorize PolyBench code

Craig Topper via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 14 15:31:47 PDT 2018


It would help if you sent the IR you're giving to opt or at least a
complete C function and your clang command line.

~Craig

On Wed, Mar 14, 2018 at 3:05 PM, hameeza ahmed <hahmed2305 at gmail.com> wrote:

> Hello,
>
> I m unable to vectorize following kernel by opt tool;
>
> for (i = 0; i < _PB_NI; i++)
>     for (j = 0; j < _PB_NJ; j++)
>       {
>     tmp[i][j] = 0;
>     for (k = 0; k < _PB_NK; ++k)
>       tmp[i][j] += alpha * A[i][k] * B[k][j];
>       }
>   for (i = 0; i < _PB_NI; i++)
>     for (j = 0; j < _PB_NL; j++)
>       {
>     D[i][j] *= beta;
>     for (k = 0; k < _PB_NJ; ++k)
>       D[i][j] += tmp[i][k] * C[k][j];
>       }
>
> i m using following command
> $opt  -S -O3 -force-vector-width=64 -pass-remarks=loop-vectorize
> -enable-load-pre=0 2mm.ll -o 2mm-64_o3.ll
>
> what is wrong here? what should i do?
>
> Please help..
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180314/cd6794d6/attachment.html>


More information about the llvm-dev mailing list