<div dir="ltr">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.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div>
<br><div class="gmail_quote">On Wed, Mar 14, 2018 at 3:05 PM, hameeza ahmed <span dir="ltr"><<a href="mailto:hahmed2305@gmail.com" target="_blank">hahmed2305@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello,<br><br></div>I m unable to vectorize following kernel by opt tool;<br><br>for (i = 0; i < _PB_NI; i++)<br> for (j = 0; j < _PB_NJ; j++)<br> {<br> tmp[i][j] = 0;<br> for (k = 0; k < _PB_NK; ++k)<br> tmp[i][j] += alpha * A[i][k] * B[k][j];<br> }<br> for (i = 0; i < _PB_NI; i++)<br> for (j = 0; j < _PB_NL; j++)<br> {<br> D[i][j] *= beta;<br> for (k = 0; k < _PB_NJ; ++k)<br> D[i][j] += tmp[i][k] * C[k][j];<br> }<br><br></div>i m using following command<br>$opt -S -O3 -force-vector-width=64 -pass-remarks=loop-vectorize -enable-load-pre=0 2mm.ll -o 2mm-64_o3.ll<br><br></div>what is wrong here? what should i do?<br><br></div>Please help..<br><div><div><br></div></div></div>
</blockquote></div><br></div>